This is useful when debugging. it's difficult to debug without
backtrace.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
'from . import ofproto_v1_0 as ofproto' in ryu/ofproto/__init__.py is
a wrong assumption. We need to remove it.
This introduces ryu/ofproto/ofproto_common.py including only constatns
that OF version independent code must use. Note that I don't move data
structures there that multiple OF versions can share (like OVS does).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
format is defined in builtin, so it should be avoid for argument.
use flow_format instead.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Reviewed-by: Simon Horman <simon@horms.net>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To make the further integration into IaaS OSS (OpenStack and
CloudStack) easier, we switch to Apache 2.0 license.
ryu/app/wsapi.py is still under GPL3 or later. We replace it later.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
We get a pretty anonying message every time a datapath has gone since
we kill send_thr gleenlet in the normal termination. Let's ignore the
exception.
In the long term, we should improve error message delivering. Just
printing an error is pretty useless.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Allow send_flow_mod() to send NXTFlowMod messages in place of OFPFlowMod
messages if the match includes fields chat can't be encoded by OFPMatch
The flow format will be upgraded as necessary
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This message may be used to request that the NXM
flow format may be used. NXM is used as the match
in NX vendor extension messages such as NXT_FLOW_MOD.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
log errors when serving datapath. And a comment to clarify the intention.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
We need to yield the CPU to other greenlets. Otherwise, ryu can't
accept new switches or handle the existing switches. The limit is
arbitrary. I guess that we need to think about the better approach in
the future (e.g. non greenlet framework).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Currently, we try to read OFP_MSG_SIZE_MAX (65535) from sockets. This
hurts the performance badly. This patch changes ryu to read a single
request from socket.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
cbench in throughtput mode doesn't work with ryu. We need to limit
queue size to prevent the queue from eating memory up.
The size is arbitrary. It can be the startup parameter. But I think
that we should solve this in the better way. So let's not make it
global for now
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Using Queue hurts the performance badly. So let's kill recv_q. It's
not useufl.
Killing send_q is difficult because letting multiple greenlets to send
data to a switch is tricky.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Even when exception occurred, kill other thread.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
After the datapath connection is close, we call gevent.joinall for
ev_thr and send_thr greenlets to wait for the completion of them.
However, gevent.joinall will block forever since the greenlets sleep.
We can put some junk to the queues to wake them but looks like just
killing the greenlets is simpler.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Later dpset is decoupled with EventQueueCreate.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>