summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
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>
2015-01-13ofctl_v1_0/2/3: Fix unsuitable log levelMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-05Ryu 3.17FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-31ospf: add SummaryLSA classISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-28ofctl_v1_2, 3: Fix regression of IP arbitrary bitmask supportFUJITA Tomonori
Reported-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Wei-Li Tang <alextwl@xinguard.com>
2014-12-28bgp: bug fix of timestamps of BMPRouteMonitoring in bmp.pyToshiki Tsuboi
It looks “timestamps” of BMPRouteMonitoring incorrect, in case of using ryu.app.bmpstation.py. (1) BMPPeerUpNotification -> timestamp=1419540815.870563 (Fri Dec 26 05:53:35 2014) (2) BMPRouteMonitoring -> timestamp=1419573216.0 (Fri Dec 26 14:53:36 2014) ryu_bmp.log ----------------- 2014 Dec 26 06:44:51 | 192.168.0.101 | BMPInitiation(info=[{'type': 0, 'value': u'This is Ryu BGP BMP message', 'len': 27}],len=37,type=4,version=3) 2014 Dec 26 06:44:51 | 192.168.0.101 | BMPPeerUpNotification(is_post_policy=False,len=162,local_address='192.168.201.101',local_port=58925,peer_address='192.168.201.1',peer_as=65001,peer_bgp_id='10.0.0.1',peer_distinguisher=0,peer_type=0,received_open_message=BGPOpen(bgp_identifier='10.0.0.1',hold_time=180,len=53,my_as=65001,opt_param=[BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=1,type=2), BGPOptParamCapabilityCiscoRouteRefresh(cap_code=128,cap_length=0,length=2,type=2), BGPOptParamCapabilityRouteRefresh(cap_code=2,cap_length=0,length=2,type=2), BGPOptParamCapabilityFourOctetAsNumber(as_number=65001,cap_code=65,cap_length=4,length=6,type=2)],opt_param_len=24,type=1,version=4),remote_port=179,sent_open_message=BGPOpen(bgp_identifier='10.0.1.1',hold_time=40,len=41,my_as=65002,opt_param=[BGPOptParamCapabilityMultiprotocol(afi=1,cap_code=1,cap_length=4,length=6,reserved=0,safi=1,type=2), BGPOptParamCapabilityRouteRefresh(cap_code=2,cap_length=0,length=2,type=2)],opt_param_len=12,type=1,version=4),timestamp=1419540815.870563,type=3,version=3) 2014 Dec 26 06:44:51 | 192.168.0.101 | BMPRouteMonitoring(bgp_update=BGPUpdate(len=54,nlri=[BGPNLRI(addr='192.168.0.0',length=24)],path_attributes=[BGPPathAttributeNextHop(flags=64,length=4,type=3,value='192.168.201.101'), BGPPathAttributeOrigin(flags=64,length=1,type=1,value=2), BGPPathAttributeAsPath(flags=64,length=6,type=2,value=[[65002, 65001]]), BGPPathAttributeMultiExitDisc(flags=128,length=4,type=4,value=100)],total_path_attribute_len=27,type=2,withdrawn_routes=[],withdrawn_routes_len=0),is_post_policy=True,len=102,peer_address='192.168.201.1',peer_as=65001,peer_bgp_id='10.0.0.1',peer_distinguisher=0,peer_type=0,timestamp=1419573216.0,type=0,version=3) Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-28topology/switches: add of1.2+ support for the drop_packet function.Wei-Li Tang
Signed-off-by: Wei-Li Tang <alextwl@xinguard.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-22bgp: Fix filter message variableJerry Cen
Signed-off-by: Jerry Cen <zhiweic@google.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-18bgp: support New best path selectingToshiki Tsuboi
In case of selecting new best path, Ryu BGPSpeaker send withdraw messages. Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-11ofctl_rest: Fix clear flow entries commandYusuke Iwase
Currently, clear flow entries command (/stats/flowentry/clear/<dpid>) in ofctl_rest deletes flow entries from only table 0. This patch fixes the command to delete flow entries from all tables. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-08rest_qos: fix error of additional a qos rule with "priority"Minoru TAKAHASHI
Currently, rest_qos is impossible to set the "priority" of QoS rule on a switch. Also, "priority" is should be described in the same depth as "match" and "actions". This patch fixes these problems. Now, rest_qos is possible to set the "priority" with the following curl command. e.g.) $ curl -X POST -d '{"priority":"5", "match": {"nw_dst": "10.0.0.1", "nw_proto": "UDP", "tp_dst": "5002"}, "actions":{"queue": "1"}}' http://localhost:8080/qos/rules/0000000000000001 Reported-by: Jace Liang <b436412@gmail.com> Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-08rest_qos: fix a commentMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-07bgp: support new handler in case of changing BGP sessionToshiki Tsuboi
When BGP session goes up/down, BGPSpeaker can detect changing the session. Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-05doc/app/ofctl_rest: Add description for capabilities field in OPFMeterFeaturesYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-05ofctl_v1_3: Fix to parse capabilities field in OPFMeterFeaturesYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-05ofproto_v1_[234]_parser: Add notes for vlan_vid match fieldYusuke Iwase
To make it possible to refer the usage of vlan_vid match field at Ryu-documentation, This patch adds notes into ofproto_v1_[234]_parser. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-02Ryu 3.16FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-30packet lib: don't crash with bogus ospf packetFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-30bmp: bug fix of peer bgp ID in BMP MessageYuji Oshima
Ryu BGP sets self-BGP ID as Peer BGP ID in BMP Message. Signed-off-by: Yuji Oshima <yuji.oshima0x3fd@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-29doc/app/ofctl_rest: Add command examples for OFPVID_NONE/PRESENTMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-29ofctl_v1_2/3: Fully support the match combinations for VLAN IDMinoru TAKAHASHI
Currently, when VLAN ID match field is specified, ofctl_v1_[23] is compatible with only match combination 1) of the following three match combinations. This patch makes it possible to set the all three combinations. Match combinations for VLAN ID : 1) To match only packets with VLAN tag and VID equal value 2) To match only packets without a VLAN tag 3) To match only packets with a VLAN tag regardless of its value In order to set the match combinations 2) or 3), please describe "dl_vlan" field as hexadecimal string value like as follows. Before applying this patch: {"dl_vlan": 3 } # int After applying this patch: {"dl_vlan": 3 } # int (same as before applying) {"dl_vlan": "0x0000"} # hexadecimal string without mask {"dl_vlan": "0x1000/0x1000"} # hexadecimal string with mask NOTE: When "dl_vlan" field is described as decimal int value, OFPVID_PRESENT(0x1000) bit is automatically applied. OTOH, OFPVID_PRESENT(0x1000) bit is NOT automatically applied to hexadecimal string value. For curl command examples, please refer to the following page in Ryu-documentation. http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#example-of-vlan-id-match-field Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-26fix security problem of some RESTful appsYusuke Iwase
I'm very sorry I didn't include rest_firewall.py and rest_qos.py in my patch. I suggested for ofctl_rest.py only... Here is the patch for rest_firewall.py and rest_qos.py. --------------------------------------------------------------- Subject: [PATCH] fix security problem of some RESTful apps It is not safe to use eval function because input data(request body) is not checked For example, someone can send this data to remove all files in the directory "import('os').system('rm -rf .')" I suggest to use json.loads to parse the request body if the data is json format or disable builtin functions like: eval(req.body, {"__builtins__":None}) Signed-off-by: Takeshi <a86487817@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-25Workaround of os.path.samefileChris Small
os.path.samrfile not implemented on Windows. Adding alternative using os.stat Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-25test_ofctl: Modify to use new match api and field parserYusuke Iwase
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-25ofctl_v1_/2/3: Modify to_match() to use new match apiYusuke Iwase
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-25ofctl_v1_/2/3: Modify match_to_str() to use new match field parserYusuke Iwase
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-25bgp: bug fix of handling nexthop for eBGP peeringToshiki Tsuboi
RyuBGP doesn't work properly becase of handling wrong nexthop address. Therefore, in spite of receiving BGP UPDATE Message in the peering router, the router fails to learn a new route entry from RyuBGP in BGP table. (Memo: this issue has not occurred in Vpnv4/mpBGP environment.) (1) register route entry as prefix_add(prefix='x,x,x,x', next_hop='y.y.y.y') static eBGP ------- R1 ------------ RyuBGP ---------> Router x.x.x.x y.y.y.y z.z.z.z => Drop UPDATE(Nexthop: y.y.y.y) (2) receiving BGP UPDATE Message from iBGP session iBGP eBGP ------- R1 -----------> RyuBGP ---------> Router x.x.x.x y.y.y.y z.z.z.z => Drop UPDATE(Nexthop: y.y.y.y) Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-07test_utils: Add unit test for ryu.utilsYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-07utils: Fix bytearray conversionYusuke Iwase
The parameter buf is an instance of bytearray, but Ryu tries to convert it as string, and outputs the error messages as a result. This patch fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-18test_ofctl_v1_2/3: Add a test case of masked metadataMinoru TAKAHASHI
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-18test_ofctl_v1_2/3: Fix some test casesMinoru TAKAHASHI
UnitTest of the following cases had not been executed successfully. {'dl_src/dst': "aa:bb:cc:11:22:33/*"} {'eth_src/dst': "aa:bb:cc:11:22:33/*"} {'nw_src/dst': "192.168.0.1/*", 'eth_type': 0x0800} {'ipv4_src/dst': "192.168.0.1/*", 'eth_type': 0x0800} {'arp_spa/tpa': "192.168.0.22/*", 'eth_type': 0x0806} {'arp_sha/tha': "aa:bb:cc:11:22:33/*", 'eth_type': 0x0806} {'ipv6_src/dst': '2001::aaaa:bbbb:cccc:1111/*', 'eth_type': 0x86dd} This patch fixes this problem. Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-18bgp: bug fix of Multi Exit Discriminator (MED)Toshiki Tsuboi
RyuBGP doesn't work well regarding the advertisement of BGP MED Attribute as follows. (1) In spite of receiving BGP MED:"500" from iBGP(R2), RyuBGP can't advertise BGP MED:"100" to eBGP(R3). R1 -------------> R2 -------------> RyuBGP -------------> R3 eBGP(MED:500) iBGP(MED:500) ^ eBGP(MED:500) (MED:100) (2) When RyuBGP has received BGP MED:"200" from eBGP(R3), RyuBGP has sended BGP with missing-MED to iBGP(R2). As result, PolicyBaseRouting in R2(other RyuBGP) doesn't work properly becase of selecting wrong BestPath. eBGP(MED:100) R1 ------------------------------------>+ | R3 -------------> RyuBGP -------------> R2(RyuBGP) => Wrong result [BestPath is "R3-R2"] eBGP(MED:200) iBGP(MED:N/A) Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-18ofctl_rest: fix some mistypesPalubinskas Vilius
In ryu/app/ofctl_rest.py found some mistypes. Error gets when using stats/groupdesc/<dpid> and /stats/groupfeatures/<dpid> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-17doc/app/ofctl_rest: Correct command examplesYusuke Iwase
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>