This simple application does _only_ what cbench expects. As usual, you
can use this application in the following way:
$ ryu-manager --app_lists ryu.app.cbench.Cbench
Currently, this supports only the latency mode.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
We had better to move on to the main state after getting the response
of the barrier since it guarantees that the switch is in the known
state (all the flows were removed). However, cbench doesn't work
because it ignores the barrier. Also, the above "known" state doesn't
always work (for example, the secondary controller should not remove
all the flows in the case of HA configuration). Let's move on to the
main state here for now. I guess that we need API to enable
applications to initialize switches in their own ways.
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>
Otherwise, no other REST PATH can't be used because any string
is interpreted as network id.
Later /switches PATH will be used.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thus the caller can examine error code instead of abort blindly
and can provide more informative message.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
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>
Introduce inheritable handler which inherits during dispatcher change
for convenience. Thus, we don't have to watch dispatcher change event
and unregister/register.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This patch introduces event queue event(event on event queue).
And track dispatcher children in order to register callback handler
for all children of a given dispatcher.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This type of handler will be used by event dumper application.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This moves _pack_into and _str_attr helper functions to
ofproto_parser.py from ofproto_parser_v1_0.py in order to enable OF
1.2 version parser to use them.
They are renamed to msg_pack_into and msg_str_attr respectively.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
When 0 is passed for dl_{src, dst}, it is converted to '\x00' * 6
So when creating OFPMatch with wildcarded dl_{src, dst},
the argument can be simplified to 0 instead of '\x00' * 6.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This moves MsgBase class to ofproto_parser.py from
ofproto_parser_v1_0.py in order to enable OF 1.2 version parser to use
MsgBase class.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This removes OF 1.0 version dependence from MsgBase class to enable OF
1.2 version parser to use MsgBase class.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>