summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2015-02-16Move msg_pack_into from ofproto to libYAMAMOTO Takashi
A motivation of this change is a better modularity. I.e. Make packet lib independent from ofproto. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16tox.ini: Disable pep8 W503 for nowYAMAMOTO Takashi
Disable pep8 "W503 line break before binary operator" warning for now. The check was recently introduced by pep8 1.6.2. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15bgp/bmp: bug fix. remove redundant construction of path attributesISHIDA Wataru
BGPPathAttributeNextHop and BGPPathAttributeMpReachNLRI is already in new_pathattr. so stop construct and append it to new_pathattr list. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15Move the definitions of ether types and inet protocols to lib.packetYAMAMOTO Takashi
A motivation of this change is a better modularity. I.e. Make packet lib independent from ofproto. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15ofproto: Fix invalid error code OFPQCFC_EPERM -> OFPSCFC_EPERM (EXT-208)Shu Shen
Invalid error code OFPQCFC_EPERM should be OFPSCFC_EPERM instead. This is EXT-208 that was included in Openflow v1.3.1. OFPSCFC_EPERM is backported to ofproto_v1_2 so that any new or updated application could consistently use OFPSCFC_EPERM to handle all protocol versions. OFPQCFC_EPERM is left in ofproto_v1_2 and ofproto_v1_3 definitions for backward compatibility. Signed-off-by: Shu Shen <shu.shen@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-15ofproto: Openflow 1.5 support (work-in-progress)Shu Shen
Work done: - The baseline is copied over from ofproto_v1_4.py and ofproto_v1_4_parser.py and into ofproto_v1_5.py and ofproto_v1_5_parser.py respectively. - Most of structs, enums, and pack strings in ofproto_v1_5.py has been updated to spec. Exception is oxs_fields has not been done yet. - ofproto_v1_5_parser.py has not been updated except those necessary to allow run_tests.sh to complete successfully - ofproto_protocol.py imports ofproto_v1_5 and ofproto_v1_5_parser now - oxm_fields.py is updated for OFPXMC_PACKET_REGS - Tests are updated to include Openflow v1.5 when it's obvious. But not much work has been done to acutally test v1.5 yet. I also found tests for v1.4 are scarce. TODO: - Add oxs_fields support. It shall be similar to oxm_fields - Update and implement ofproto_v1_5_parser.py - More tests, tests, tests. Signed-off-by: Shu Shen <shu.shen@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08ignore some pep8 errors for nowFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08test_oxm: Add tests for EXT-109 and EXT-233YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08ofproto_v1_3: Implement EXT-109 and EXT-233YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08oxm_fields: Rename ONFExperimenter to OldONFExperimenterYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08oxm_fields: Update comment for the new version of EXT-256YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: support of new api for "show neighbor"Toshiki Tsuboi
You can understand adj-RIB-in information through new api. - received-routes : paths received and not withdrawn by given peer - sent-routes : paths sent and not withdrawn to given peer (sample log of show neighbor) INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['neighbor', 'received-routes', '192.168.101.101', 'all'], 'format': 'cli'} Status codes: x filtered Origin codes: i - IGP, e - EGP, ? - incomplete Timestamp Network Labels Next Hop Metric LocPrf Path 2015/02/06 06:52:04 192.168.1.0/30 None 192.168.101.101 100 None [65010] i 2015/02/06 06:52:04 192.168.2.0/30 None 192.168.101.101 100 None [65010] i 2015/02/06 06:52:04 0.0.0.0/0 None 192.168.101.101 100 None [65010, 65001] i Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: Fixed error in bgp implementation with single peerAlan Quillin
When a single peer is specified for BGPSpeaker the server value was not being set upon return. Signed-off-by: Alan Quillin <alanquillin@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-08bgp: fix bug of Path formatting in "show neighbor"Toshiki Tsuboi
The field of "Path" has not displayed in properly as bellow. It looks the raw data of Origin code has displayed instead. bgpd> show neighbor received-routes 192.168.101.101 all Status codes: x filtered Origin codes: i - IGP, e - EGP, ? - incomplete Timestamp Network Labels Next Hop Metric LocPrf Path 2015/02/05 07:39:05 192.168.1.0/30 None 192.168.101.101 100 None [65010] 2 2015/02/05 07:39:05 192.168.2.0/30 None 192.168.101.101 100 None [65010] 2 2015/02/05 07:39:05 0.0.0.0/0 None 192.168.101.101 100 None [65010, 65001] 2 Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-03Ryu 3.18FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-01bgp: bug fix of sending Adj-RIB-OutToshiki Tsuboi
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-30ryu-manager: add --enable-debugger optionSatoshi Kobayashi
Eventlet's monkey patch overwrite Python standard threading library by default. It affects to Python debugger working. This will be often an issue for the user of Python debugger. Therefore, it's necessary to add the option which doesn't overwrite Python standard threading library. Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp/cli: fix internel data destruction due to cli show commandISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: remove unnecessary bgp update constructionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: fix bug of NameError: global name 'sent_route' is not definedISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bmpstation: bug fix. stop closing fds which are in use.ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp: don't hold withdrawn routes in adj_rib_inISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26bgp/bmp: send unmodified BGPUpdate to bmp server.ISHIDA Wataru
Current implementation of bmp client uses Peer._construct_update() which modifies original BGPUpdate message for sending to peers. This function is not appropriate to use for bmp client, because bmp client must send a BGPUpdate message which contains unmodified path attributes. Fix this by introducing BMPClient._construct_update(). Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25Add parsing libpcap and reading/writing PCAP fileChe-Wei Lin
Add parsing libpcap and reading/writing PCAP file for debugging. Now you can easily dump the PCAP file in ryu controller. Here is the quick example for dumping the data packets: from ryu.lib import pcaplib class SimpleSwitch13(app_manager.RyuApp): OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION] def __init__(self, *args, **kwargs): super(SimpleSwitch13, self).__init__(*args, **kwargs) self.mac_to_port = {} # Creating an instance with a PCAP filename self.pcap_pen = Writer(open('mypcap.pcap', 'wb')) @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER) def _packet_in_handler(self, ev): msg = ev.msg # Dump the data packet into PCAP file self.pcap_pen.write_pkt(msg.data) Signed-off-by: Che-Wei Lin <linton.tw@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Avoid confusing StringifyMixinYAMAMOTO Takashi
Having class attributes and instance attributes of the same name confuses StringifyMixin. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Implement nx_action_learnYAMAMOTO Takashi
This is planned to be used for upcoming Neutron OVS agent changes. (https://blueprints.launchpad.net/neutron/+spec/ovs-ofctl-to-python) Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25test_nx_flow_spec: Add UTs for NX flow_mod_specYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Implement NX flow_mod_specYAMAMOTO Takashi
Will be used for NX learn implementation. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25type_desc: Separate type conversion classes from oxm_fieldsYAMAMOTO Takashi
Will be used for NX learn implementation. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25nx_actions: Remove redundant initializationsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-20Implement nx_action_reg_move for OpenFlow 1.3YAMAMOTO Takashi
Also, improve experimenter action related code so that it can handle unknown actions as unknown. Only OpenFlow 1.3 for now because this is planned to be used for Neutron OVS agent and 1.3 is the version to be used there. (https://blueprints.launchpad.net/neutron/+spec/ovs-ofctl-to-python) Following the style of oxm_fields, make an OpenFlow version independent module generate OpenFlow version specific code so that it's easier to add the functionality to other OpenFlow versions later. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-20doc/app/ofctl_rest: Add description for OFPAggregateStats messageYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-20ofctl_rest: support OFPAggregateStats messageYusuke Iwase
this patch makes ofctl_rest enable use of OFPAggregateStats message. Get aggregate flow stats: usage) URI: /stats/aggregateflow/<dpid> method: GET e.g.) $ curl -X GET http://localhost:8080/stats/aggregateflow/1 { "1": [ { "packet_count": 18, "byte_count": 756, "flow_count": 3 } ] } Get aggregate flow stats filtered by fields: usage) URI: /stats/aggregateflow/<dpid> method: POST the message body is as follows. table_id Table ID (int) out_port Require matching entries to include this as an output port (int) out_group Require matching entries to include this as an output group (int) cookie Require matching entries to contain this cookie value (int) cookie_mask Mask used to restrict the cookie bits that must match (int) match Fields to match (dict) e.g.) $ curl -X POST -d '{ "table_id": 0, "out_port": 2, "cookie": 1, "cookie_mask": 1, "match":{ "in_port":1 } }' http://localhost:8080/stats/aggregateflow/1 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-20doc/app/ofctl_rest: Add description for OFPQueueStats messageYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-20ofctl_rest: support OFPQueueStats messageYusuke Iwase
this patch makes ofctl_rest enable use of OFPQueueStats message. usage) URI: /stats/queue/<dpid> method: GET e.g.) $ curl -X GET http://localhost:8080/stats/queue/1 { "1": [ { "port_no": 1, "queue_id": 0, "tx_bytes": 0, "tx_packets": 0, "tx_errors": 0, "duration_sec": 4294963425, "duration_nsec": 3912967296 }, { "port_no": 1, "queue_id": 1, "tx_bytes": 0, "tx_packets": 0, "tx_errors": 0, "duration_sec": 4294963425, "duration_nsec": 3912967296 } ] } NOTE: The "duration_sec" and "duration_nsec" fields are for OF1.3(or later). Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19test_oxm: Add UTs for 64-bit experimenter OXMsYAMAMOTO Takashi
Following Open vSwitch, introduce "dp_hash" OXM for testing. >From their commit log: (commit 508a933809f8a8ede4fb93f1c1e3212799efc16a) > Testing experimenter OXM is tricky because I do not know of any in > widespread use. Two ONF proposals use experimenter OXMs: EXT-256 and > EXT-233. EXT-256 is not suitable to implement for testing because its use > of experimenter OXM is wrong and will be changed. EXT-233 is not suitable > to implement for testing because it requires adding a new field to struct > flow and I am not yet convinced that that field and the feature that it > supports is worth having in Open vSwitch. Thus, this commit assigns an > experimenter OXM code point to an existing OVS field that is currently > restricted from use by controllers, "dp_hash", and uses that for testing. > Because controllers cannot use it, this leaves future versions of OVS free > to drop the support for the experimenter OXM for this field without causing > backward compatibility problems. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19test_oxm: dedicated UTs for oxm_fields moduleYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19oxm_fields: Fix 64-bit experimenter OXM supportYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19oxm_fields: Fix oxm_length calculation for experimenter OXMsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19oxm_fields: Add header-only variants of serializer/parserYAMAMOTO Takashi
These will be used for coming REG_MOVE support. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19oxm_fields: Prefix internal functions with _ for readabilityYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19oxm_fields: Add commentsYAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19OF 1.0: Use ofproto_common.NX_EXPERIMENTER_ID instead of NX_VENDOR_IDYAMAMOTO Takashi
And remove now unused NX_VENDOR_ID. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19nicira_ext: Separate the most of NX definitions from ofproto_v1_0YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19Cleanup isinstance(foo, (int, long))YAMAMOTO Takashi
Use numbers where appropriate. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-19doc/app/ofctl_rest: Add descriptions for duration_nsec fieldYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-13of_v1_0: Fixed the flow format logic to set it correctly when registers ↵Alan Quillin
matches are set Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-13of_v1_0: Added support for the NXM_NX_TUN_IPV4_{SRC & DST}[_W] fieldsAlan Quillin
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-13ospf: fix wrong OSPF LSA typeISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-13bgp: support of understanding assigned mpls-label for prefix_add in vpnv4Toshiki Tsuboi
Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>