883 Commits

Author SHA1 Message Date
MORITA Kazutaka
b9ddde8830 fix ofp_event conversion messup
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-09 16:35:37 +09:00
FUJITA Tomonori
70e8d096d5 add cbench application
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>
2012-02-08 22:51:42 +09:00
FUJITA Tomonori
f4063f2f06 move to the main mode right after sending BARRIER
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>
2012-02-05 16:02:22 +09:00
FUJITA Tomonori
567cb2c364 fix datapath disconnection cleanup
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>
2012-02-05 15:41:30 +09:00
Isaku Yamahata
9f022847cd rest: add '/network' prefix to its path
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>
2012-02-03 12:41:10 +09:00
FUJITA Tomonori
78e3eba75d remove unused members in Datapath class
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-03 12:21:14 +09:00
Isaku Yamahata
89a3f010b8 client: pass http responce when an error occurs
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>
2012-02-03 08:59:20 +09:00
Isaku Yamahata
c22ef47a9c controller: factor out ofp message event from event.py
Move out ofp msg event from event.py into ofp_event.py

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-03 02:36:26 +09:00
Isaku Yamahata
b3002281e9 pylint: various fixes for pylint
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-03 02:35:38 +09:00
Isaku Yamahata
c16b232f38 app: event dumper application
This app dumps events occurred in specified dispatcher.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:50 +09:00
Isaku Yamahata
e66a04e80e controller/dpset: Introduce datapath enter/leave event
Introduce DPSet class to track datapath enter/leave and generate events.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:44 +09:00
Isaku Yamahata
5e0dbb61bf dispatcher, handler: constantiate dispatcher name
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:43 +09:00
Isaku Yamahata
39bc833bf3 controller: pass datapath to EventQueue for EventQueueCreate event
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>
2012-02-01 08:55:42 +09:00
Isaku Yamahata
58658d3ed4 dispacher: introduce inheritable handler
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>
2012-02-01 08:55:40 +09:00
Isaku Yamahata
f9bae8bb89 controller/dispatcher: introduce events on event queue itself
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>
2012-02-01 08:55:37 +09:00
Isaku Yamahata
4dd1118b7d dispatcher: pass name to EventQueue and track all instances
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:35 +09:00
Isaku Yamahata
d6d7c9d6d2 controller/dispatcher: allow handler that accepts any event type
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>
2012-02-01 08:55:33 +09:00
Isaku Yamahata
8e4446892b controller/dispatcher: pylint
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-31 06:41:32 +09:00
FUJITA Tomonori
0be016c271 use 0 dl_{src, dst} for OFPMatch
Simplify the code a bit.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-31 04:02:21 +09:00
FUJITA Tomonori
774088c306 move _pack_into and _str_attr to ofproto_parser.py
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>
2012-01-31 04:02:17 +09:00
Isaku Yamahata
104436157a xid: improve xid handling
Generate xid for ofp message instead of always 0.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-30 18:32:47 +09:00
Isaku Yamahata
2d3a510635 ofproto_v1_0: add a constant, MAX_XID
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-30 18:32:45 +09:00
Isaku Yamahata
0bff34ca87 ofproto/ofproto_v1_0_parser: more parsers/serializers
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-30 07:20:35 +09:00
Isaku Yamahata
5ef02dfc55 ofproto_v1_0_parser: allows 0 as dl_{src, dst} for OFPMatch
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>
2012-01-29 03:30:41 +09:00
Isaku Yamahata
18cbaad5ad lib/mac: add helper function/values
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-29 03:30:39 +09:00
Isaku Yamahata
326eb1d839 ofproto/ofproto_v1_0: typo, missing consts
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-29 03:28:04 +09:00
FUJITA Tomonori
1866e2dd87 move MsgBase class to ofproto_parser.py from ofproto_parser_v1_0.py
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>
2012-01-25 15:53:54 -08:00
FUJITA Tomonori
68e7bc77bb remove OF version dependence from MsgBase class
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>
2012-01-25 15:48:39 -08:00
Isaku Yamahata
d05fbf2807 pep8: utils.py
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-24 11:54:57 +09:00
Isaku Yamahata
9cc4f69d72 pep8: ryu/ofproto/ofproto_v1_0.py
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-24 11:54:55 +09:00
FUJITA Tomonori
67a06fc17f Use from gevent.queue import Queue
For consistency.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-17 23:04:32 +09:00
FUJITA Tomonori
cd0fbaffd9 Fix to send OFPT_HELLO with the highest OpenFlow protocol version
Preparation for 1.2 support.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-17 23:04:31 +09:00
FUJITA Tomonori
aa5051a162 initial commit
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2011-12-09 15:56:05 +09:00