summaryrefslogtreecommitdiff
path: root/tests/tunnel.at
Commit message (Collapse)AuthorAgeFilesLines
...
* datapath: Add support for Geneve tunneling.Jesse Gross2014-06-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | This adds support for Geneve - Generic Network Virtualization Encapsulation. The protocol is documented at http://tools.ietf.org/html/draft-gross-geneve-00 The kernel implementation is completely agnostic to the options that are in use and can handle newly defined options without further work. It does this by simply matching on a byte array of options and allowing userspace to setup flows on this array. Userspace currently implements only support for basic version of Geneve. It can work with the base header (including the VNI) and is capable of parsing options but does not currently support any particular option definitions. Over time, the intention is to allow options to be matched through OpenFlow without requiring explicit support in OVS userspace. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* Tests: Fix ofproto/trace and expose megaflows when having a set action.Jarno Rajahalme2014-04-091-8/+12
| | | | | | | | | | | | | | | | ofproto/trace incorrectly reported the megaflow based on the modified flow, rather than the original flow key. Now the original flow key is stored before any modifications and is used for reporting the megaflow. Also, flow reporting is suppressed only for resubmit flows, so that the final flow will be printed if it is different from the incoming flow key. Test for the megaflow key and mask with flows having set actions. This helps in verifying the correctness of operation with masked set actions in the following patches. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ofproto: Support OF version-specific table-miss behavioursSimon Horman2014-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenFlow 1.1 and 1.2 specify that if a table-miss occurs then the default behaviour is to forward the packet the controller using a packet-in message. And until this patch this is the default behaviour that Open vSwitch uses for all OpenFlow versions. OpenFlow1.3+ specifies that if a table-miss occurs then the default behaviour is simply to drop the packet. This patch implements this behaviour using the following logic: If a table-miss occurs and the table-miss behaviour for the table has not been set using a table_mod (in which case it is no longer the default setting) then: * Installing a facet in the datapath with a drop action in the if there are no pre-OF1.3 controllers connected which would receive an packet_in message. Note that this covers both the case where there are only OF1.3 controllers and the case where there are no controllers at all. * Otherwise sent a packet_in message to all pre-OF1.3 controllers. This covers both the case where there are only pre-OF1.3 controllers and there are both pre-OF1.3 and OF1.3+ controllers. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
* dpif-netdev: Use hmap instead of list+array for tracking ports.Ben Pfaff2014-01-081-5/+5
| | | | | | | | | | | | | | The goal is to make it easy to divide the ports into groups for handling by threads. It seems easy enough to do that by hash value, and a little harder otherwise. This commit has the side effect of raising the maximum number of ports from 256 to UINT32_MAX-1. That is why some tests need to be updated: previously, internally generated port names like "ovs_vxlan_4341" were ignored because 4341 is bigger than the previous limit of 256. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* ofproto: Handle flow installation and eviction in upcall.Ethan Jackson2013-12-191-13/+13
| | | | | | | | | | | | This patch moves flow installation and eviction from ofproto-dpif and the main thread, into ofproto-dpif-upcall. This performs significantly better (approximately 2x TCP_CRR improvement), and allows ovs-vswitchd to maintain significantly larger datapath flow tables. On top of that, it significantly simplifies the code, retiring "struct facet" and friends. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ofproto-dpif: Compute the subfacet add/del rate using coverage counters.Alex Wang2013-10-011-13/+13
| | | | | | | | | | | So far, the subfacet rates (e.g. add rate, del rate) are computed by exponential moving averaging function in ofproto-dpif.c. This commit replaces that logic with coverage counters. And the rates can be checked by running "ovs-appctl coverage/show" command. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* ofproto: Track subfacet stats in the backer.Ethan Jackson2013-06-071-107/+55
| | | | | | | | Subfacets being per-datapath entities, their statistics are really only interesting at per-datapath granularity. This patch moves them to the dpif_backer and makes some related simplifications. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* ofproto-dpif: More responsive average subfacet statistics.Ethan Jackson2013-06-071-13/+13
| | | | | | | | | | | | | Before this patch, statistics about subfacet average life span, and count in the datapath, were calculated over the entire lifetime of the ofproto. Furthermore, the subfacet lifespan was only updated when a subfacet was removed from the datapath causing long lived subfacets to be ignored. It's far more useful to know these numbers averaged over all subfacets in the recent past. This patch changes the code to implement an exponentially weighted moving average updated every time statistics are pulled from the datapath. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* ofproto/ofproto-dpif.c: Re-implement the ofproto/trace commandAlex Wang2013-05-211-26/+26
| | | | | | | | | | | | | | | | | | Since the use of single datapath, all bridges belonging to the same type of datapath will use the same (single) datapath. This causes confusion in the current 'ofproto/trace' command. Especially, when given the unrelated 'bridge' and 'in_port' combination, the current implementation will still be able to process and give misleading output. Thusly, this patch changes the 'ofproto/trace' command syntax to formats shown as follow. ofproto/trace [datapath] odp_flow [-generate|packet] ofproto/trace bridge br_flow [-generate|packet] Also, this patch updates the tests and the manpages accordingly. Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* OpenFlow-level flow-based tunneling support.Jarno Rajahalme2013-05-101-0/+28
| | | | | | | | | | | | | | | | | | | | | Adds tun_src and tun_dst match and set capabilities via new NXM fields NXM_NX_TUN_IPV4_SRC and NXM_NX_TUN_IPV4_DST. This allows management of large number of tunnels via the flow tables, without requiring the tunnels to be pre-configured. Flow-based tunnels can be configured with options remote_ip=flow and local_ip=flow. local_ip=flow requires remote_ip=flow. When set, the tunnel remote IP address and/or local IP address is set from the flow, instead of the tunnel configuration. Example: $ ovs-vsctl add-port br0 gre -- set Interface gre ofport_request=1 type=gre options:remote_ip=flow options:key=flow $ ovs-ofctl add-flow br0 "in_port=LOCAL actions=set_tunnel:1,set_field:192.168.0.1->tun_dst,output:1" $ ovs-ofctl add-flow br0 "in_port=1 tun_src=192.168.0.1 tun_id=1 actions=LOCAL" Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Update the default VXLAN destination UDP port to the IANA assigned portKyle Mestery2013-04-261-1/+1
| | | | | | | | | | VXLAN was recently assigned UDP port 4789 by IANA. This comit updates the OVS VXLAN implementation to reflect the new UDP port number. Cc: Kenneth Duda <kduda@aristanetworks.com> Signed-off-by: Kyle Mestery <kmestery@cisco.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* ofproto-dpif: Keep track of exact-match flow infoAndy Zhou2013-03-271-13/+26
| | | | | | | | | | | | | | | | | This patch adds more flow related stats to the output of "ovs-appctl dpif/show". Specifically, the follow information are added per ofproto: - Max flow table size - Average flow table size - Average flow table add rate - Average flow table delete rate - Average flow entry life in milliseconds Feature #15366 Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-appctl: dpif/show display per bridge statsAndy Zhou2013-03-131-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is to fix the fallout of single datapath change. ovs-appctl dpif/show displays per bridge miss, hit and flow counts on the screen, but the backend is obtaining those information from the datapath. With a single datapath, all bridges of the same datapath would all display the same (global) counters maintained by the datapath, obviously not correct. This patch fixes the bug by maintaining per ofproto_dpif miss and hit counts, which are used for display output. The number of flows count is obtained by counting the number facets per ofproto. ovs-dpctl show still displays the counters maintain by the datapath, as before. Bug #15369 Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* tunnel: Mark ECN status on decapsulated tunnel packets.Justin Pettit2013-03-061-2/+2
| | | | | | | | | | | | In the kernel tunnel implementation, if a packet was marked as ECN CE on the outer packet then we would carry this over to the inner packet on decapsulation. With the switch to flow based tunneling, this stopped happening. This commit reintroduces that behavior by using the set IP header action. Bug #15072 Signed-off-by: Justin Pettit <jpettit@nicira.com>
* tunnel: Generate datapath flows for tunneled packets dropped due to ECN.Justin Pettit2013-03-061-1/+20
| | | | | | | | | Move the check for whether tunneled packets should be dropped due to congestion encountered (CE) when the encapsulated packet is not ECN capable (non-ECT). This also adds some additional tests for ECN handling on tunnel decapsulation. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* tunnel: Only print non-default UDP dst_port for LISP/VXLAN tunnelsKyle Mestery2013-02-281-1/+1
| | | | | | | | | | | In get_tunnel_config(), distinguish between VXLAN and LISP when deciding whether or not to print UDP destination port. Only add the UDP destination port for either protocol if it is not the default UDP port. Update the LISP unit test to match the new behavior as well. Signed-off-by: Kyle Mestery <kmestery@cisco.com> [jesse: merge common test for VXLAN and LISP] Signed-off-by: Jesse Gross <jesse@nicira.com>
* tests: Add VXLAN and LISP tunnel tests to the unit test infrastructure.Kyle Mestery2013-02-271-0/+69
| | | | | Signed-off-by: Kyle Mestery <kmestery@cisco.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* ofproto-macros: Fail a test that logs a WARN or higher level message.Ben Pfaff2013-02-111-2/+2
| | | | | | | | It is necessary to whitelist a couple of tests that appear to legitimately have WARN messages. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* tests: Add tunnel unit tests.Ethan Jackson2013-01-281-0/+312
This commit adds unit tests which exercise the flow based tunneling code added in previous patches. Signed-off-by: Ethan Jackson <ethan@nicira.com>