Currently, the error message event log which is output by ofp_handler.py
is difficult to understand what is wrong in the previous OpenFlow request
message.
This patch improves the readability of this output to find out errors.
*** Output Example ***
EventOFPErrorMsg received.
version=0x4, msg_type=0x1, msg_len=0x4c, xid=0xecc7f07b
`-- msg_type: OFPT_ERROR(1)
OFPErrorMsg(type=0x4, code=0x9, data=b'\x04\x0e\x00\x58\xec\xc7\xf0\x7b\x00\x0
0\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x2b\x67\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x0
0\x01\x00\x0c\x80\x00\x18\x04\xc0\xa8\x00\x01\x00\x00\x00\x00')
|-- type: OFPET_BAD_MATCH(4)
|-- code: OFPBMC_BAD_PREREQ(9)
`-- data: version=0x4, msg_type=0xe, msg_len=0x58, xid=0xecc7f07b
`-- msg_type: OFPT_FLOW_MOD(14)
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This patch is generated by "2to3 -f dict" and irrevant parts were
hand-removed.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
UserWarning is always shown when ryu.controller.dpset.DPset is loaded. It is noisy.
Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Datapath#ports is kept for compatibility with the previous openflow versions (< 1.3). Datapath#ports is not updated when received EventOFPPortStatus. This behavior may confuse users. Wherefore, showing warning message when the user accesses to Datapath#ports with the currently openflow versions (>= 1.3) is friendly.
Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
We use syntaxes which can be used only in Python2 at many locations. But we should reduce the use of the syntaxes. This patch serves syntax level compatibility with Python3. However, for full compatibility is required still a lot of work because many API changes are made between 2 to 3.
Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
port from wiki.
dummy quantumclient is necessary to import ryu.app.quantum_adapter by
sphinx.ext.autodoc.
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
and add some comments. no functional changes.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Due to Nagle, an OF message that an application sends might be not
delivered to a switch immediately. This patch disables Nagle. This has
bad effect on throughput. I think that the latency matters for any
management channel. To avoid throughput drop, we could use TCP_CORK on
Linux but it's linux specific.
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
this is similar to handler.register_service but for client-server
style applications. register_service is not appropriate for such
applications becuase normally the client does not consume
(in the sense of set_ev_cls) asynchronous events from the server.
note: this automatically load the server only if "api" module is
directly loaded from the module defining the client application.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
dpset might be initialied implicitly like OFPHandler.
In that case, _CONTEXTS are passed to dpset. so we should ignore them.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
starts OFP like other applications. Kill the original way to start OFP
(start_service).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
OFcontroller is not started due to:
e45f382e51c9a3d57a6d8c01cec9e70f7ca364fd
Author: Isaku Yamahata <yamahata@valinux.co.jp>
Date: Fri Nov 22 16:45:59 2013 +0900
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Currently, ryu always starts ofp application because ryu doesn't know
applications that an user specifies needs ofp application or not. So
you can't run two ryu instances even if one of them doesn't use ofp
application because two instances tries to listen the same port.
The root problem is that there is no way to represent dependency
between applications. The patch to invent our own json format to
represent such was proposed ago but I'm still not sure we really need
such complicity.
This tries to solve the problem simply. A module defining events for
an application calls register_service() to declare which application
generates the events, e.g., ofp_event.py call register_service() with
'ofp_handler' argument. If an application starts including @set_ev_cls
for ofp_event, ryu-manager starts ofp application (ofp_handler).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
this should fix the following crash recently reported
by wataru yamamoto on ryu-devel.
hub: uncaught exception: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 48, in _launch
func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 110, in _event_loop
handler(ev)
File "/usr/local/lib/python2.7/dist-packages/ryu/controller/dpset.py", line 157, in dispacher_change
self.register(datapath)
File "/usr/local/lib/python2.7/dist-packages/ryu/controller/dpset.py", line 100, in register
assert dp.id not in self.dps
AssertionError
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
this "dp_type" stuff has been there for almost 2 years
without being used at all.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Neutron plugin can call remove_port after network deletion for
automatic delete port like router/dhcp port. So ignore NetworkNotFound
exception.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
And make Network.remove_network more robust.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
no longer necessary after the hub changes.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
and this time add comments to explain the intention.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
The list of handler to be called for the OFP message should be kept
even if the state is changed in a handler.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
let RyuApp provide its own logger.
use it instead of per-module logger where appropriate.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>