summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2012-08-28packet lib: add udp data transmit and checksum supportFUJITA Tomonori
- UDP supports sending data. - UDP calculates the checksum if not given. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-28packet lib: add packet_utils.pyFUJITA Tomonori
Add a helper function to calculate the checksum. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-28packet lib: add data serialize support to Packet classFUJITA Tomonori
This enables you to send data with Packet class. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-28packet lib: calculate the udp lengthFUJITA Tomonori
If the length is not given, calculate it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-28packet lib: calculate the ip total lengthFUJITA Tomonori
If the total length is not given, calculate it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-28packet lib: serialize in reverse orderFUJITA Tomonori
- we need to serialize in reverse order since some need to know payload. - TCP and UDP need the previous protocol info (IP) to calculate the checksum. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-27of1.2: fix OFPFlowRemoved parserFUJITA Tomonori
Fix the following: ryu/ofproto/ofproto_v1_2_parser.py", line 1701, in parser type_, length = struct.unpack_from('!HH', buf, offset) TypeError: unpack_from() argument 1 must be string or read-only buffer, not bytearray Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-27of1.2: fix ofp_port_stats pack formatFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-23test: fix pep8 1.3.3 warningsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-22fix pep8 1.3.3 warningsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-22test: use the latest version of pep8FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-21add packet libraryFUJITA Tomonori
As discussed on the mailing list, there is no good packet library (parses and builds various protocol packets). dpkt isn't flexible enough (can't nicely handle stacked protocols such as vlan, mpls, gre). NOX's one is nice but released under GPL3. So we need our own packet library. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-20controller: print backtrace when exception in addition to stacktraceIsaku Yamahata
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>
2012-08-20test: add stats and config tests to integrated test suiteFUJITA Tomonori
Run this in the following way: $ ryu-manager ryu/ryu/tests/integrated/test_request_reply_v12.py Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-08-10of: Fix OFPEchoRequest serializeFUJITA Tomonori
The spec allows zero-length data. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
2012-08-06of1.2: pretty OFPGetConfigReply parserFUJITA Tomonori
Make OFPGetConfigReply parser consistent with the rest Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-31clean up ETH_TYPE_ constantsFUJITA Tomonori
Use ofproto/ether.py Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-31add ethernet type constantsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-31test: fix SET_NW_TOS action in test_add_flow_v10FUJITA Tomonori
The lowest two bits must be zero. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Simon Horman <horms@verge.net.au>
2012-07-31clean up IPPROTO_ constantsFUJITA Tomonori
Use ofproto/inet.py. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-31add IPPROTO_SCTP constantFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-31rename ryu/ofproto/in.py to ryu/ofproto/inet.pyFUJITA Tomonori
Avoid a reserved word. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-31test: specify OF version in integrated test suiteFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-30Add SubmittingPatches docFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-30Ryu 1.1FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-30of1.2: handle unknown match field properlyFUJITA Tomonori
Ryu crashes when it finds an unknown match field in OFPMatch. Instead, Ryu should just ignore it and continue to parse. With this patch, Ryu uses OFPmatchField class for an unknown match field and continue to parse. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Tested-by: Simon Horman <horms@verge.net.au>
2012-07-28test: simplify integrated OVS test suiteFUJITA Tomonori
This patch simplifies integrated OVS test suite. Currently, we wait for a barrier response before moving to the next test. However, we don't need. The logic works like the following: sending a flow mod (deleting all the flows) sending a barrier sending a flow mod (set up a flow to test) sending a barrier sending a flow stats Then the reply handler for flow stats verifies the result and move to the next. You can run a test suite like: $ ryu-manager ~/git/ryu/ryu/tests/integrated/test_add_flow_v12_actions.py We can try two more suites: ryu/tests/integrated/test_add_flow_v10.py ryu/tests/integrated/test_add_flow_v12_matches.py Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-26test: add more of1.2 unittestsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-26of1.2: fix IPv6 match parsersFUJITA Tomonori
Fix the folloing problem in MTIPv6Src, MTIPv6Src, MTIPv6Dst, and MTIPv6NdTarget's parsers: File "/home/openflow/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 1705, in parser field = OFPMatchField.parser(buf, offset) File "/home/openflow/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 1934, in parser field = cls_.field_parser(header, buf, offset) File "/home/openflow/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 1949, in field_parser (value,) = struct.unpack_from(cls.pack_str, buf, offset + 4) ValueError: too many values to unpack Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-25of1.2: make set_metadata implementation consistent with the restFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-25of1.2: fix OFPExperimenter parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-24of1.2: fix Instruction parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-24of1.2: add OXM_OF_METADATA supportSimon Horman
Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-20fix 475ca44ef4f87b00945ccd5be8ee4ab196c4e86f regressionFUJITA Tomonori
Needs __init__.py Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-20test: add integrated OVS test suiteFUJITA Tomonori
This patch adds a test framework with OVS to test various matches and actions; adding various matches and actions and check `ovs-ofctl dump-flows' output. First, create 'br-tester' bridge: fujita@rose:~$ sudo ovs-vsctl add-br br-tester Secondly, configure the bridge to use the local controller: fujita@rose:~$ sudo ovs-vsctl set-controller br-tester tcp:127.0.0.1 Thirdly, run what you want to test. If you want to try adding flows on OF1.0: fujita@rose:~$ ryu-manager --verbose --run_test_mod ryu.tests.integrated.test_add_flow_v10 ryu.tests.integrated.tester This patch adds three test sets: ryu.tests.integrated.test_add_flow_v10 ryu.tests.integrated.test_add_flow_v12_actions ryu.tests.integrated.test_add_flow_v12_matches Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-19of1.2: fix OFPPortStatsRequest typoFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-19of1.2: OFPGroupMod and OFPGroupFeaturesStatsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-19simple_switch: remove outside module dependenceFUJITA Tomonori
simple_switch is a a learing material (who uses this in production?). It should be the simple learning switch code like one in OpenFlow tutorial. It's easier for learniners if simple_switch doesn't use the outside modules. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-07-18cbench: specify OF1.0FUJITA Tomonori
cbench works with only OF1.0 and OF1.0 provides all cbench needs. So specify OF1.0. Also it doesn't need nxm so use OFPMatch and OFPFlowMod. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp>
2012-07-18simple_switch: specify OF1.0FUJITA Tomonori
simple_switch works with only OF1.0 and OF1.0 provides all simple_switch needs. So specify OF1.0. simple_switch doesn't need nxm so use OFPMatch and OFPFlowMod (and avoid the helper functions). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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>