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>
rename options. (s/_/-/)
according to Isaku Yamahata, this makes us look similar to openstack.
caveat: no backward compat is provided. you need to update both of
config files and cli options.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Empty q.get() is blocking send thread.
Because of this issue, datapath state never transit to DEAD.
This fixes commit 83e3709a0d70f889e794d1c5f70c1c1eb73075f7.
- controller: fix send_q draining
83e3709a0d
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
make most of modules use openstack.common.cfg instead of gflags
caveats: no config file compatibility is provided. (flagfile vs ini file)
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
when stopping the sender thread, ensure that no one is going to block
on send_q. otherwise a ryu app who wants to do send_msg on the datapath
can block on the queue forever if the queue is full.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This is purely internal change and no API for applications is
changed. At least, I confirmed that folsom OpenStack plugin works.
With the current dispatcher mechanism, multiple greenlets call
applications' handlers and might be blocked anywhere so we need
various locks to handle that concurrency. This makes things difficult
for application developers.
With this patch, each applications are connected with events. Each
application has the own greenlet(s) to handle events and might send
events to other applications.
If an application registers handlers for some OF events, it subscribes
to OF component and registers the OF events that it's interested. OF
application delivers such OF events to the application and the
application's greenlet executes the handlers.
With this, we can completely remove dispatcher.py and its friends.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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>