10 Commits

Author SHA1 Message Date
FUJITA Tomonori
0bec11600b dpset: support OF1.3
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
2013-08-06 08:56:25 +09:00
YAMAMOTO Takashi
998a8ad543 log-cleanup: per RyuApp logger
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>
2013-03-06 01:35:14 +09:00
FUJITA Tomonori
bdaf539ebd fix breakage the commit 68f3259754fdbd7b5351c9739bf6f238c7ffb313
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-13 17:26:20 +09:00
Isaku Yamahata
68f3259754 controller/ofp_handler: improve version negotiation
- fix string concatenation. Needs surrounding paren.
- more version checks
- make hello_failed private. (adding "_" prefix)

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2013-02-13 13:01:57 +09:00
FUJITA Tomonori
7578e7d602 replace dispatcher mechanism
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>
2013-02-04 09:33:28 +09:00
Isaku Yamahata
797b8a70d4 ofp_handler: receiving side of OFPHelloElem version negotiation
Teach Hello handler OFPHelloElemBitmapVersion

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-20 20:14:52 +09:00
Isaku Yamahata
7e56bfb527 ofp_handler: Improve hello version negotiation
When switch sends version higher than Ryu supports, Ryu fails to negotiate.
In this case
  4 = OF1.3 from switch
  3 = OF1.2 from Ryu
  datapath.supported_ofp_version = (3 = OF1.2,)
In such cases, we should use OF1.2 instead of error.
> Connection to controller closed because of {"localhost",6633,0, {unsupported_version,4}}

Reported-by: Shivaram Mysore <shivaram.mysore@gmail.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-12-19 19:46:38 +09:00
FUJITA Tomonori
4152e5d229 Add workaround to switch_features_handler for OF1.3
hacky workaround, will be removed. OF1.3 doesn't have ports. An
application should not depend on them. But there might be such bad
applications so let's keep this workaround for while.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-11-23 11:38:05 +09:00
Isaku Yamahata
b624e6369b ofp_handler: print msg.data in hex format, not raw string
Printing raw string causes terminal in unexpected mode.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-10-03 05:24:06 +09:00
FUJITA Tomonori
222d6f1fee register OFP handlers via register_instance
No reason that we use register_cls() for ofp handlers. We can do with
register_instance() with the others do.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-09-05 09:23:35 +09:00