summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib
AgeCommit message (Collapse)Author
2016-11-14packet/bgp: Refactor MP_REACH_NLRI and MP_UNREACH_NLRIIWASE Yusuke
This patch refactors MP_REACH_NLRI and MP_UNREACH_NLRI path attribute classes to support IPv6 unicast and Labeled VPNv6 unicast routes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-14lib/ip: Add method to convert IPv4/IPv6 to intIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-11-11packet/bgp: Enable Extended Length flags if specifiedIWASE Yusuke
Currently, the Extended Length flag in path attributes is evaluated only when the length exceeds 1 byte (max 255) field. This patch enables this flags if explicitly specified. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-29packet/bgp: Add PMSI Tunnel AttributeShinpei Muraoka
This patch adds the support for BGP PMSI Tunnel Attribute [RFC6514]. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-29packet/vxlan: Add method to convert the format of vniShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-29packet/mpls: Add method to convert the format of labelShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-29lib/ip: Add method to convert the format of Ipv4 or Ipv6Shinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Fix API for parsing column/key/value setIWASE Yusuke
Currently, VSCtlContext.parse_column_key_value() method fails to parse "<column>:<key>=<value>" formatted str, which indicates a "map" type column. So some implementation to set "map" type column have avoided this bug with "<column>=<key>=<value>" formatted str (not ":"). This patch fixes this problem and enable to parse the correct format value. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing Controller commands in OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing Port commands in OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing Interface commands in OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing Bridge commands in OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Sort out commands orderIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/bridge: Add APIs for missing Database commandsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl remove commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl add commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl list commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Add API corresponding to ovs-vsctl add-bond commandIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Update command list with OVS v2.6.0IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Avoid applying next() to non-iterator objectIWASE Yusuke
In Python 2, the builtin function next() can not be applied to non-iterator object. This patch fixes to use the list comprehensions and avoid applying next() to a list type object. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Add missing required argument for find_vlan_bridgeIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Reduce pylint warningsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs: Revert ovs module pathIWASE Yusuke
Because contrib.ovs has been removed, we no longer need to update the path for loading ovs module. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Fix VSCtlCommand to inherit StringifyMixinIWASE Yusuke
For convenience when printing command results, this patch fixes VSCtlCommand to inherit StringifyMixin. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vswitch_idl: Update OVSDB schema with v7.14.0IWASE Yusuke
This patch regenerates OVSDB schema with vswitchd/vswitch.ovsschema v7.14.0 included in OVS v2.6.0 release. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-25ovs/vsctl: Change log level of redundant messagesIWASE Yusuke
Currently, ovs.vsctl outputs the messages (e.g. just "unchanged" or "success") in the "info" log level for each transaction, but these messages are not meaningful for users. This patch changes the log level of these messages to "debug". Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-08ryu/lib/ofctl_v1_3: port name decoding fixMichał Rzepka
The patch resolves issue experienced when decoding certain values of name field in OFPMP_PORT_DESCRIPTION body. Non-decodable bytes are replaced with utf-8 replacement character. This issue was observed while retrieving OFPMP_PORT_DESC reply from OpenFlow 1.3 compliant HP switch. One of ofp_struct structures describing OFPP_LOCAL port has a name field with value 4f 46 50 50 5f 4c 4f 43 41 4c 00 81 ff ff ff ff that translates to OFPP_LOCAL....... Attempt to decode the value, as in modified line, raises an exception "UnicodeDecodeError: 'utf8' codec can't decode byte 0x81 in position 11: invalid start byte". In the submitted patch, non-decodable characters are replaced with utf-8 REPLACEMENT CHARACTER (U+FFFD), which is sufficient for the get_port_desc method to work seamlessly. Similar usages of str.decode method may be found in ofctl_v1_3, ofctl_v1_4, ofctl_v1_5 and need to be fixed in the future. Signed-off-by: Michal Rzepka <mrzepka@student.agh.edu.pl> Reviewed-by: Iwase Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01packet: Avoid parsing an empty bufferIWASE Yusuke
For example, the packet library detects the TCP payload type by using the TCP src/dst port, but in case of the BGP packet, the packet library will try to parse a TCP ACK packet as a BGP packet, and will fail to parse. This patch enables to ignore an empty buffer and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Enable to request tunnel port numberIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Add utility method to create VXLAN portIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/bridge: Make local_ip to optional field for tunnelIWASE Yusuke
To create GRE tunnel, the local_ip field is not mandatory field. This patch makes the local_ip field to optional for the convenience. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01ovs/vsctl: Catch the default tag type in Port TableIWASE Yusuke
According to ovs-vswitchd.conf.db(5), the tag column is an integer in range 0 to 4095, but OVS may returns the empty list [] as the default value. OTOH, Ryu expects an integer type as the default and fails to get the port information in the table. This patch enables to catch the empty list as the default and fixes this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01stplib: Fix to store current OFPPort statusShinpei Muraoka
Currently, stplib compares the status of OFPPortStatus message with that of Datapath instance, but this comparison returns always "equal", so stplib fails to get the correct port status. This patch fixes to store the current port status and to compare the new status with the stored status. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-10-01stplib: Fix to compare MAC address and Bridge IDShinpei Muraoka
cmp() func was introduced for Python 3 compatibility before, but this implementation is not enough, because a MAC address can not be compared with a Bridge ID (integer value) by com() func. This patch fixes to convert the MAC address into an integer value before comparing with Bridge ID and fixes this problem. Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Extend to advertise VNI for EVPN routesIWASE Yusuke
This patch enables to advertise VNI as MPLS lables field in the MAC/IP Advertisement Route of EVPN. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07BGPSpeaker: Support to advertise Tunnel EncapsulationIWASE Yusuke
This patch adds support to advertise the BGP Tunnel Encapsulation Attribute for the Ethernet VPN Routes. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07packet/bgp: Add BGP Encapsulation Extended CommunityIWASE Yusuke
This patch adds the support for BGP Encapsulation Extended Community [RFC5512]. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07add modify role API in ofctl_resttungyueh
add description about role API Signed-off-by: tungyueh <tylin.cs03g@nctu.edu.tw> Reviewed-by: Iwase Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-09-07lib/ofctl_v1_4: correct argument order for OFPFlowMod constructorMichał Rzepka
Invalid OFPFlowMod flag and importance values were observed when using app/ofctl_rest. This patch restores the proper order of arguments passed to OFPFlowMod constructor in mod_flow_entry (ofctl_v1_4.py). Signed-off-by: Michal Rzepka <mrzepka@student.agh.edu.pl> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25BGPSpeaker: Support Ethernet VPN update messagesIWASE Yusuke
This patch enables BGPSpeaker to advertise BGP EVPN routes and store the advertised BGP EVPN routes from the neighbors. TODO: - To support the VRF table for BGP EVPN routes. This patch supports the global table only. - To implement Multihoming Functions. Currently, ONLY Single-Homing is supported. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Fix to serialize BGPNotification on Python3IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Support MPLS-Based Ethernet VPN (RFC7432)IWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25packet/bgp: Enable to parse the entire packet dataIWASE Yusuke
This patch fixes the TCP packet parser to return the BGP packet parser class if the TCP src or dst port is the reserved BGP port and enable to parse the entire packet data. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-25lib/packet: Support the Json format dataShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-19lib: Reduce Pylint warningsIWASE Yusuke
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-19stringify: Fix to utilise six.moves.builtinsIWASE Yusuke
To improve Pylint results, this patch fixes to utilise six.moves.builtins instead of using __builtin__ on Python2 or builtins on Python3. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-19ofctl_nicira_ext: Fix not enough arguments for format stringIWASE Yusuke
Currently, the assignment for 'table_id' is missing in the arguments of str representation. 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>
2016-08-19ofctl_nicira_ext: Resolve not initialized valuesIWASE Yusuke
Currently, 'dst_start_end' and 'src_start_end' in NXActionLearn are not initialized before assignment to convert into string representation. 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>
2016-07-29packet lib: Add packet library of GREShinpei Muraoka
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-27stplib: Handle the port state not changed eventsIWASE Yusuke
According to OpenFlow Spec 1.3.5, OFPT_PORT_STATUS messages with the reason value OFPPR_MODIFY should be sent the BOTH port state and config have changed. On the other hand, OVS does not send OFPT_PORT_STATUS messages when the port config has changed and only sends when the port state has changed. But, other switch implementation, e.g. Lagopus, sends messages when the both port state and config have changed. Therefore, simple_switch_stp_13.py will overproduce the topology recalculation events and will fail to recalculate the topology. This patch checks the port state in OFPT_PORT_STATUS messages and ignores the message if the port state is not changed. Reported-by: Hong Panha <c011361065@edu.teu.ac.jp> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>