summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2012-07-17stop import ofproto_v1_0 as ofprotoFUJITA Tomonori
'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>
2012-07-17nxm: remove import ofprotoFUJITA Tomonori
Use ofproto_v1_0 explicitly instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-17of1.2: OFPMatch serialiser: fix ARP_SPA, ARP_TPA and IPV6_FLABEL maskingSimon Horman
* In the case of ARP_SPA, ARP_TPA and IPV6_FLABEL a masked match should be used unless the mask is all ones. Previously a non-masked matched was used in the case were the mask was zero, leading to the value being unmasked, whereas in should be completely masked out. * An un-masked IPV6_FLABEL should internally use a mask of UINT32_MAX Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-17simple_switch: fix port_status_handlerKAWAI Hiroaki
port_no is not a member of msg, but a member of msg.desc. Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-17of1.2: add OFPSF_REPLY_MORE constantFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-17of1.2: remove unused mask in MTEthTypeFUJITA Tomonori
EthType doesn't support mask. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-16enable applications to specify OF versionsFUJITA Tomonori
Some applications need to use particular OF versions. With this patch, applications can specify OF versions in the following way: class YourApplication(app_manager.RyuApp): OFP_VERSIONS = [ofproto_v1_1.OFP_VERSION, ofproto_v1_2.OFP_VERSION] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp>
2012-07-14of1.2: add OFPQueuePropMinRate and OFPQueuePropMaxRateFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-13nxm: fix nxm to OFPMatch conversionFUJITA Tomonori
This fixes a bug that the conversion ignores dl_dst. Soheil Hassas Yeganeh reported a problem about simple_isolation: The problem is that the isolation service tries to install flow-entries for a specific src and dst (in SimpleIsolation._modflow_and_send_packet), but instead the nx match code installs flow-entries only with src addresses and ignores the dst. So, when I boot multiple vms, only one of them is reachable. For instance, assume that you have two VM's A and B. When a packet comes from the gw to A, it installs "gw->A: A's port", but the acutal installed rule is "gw: A's port". This works for A, but, when you boot B, it tries to install "gw->B: B's port", but the acutal rule to be installed is "gw: B's port". So, it always connect the gateway to only one VM at a time. Reported-by: Soheil Hassas Yeganeh <soheil@cs.toronto.edu> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Soheil Hassas Yeganeh <soheil@cs.toronto.edu>
2012-07-13of1.2: fix OFPGroupMod serializeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-12of1.2: OFPSetField serializer pads too muchIsaku Yamahata
The calculation of padding size was wrong. Calculate correct padding size. Following the sample frame. 0000 00 23 5d 76 13 c2 00 26 b9 76 5c 81 08 00 45 00 0010 00 a4 43 8b 40 00 40 06 5e c0 ac 10 03 21 ac 11 0020 3c c6 19 e9 ae 7a 18 cf dd ef d7 26 45 ec 80 18 0030 00 7a 98 9f 00 00 01 01 08 0a 50 db 9e 5e 01 30 0040 7e 3d 03 0e 00 70 e4 f7 ea 88 Start of OF packet 00 00 00 00 00 00 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0060 00 00 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 flags 0070 00 00 pad 00 01 00 0c 80 00 00 04 00 00 00 01 00 00 type len oxm_header value ofp_match in_port Start of matching Start of OXM TLV 0080 00 00 00 04 00 30 00 00 00 00 type len pad[4] apply_actions start of instruction 00 19 00 18 type len start of set_field 80 00 oxm_header oxm class 0090 08 06 ETH_SRC 22 22 22 22 22 22 00 00 00 00 00 00 00 00 <--Wrong padding- 00a0 00 00 ----> 00 00 00 10 00 00 00 02 05 dc 00 00 00 00 type len port maxlen start of ofp_action_output 00b0 00 00 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-12of1.2: fix OFPPacketIn parserFUJITA Tomonori
We need two bytes padding right after the match. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-08of1.2: fix MTIPv6NdTargetFUJITA Tomonori
AttributeError: 'MTIPv6NdTarget' object has no attribute 'mask Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-08of1.2: fix OFPActionPopVlan parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-07of1.2: fix OFPActionSetField paddingFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-07of1.2: fix vlan_vid matchFUJITA Tomonori
Fix the following error: File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 1501, in serialize self.append_field(header, self.flow.vlan_vid, self.vlan_vid_mask) AttributeError: 'OFPMatch' object has no attribute 'vlan_vid_mask' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06app/rest: fix value error exceptionYoshihiro Kaneko
This patch fixes value error exception. The datapath-id is given in hex. > Traceback (most recent call last): > File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 438, > in handle_one_response > self.run_application() > File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 424, > in run_application > self.result = self.application(self.environ, self.start_response) > File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line > 130, in __call__ > resp = self.call_func(req, *args, **self.kwargs) > File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line > 195, in call_func > return self.func(req, *args, **kwargs) > File "/opt/stack/ryu/ryu/app/wsgi.py", line 81, in __call__ > return controller(req) > File "/opt/stack/ryu/ryu/app/wsgi.py", line 52, in __call__ > return getattr(self, action)(req, **kwargs) > File "/opt/stack/ryu/ryu/app/rest.py", line 104, in create > self.nw.create_port(network_id, int(dpid), int(port_id)) > ValueError: invalid literal for int() with base 10: '0000666a9c296241' Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: change IPv6 address representationFUJITA Tomonori
8H is more fitter than 4I for IPV6 address string representation. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: fix OFPActionSetFieldFUJITA Tomonori
Fix some alignment bugs. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: Correct pad calculation for OFPMatchSimon Horman
In the case where the match length is a multiple of 8 the pad should be 0. Previously a pad of 8 was used. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: fix OFPBucket parser and serialize methodsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: fix OFAActionCopyTtlOut and OFPActionCopyTtlIn's parsersFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: fix OFPActionSetFieldFUJITA Tomonori
Parse and serialize OXM TLV. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: remove match argument in MT* class serialize methodFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: add the common serialize method for MT* classesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: make MT* class make method take value and maskFUJITA Tomonori
- MT* class serialize method doesn't need match argument so we can use MT* class for set_field action nicely. - we can create the common serialize method for most of MT* classes Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: set value and mask in MT* instanceFUJITA Tomonori
Set value and mask that the parser gets. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: remove unused parser method in MT* classesFUJITA Tomonori
Some MT* classes need the own parser though. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: add common field_parser for MT* classesFUJITA Tomonori
Most of MT* classes can use this helper classmethod. We get value and mask values but don't set them to an instance. It's done later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-06of1.2: make pack_str class variableFUJITA Tomonori
So the parser classmethod can use it too. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-03test: add more of1.2 unittestsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-03of1.2: add missing struct ofp_bucket definitionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-03of1.2: implement FlowStats instruction parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-30Ryu 1.0FUJITA Tomonori
Bump the major version because: - Ryu fully support OpenFlow 1.0, Nicira Extensions, and OpenFlow 1.2. - Ryu was tested with various OpenFlow Hardware switches. - There is lots of improvement since the last release. Ryu is usable now so let's use the major version that implies so. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-30of1.2: add unittest workaround to OFPPortStatus parserFUJITA Tomonori
Add unittest workaround to OFPPortStatus parser. Another Option is defining something like OFP_PORT_STATUS_PACK_STR0, 'B'. I don't care much. Let's just do as we do with OF1.0. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-30of1.2: fix bugsFUJITA Tomonori
- typo in OFPQueueGetConfigRequest - OFPFlowRemoved offset - OFPActionDecMplsTtl and OFPActionDecNwTtl parsers Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-28add '--version' command line optionFUJITA Tomonori
Just output version information and exit. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-28of1.2: add OFPG_ constantsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-27of1.3: Add OFPQ_ALLSimon Horman
This is used in a queue statistics request to request statistics of all queues. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-27of1.2: Add OFPQ_ALLSimon Horman
This is used in a queue statistics request to request statistics of all queues. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-27test: improve the frameworkFUJITA Tomonori
run_test.sh: * run pylint on virtualenv to enforce version 0.25.0 for now. (because pylint 0.25.1 doesn't work due to a bug) * output pep8.log for Jenkins integration. pylint: * disable some noisy messages. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-27doc: add the supported OF versions to README.rstFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-27of1.2: add OFPFlowStats supportFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: fix OFPPacketIn parser to set ethernet frameFUJITA Tomonori
set ethernet frame in msg.data. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: improve OFPMatch parserFUJITA Tomonori
set type and length. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26nxm: fix NXM_NX_REGFUJITA Tomonori
Needs to handle NXM_NX_REG_W. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: add OXM_OF_IPV6_ND_SLL and OXM_OF_IPV6_ND_TLLFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: add OXM_OF_IPV6_ND_TARGETFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: add OXM_OF_ICMPV6_TYPE and OXM_OF_ICMPV6_CODEFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-06-26of1.2: add OXM_OF_IPV6_FLABELFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>