summaryrefslogtreecommitdiff
path: root/tests/tunnel-push-pop-ipv6.at
Commit message (Collapse)AuthorAgeFilesLines
* userspace: Handling of versatile tunnel portsBen Pfaff2017-06-271-2/+2
| | | | | | | | | | In netdev_gre_build_header(), GRE protocol and VXLAN next_potocol is set based on packet_type of flow. If it's about an Ethernet packet, it is set to ETP_TYPE_TEB. Otherwise, if the name space is OFPHTN_ETHERNET, it is set according to the name space type. Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* userspace: Add OXM field MFF_PACKET_TYPEJan Scheurich2017-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Allow packet type namespace OFPHTN_ETHERTYPE as alternative pre-requisite for matching L3 protocols (MPLS, IP, IPv6, ARP etc). Change the meta-flow definition of packet_type field to use the new custom format MFS_PACKET_TYPE representing "(NS,NS_TYPE)". Parsing routine for MFS_PACKET_TYPE added to meta-flow.c. Formatting routine for field packet_type extracted from match_format() and moved to flow.c to be used from meta-flow.c for formatting MFS_PACKET_TYPE. Updated the ovs-fields man page source meta-flow.xml with documentation for packet-type-aware bridges and added documentation for field packet_type. Added packet_type to the matching properties in tests/ofproto.at. If dl_type is unwildcarded due to later packet modification, make sure it is cleared again if the original packet_type was not PT_ETH. Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* userspace: L3 tunnel support for GRE and LISPJan Scheurich2017-06-021-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean "layer3" configuration option for tunnel vports. The layer3 option defaults to false for all ports except LISP. GRE ports accept both true and false for "layer3". A tunnel vport configured with layer3=true receives L3 packets. which are then converted to Ethernet packets by pushing a dummy Ethernet heder at the ingress of the OpenFlow pipeline. The Ethernet header of a packet is stripped before sending to a layer3 tunnel vport. Presently a single GRE vport cannot carry both L2 and L3 packets. But it is possible to create two GRE vports representing the same GRE tunel, one with layer3=false, the other with layer3=true. L2 packet from the tunnel are received on the first vport, L3 packets on the second. The controller must send packets to the layer3 GRE vport to tunnel them without their Ethernet header. Units tests have been added to check the L3 tunnel handling. LISP tunnels are not yet supported by the netdev userspace datapath. Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Co-authored-by: Zoltan Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* userspace: Switching of L3 packets in L2 pipelineJan Scheurich2017-06-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ports have a new layer3 attribute if they send/receive L3 packets. The packet_type included in structs dp_packet and flow is considered in ofproto-dpif. The classical L2 match fields (dl_src, dl_dst, dl_type, and vlan_tci, vlan_vid, vlan_pcp) now have Ethernet as pre-requisite. A dummy ethernet header is pushed to L3 packets received from L3 ports before the the pipeline processing starts. The ethernet header is popped before sending a packet to a L3 port. For datapath ports that can receive L2 or L3 packets, the packet_type becomes part of the flow key for datapath flows and is handled appropriately in dpif-netdev. In the 'else' branch in flow_put_on_pmd() function, the additional check flow_equal(&match.flow, &netdev_flow->flow) was removed, as a) the dpcls lookup is sufficient to uniquely identify a flow and b) it caused false negatives because the flow in netdev->flow may not properly masked. In dpif_netdev_flow_put() we now use the same method for constructing the netdev_flow_key as the one used when adding the flow to the dplcs to make sure these always match. The function netdev_flow_key_from_flow() used so far was not only inefficient but sometimes caused mismatches and subsequent flow update failures. The kernel datapath does not support the packet_type match field. Instead it encodes the packet type implictly by the presence or absence of the Ethernet attribute in the flow key and mask. This patch filters the PACKET_TYPE attribute out of netlink flow key and mask to be sent to the kernel datapath. Signed-off-by: Lorand Jakab <lojakab@cisco.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com> Co-authored-by: Zoltan Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Revert "tunneling: Avoid recirculation on datapath."Joe Stringer2017-05-101-5/+5
| | | | | | | | | | | | | | | | | | | This reverts commit f1dac5128ce6db2e493f0d1c7a8b53fb9f34476f. When this commit was introduced, it broke the 'make check-system-userspace' testsuite. It appears that the new translation fails to modify the flow in a way that would represent the flow as an encapsulated flow when the traffic is patched through to the second bridge. As such, rather than matching on, for example, "ip,proto=47" for gre, it would use the inner packet's flow headers. It also results in problems reporting statistics, as the tunnel's header is not reflected in subsequent statistics and truncation is not properly applied during translation. While a refreshed approach to solving the above problem is formed, revert this patch. Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-May/331972.html Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Greg Rose <gvrose8192@gmail.com>
* tunneling: Avoid recirculation on datapath.Sugesh Chandran2017-04-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Open vSwitch datapath recirculates packets for tunneling, i.e. the incoming packets are encapsulated at first pass. Further actions are applied on encapsulated packets on the second pass after recirculating. The proposed patch compute and append the post tunnel actions at the time of translation itself instead of recirculating at datapath. These actions are solely depends on tunnel attributes so there is no need of datapath recirculation. By avoiding the recirculation at datapath, the patch offers up to 30% performance improvement for VXLAN tunneling in our testing. The action execution logic is using the new CLONE action to define the packet cloning when the actions are combined. The length in the CLONE action specifies the size of nested action set. It also fixing the testsuite failures that are introduced by nested CLONE action in tunneling. Signed-off-by: Sugesh Chandran <sugesh.chandran@intel.com> Signed-off-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Co-authored-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* openvswitch: Allow external IPsec tunnel management.Pravin B Shelar2016-09-271-1/+1
| | | | | | | | | | | | | | | | | | OVS GRE IPsec tunnel support has multiple issues, Therefore it was deprecated in OVS 2.6. Following patch removes support for GRE IPsec and allows external IPsec tunnel management for any type of tunnel not just GRE. e.g. user can encrypt Geneve or VxLan traffic. It can be done by using openflow pipeline to set skb-mark and using IPsec keying daemons to implement IPsec tunnels. This packet can be matched for the skb-mark to encrypt selective tunnel traffic. VMware-BZ: 1710701 Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ansis Atteka <aatteka@ovn.org>
* tests: Avoid race in tunnel-push-pop tests.Jesse Gross2016-08-181-1/+1
| | | | | | | | | | These tests dump the flows currently in the datapath but they aren't the first to run and might have existing flows left over. We don't really care if there are others flows present so filter on the ones we want to avoid being affected by the timing of flow eviction. Signed-off-by: Jesse Gross <jesse@kernel.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* netdev-dummy: Add dummy-internal class.Daniele Di Proietto2016-08-151-2/+2
| | | | | | | | | | | | | | | | | | "internal" netdevs are treated specially in OVS (e.g. for MTU), but the dummy datapath remaps both "system" and "internal" devices to the same "dummy" netdev class, so there's no way to discern those in tests. This commit adds a new "dummy-internal" netdev type, which will be used by the dummy datapath for internal ports, so that other parts of the code can understand which ports are internal just by looking at the netdev object. The alternative solution, using the original interface type ("internal") instead of the translated netdev type ("dummy"), is harder to implement, because in so many places only the netdev object is available. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
* tests: Fix tunnel push pop test failure.Pravin B Shelar2016-05-111-3/+1
| | | | | | | Sort the list of arp entries to get predictable output. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* Add support for extended netdev statistics based on RFC 2819.mweglicx2016-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of new statistics extension for DPDK ports: - Add new counters definition to netdev struct and open flow, based on RFC2819. - Initialize netdev statistics as "filtered out" before passing it to particular netdev implementation (because of that change, statistics which are not collected are reported as filtered out, and some unit tests were modified in this respect). - New statistics are retrieved using experimenter code and are printed as a result to ofctl dump-ports. - New counters are available for OpenFlow 1.4+. - Add new vendor id: INTEL_VENDOR_ID. - New statistics are printed to output via ofctl only if those are present in reply message. - Add new file header: include/openflow/intel-ext.h which contains new statistics definition. - Extended statistics are implemented only for dpdk-physical and dpdk-vhost port types. - Dpdk-physical implementation uses xstats to collect statistics. - Dpdk-vhost implements only part of statistics (RX packet sized based counters). Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> [blp@ovn.org made software devices more consistent] Signed-off-by: Ben Pfaff <blp@ovn.org>
* tunnel-tests: Fix travis build failure.Pravin B Shelar2016-03-241-5/+5
| | | | | | | | | | Travis does not allow tcpdump utility which causes the neighbour discovery and ARP verification tests failures. Following patch fixes the issue by using ovs-pcap utility instead of tcpdump. Suggested-by: Daniele Di Proietto <diproiettod@vmware.com> Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* tunneling: Enable IPv6 tuneling.Pravin B Shelar2016-03-241-4/+152
| | | | | | | | | | | | There is check to disable IPv6 tunneling. Following patch removes it and reintroduces the tunneling automake tests. This reverts mostly commit 250bd94d1e500a89c76cac944e660bd9c07ac364. There are couple of new autotests and updated documentation related to ipv6 tunneling added in this patch. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* tunneling: Disable IPv6 tunnelPravin B Shelar2016-02-171-138/+4
| | | | | | | | | | | | | There are multiple issues in IPv6 userspace tunnel implementation. Even the kernel module that ships with 2.5 does not support IPv6 tunneling. There is not enough time to get all fixes in branch-2.5. So it make sense to disable the support on 2.5. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Acked-by: Jesse Gross <jesse@kernel.org>
* ofproto: Wildcard TTL on IP tunnelsHaggai Eran2016-01-191-1/+1
| | | | | | | | | | | | | There is no need to set the mask on the outer header IP TTL [1]. The only requirement is that the TTL will be non-zero. Clear the mask in tnl_wc_init(). [1] OVS VXLAN decap rule has full match on TTL for the outer headers? http://www.spinics.net/lists/netdev/msg351961.html Cc: Jesse Gross <jesse@kernel.org> Cc: Joe Stringer <joe@ovn.org> Signed-off-by: Haggai Eran <haggaie@mellanox.com> Signed-off-by: Jesse Gross <jesse@kernel.org>
* geneve-map-rename: rename geneve-map to tlv-map.Mengke Liu2015-12-151-1/+1
| | | | | | | | | | | | | | | | | | This patch renames the command name related with geneve-map to a more generic name as following: add-geneve-map -> add-tlv-map del-geneve-map -> del-tlv-map dump-geneve-map -> dump-tlv-map It also renames the Geneve_table to tlv_table. By doing this renaming, the NSH variable context header (the same TLV format as Geneve) or other protocol can reuse the field tun_metadata<N> in the future. Signed-off-by: Mengke Liu <mengke.liu@intel.com> Signed-off-by: Ricky Li <ricky.li@intel.com> Signed-off-by: Jesse Gross <jesse@kernel.org>
* tests: Add tunnel-push-pop-ipv6 testsThadeu Lima de Souza Cascardo2015-12-041-0/+153
Based on IPv4 tests, test tunnels over IPv6. In order to do that, add netdev-dummy/ip6addr command for dummy bridges, and get_in6 support for netdev-dummy as well. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>