summaryrefslogtreecommitdiff
path: root/datapath/vport-gre.c
Commit message (Collapse)AuthorAgeFilesLines
* datapath: backport: openvswitch: do not ignore netdev errors when creating ↵Pravin B Shelar2016-08-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | tunnel vports Upstream commit: commit 4b5b9ba553f9aa5f484ab972fc9b58061885ceca Author: Martynas Pumputis <martynas@weave.works> Date: Tue Aug 9 16:24:50 2016 +0100 openvswitch: do not ignore netdev errors when creating tunnel vports The creation of a tunnel vport (geneve, gre, vxlan) brings up a corresponding netdev, a multi-step operation which can fail. For example, changing a vxlan vport's netdev state to 'up' binds the vport's socket to a UDP port - if the binding fails (e.g. due to the port being in use), the error is currently ignored giving the appearance that the tunnel vport creation completed successfully. Signed-off-by: Martynas Pumputis <martynas@weave.works> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* dataoath: compat: Do not use upstream fill-meta-data function for compat tunnelPravin B Shelar2016-07-181-0/+2
| | | | | | | | | upstream dev_fill_metadata_dst() uses upstream tunnel-dst which could be different from OVS defined tun-dst. Therefore use fill-meta-data function from compat layer. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: Refactor egress tunnel infoPravin B Shelar2016-07-081-8/+1
| | | | | | | | | | | | | upstream tunnel egress info is retrieved using ndo_fill_metadata_dst. Since we do not have it on older kernel we need to keep vport operation to do same on these kernels. Following patch try to merge these to operations into one to avoid code duplication. This commit backports fc4099f1 ("openvswitch: Fix egress tunnel info.") Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Backport: openvswitch: properly refcount vport-vxlan modulePravin B Shelar2015-12-081-1/+0
| | | | | | | | | | | | | | | | | | | | Upstream commit: After 614732eaa12d, no refcount is maintained for the vport-vxlan module. This allows the userspace to remove such module while vport-vxlan devices still exist, which leads to later oops. v1 -> v2: - move vport 'owner' initialization in ovs_vport_ops_register() and make such function a macro Fixes: 614732eaa12d ("openvswitch: Use regular VXLAN net_device device") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Upstream: 83e4bf7a74 ("openvswitch: properly refcount vport-vxlan module"). Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Add support for lwtunnelPravin B Shelar2015-12-031-227/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Following patch adds support for lwtunnel to OVS datapath. With this change OVS datapath detect lwtunnel support and make use of new APIs if available. On older kernel where the support is not there the backported tunnel modules are used. These backported tunnel devices acts as lwtunnel devices. I tried to keep backported module same as upstream for easier bug-fix backport. Since STT and LISP are not upstream OVS always needs to use respective modules from tunnel compat layer. To make it work on kernel 4.3 I have converted STT and LISP modules to lwtunnel API model. lwtunnel make use of skb-dst to pass tunnel information to the tunnel module. On older kernel this is not possible. So the in case of old kernel metadata ref is stored in OVS_CB and direct call to tunnel transmit function is made by respective tunnel vport modules. Similarly on receive side tunnel recv directly call netdev-vport-receive to pass the skb to OVS. Major backported components include: Geneve, GRE, VXLAN, ip_tunnel, udp-tunnels GRO. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* tunneling: Remove gre64 tunnel support.Pravin B Shelar2015-08-201-155/+42
| | | | | | | | | | GRE64 was introduced to extend gre key from 32-bit to 64-bit using gre-key and sequence number field. But GRE64 is not standard protocol. There are not many users of this protocol. Therefore we have decided to remove it. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Turn vports with dependencies into separate modulesThomas Graf2015-04-041-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: The internal and netdev vport remain part of openvswitch.ko. Encap vports including vxlan, gre, and geneve can be built as separate modules and are loaded on demand. Modules can be unloaded after use. Datapath ports keep a reference to the vport module during their lifetime. Allows to remove the error prone maintenance of the global list vport_ops_list. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net> Also folds in the follow-up commits 9ba559d9ca3 to turned the non-GPL symbol exports to GPL exports, and fa2d8ff4e35 which fixes a module reference release bug. Exports various backwards compat functions linked into the main openvswitch module as GPL symbols to ensure vport modules can use them. Some fiddling with the Makefile was needed to work around the fact that Makefile variables can't contain '-' characters needed to define 'vport-xxx' module sources. Also, Kbuild complains heavily if a $(module)-y = $(module).o is defined which is actually backed with a .c file of the same name. Therefore, a new $(build_multi_modules) variable is defined which lists all module which consist of more than one source file. Upstream: 62b9c8d0372 ("ovs: Turn vports with dependencies into separate modules") Upstream: 9ba559d9ca3 ("openvswitch: Export symbols as GPL symbols.") Upstream: fa2d8ff4e35 ("openvswitch: Return vport module ref before destruction") Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Account for "rename vlan_tx_* helpers since "tx" is misleading there"Thomas Graf2015-02-031-3/+3
| | | | | | | | | | | | | | Upstream commit: net: rename vlan_tx_* helpers since "tx" is misleading there The same macros are used for rx as well. So rename it. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net> Upstream: df8a39d ("net: rename vlan_tx_* helpers since "tx" is misleading there") Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Account for rename to vlan_insert_tag_set_proto()Thomas Graf2015-01-071-3/+3
| | | | | | | | | __vlan_put_tag() was renamed to vlan_insert_tag_set_proto() with the argument list kept intact. Upstream: 62749e ("vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto") Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Simplify vport_send() error handling.Pravin B Shelar2014-12-231-5/+12
| | | | | | | | | | | | Today vport-send has complex error handling because it involves freeing skb and updating stats depending on return value from vport send implementation. This can be simplified by delegating responsibility of freeing skb to the vport implementation for all cases. So that vport-send needs just update stats. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Provide compatibility for kernels up to 3.17Thomas Graf2014-09-201-2/+2
| | | | | | | | | | | Port datapath to work with kernrels up to 3.17 and use 3.16.2 as the new kernel for CI testing. Tested with 3.14, 3.16.2, and net-next (3.17). Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Co-authored-by: Madhu Challa <challa@noironetworks.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* Extend OVS IPFIX exporter to export tunnel headersWenyu Zhang2014-08-181-11/+22
| | | | | | | | | | | | | | | | | | | | | | Extend IPFIX exporter to export tunnel headers when both input and output of the port. Add three other_config options in IPFIX table: enable-input-sampling, enable-output-sampling and enable-tunnel-sampling, to control whether sampling tunnel info, on which direction (input or output). Insert sampling action before output action and the output tunnel port is sent to datapath in the sampling action. Make datapath collect output tunnel info and send it back to userpace in upcall message with a new additional optional attribute. Add a tunnel ports map to make the tunnel port lookup faster in sampling upcalls in IPFIX exporter. Make the IPFIX exporter generate IPFIX template sets with enterprise elements for the tunnel info, save the tunnel info in IPFIX cache entries, and send IPFIX DATA with tunnel info. Add flowDirection element in IPFIX templates. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Romain Lenglet <rlenglet@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Use tun_info only for egress tunnel path.Pravin B Shelar2014-08-061-7/+9
| | | | | | | | | Currently tun_info is used for passing tunnel information on ingress and egress path, this cause confusion. Following patch removes its use on ingress path make it egress only parameter. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* datapath: Add support for Geneve tunneling.Jesse Gross2014-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* datapath: Wrap struct ovs_key_ipv4_tunnel in a new structure.Jesse Gross2014-06-191-20/+18
| | | | | | | | | | | | | | | | Currently, the flow information that is matched for tunnels and the tunnel data passed around with packets is the same. However, as additional information is added this is not necessarily desirable, as in the case of pointers. This adds a new structure for tunnel metadata which currently contains only the existing struct. This change is purely internal to the kernel since the current OVS_KEY_ATTR_IPV4_TUNNEL is simply a compressed version of OVS_KEY_ATTR_TUNNEL that is translated at flow setup. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: supply a dummy err_handler of gre_cisco_protocol to prevent kernel ↵Wei Zhang2014-04-051-0/+20
| | | | | | | | | | | | | | | crash When use gre vport, openvswitch register a gre_cisco_protocol but does not supply a err_handler with it. The gre_cisco_err() in net/ipv4/gre_demux.c expect err_handler be provided with the gre_cisco_protocol implementation, and call ->err_handler() without existence check, cause the kernel crash. This patch provide a err_handler to fix this bug. Signed-off-by: Wei Zhang <asuka.com@163.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.cMonam Agarwal2014-03-271-1/+1
| | | | | | | | | | | | This patch replaces rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) The rcu_assign_pointer() ensures that the initialization of a structure is carried out before storing a pointer to that structure. And in the case of the NULL pointer, there is no structure to initialize. So, rcu_assign_pointer(p, NULL) can be safely converted to RCU_INIT_POINTER(p, NULL) Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Add support for Linux 3.12Pravin Shelar2014-03-071-1/+1
| | | | | | | | | | | Bump kernel support for datapath module to include 3.12. Make use of native ip-tunnel API for Kernel >= 3.12. Based on patch from James Page. Signed-off-by: James Page <james.page@ubuntu.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Reviewed-by: Kyle Mestery <mestery@noironetworks.com>
* datapath: remove duplicated include from vport-gre.cWei Yongjun2013-09-231-2/+0
| | | | | | | Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: iptunnels: remove net arg from iptunnel_xmit().Pravin B Shelar2013-09-071-2/+1
| | | | | | | | Backport of upstream commit 8b7ed2d91d6af (iptunnels: remove net arg from iptunnel_xmit()). Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove vlan compat supportPravin B Shelar2013-09-061-3/+8
| | | | | Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove checksum compat supportPravin B Shelar2013-09-061-2/+0
| | | | | Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove skb->mark compat code.Pravin B Shelar2013-09-061-1/+1
| | | | | Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Move generic tunnel functions to lisp module.Pravin B Shelar2013-08-131-2/+2
| | | | | | | | | | Generic tunnel rcv and send function are only used by lisp tunneling module, so It make sense to move them to lisp module. CC: Lori Jakab <lojakab@cisco.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Lorand Jakab <lojakab@cisco.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: move tunnel-init function to flow.hPravin B Shelar2013-08-131-1/+1
| | | | | | | This makes ovs-module more in-sync with upstream ovs-module. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: tunnel: Fix gre64 tunnel when key not specified.Pravin B Shelar2013-08-131-4/+6
| | | | | | | | | | | | User is allowed to create tunnel without any keys. In this case userspace set tunnel action does not set tun-key flag which was confusing gre64 vport header calculations. Following patch fixes it by always assuming TUNNEL_KEY parameter as we do it with tun-seq. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #19121
* datapath: Make GRE support conditional on CONFIG_NET_IPGRE_DEMUX.Jesse Gross2013-06-271-0/+3
| | | | | | | | | | | Now that GRE support has been upstreamed into Linux, OVS is using the components in the native kernel when available. However, this means that it is now dependent on the appropriate kernel config, which is CONFIG_NET_IPGRE_DEMUX on 2.6.37 and later. Reported-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* gre: Restructure tunneling.Pravin B Shelar2013-06-201-214/+128
| | | | | | | | | | | | Following patch restructures ovs tunneling and gre vport implementation to make ovs tunneling more in sync with upstream kernel tunneling. Doing this tunneling code is simplified as most of protocol processing on send and recv is pushed to kernel tunneling. For external ovs module the code is moved to kernel compatibility code. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: make skb->csum consistent with rest of networking stack.Pravin B Shelar2013-06-121-2/+1
| | | | | | | | As suggested by Jesse in the comment for patch "gre: Restructure tunneling", following patch keeps skb->csum correct across ovs. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Kill VPORT_F_TUN_ID vport flag.Pravin B Shelar2013-05-061-4/+1
| | | | | | | | | VPORT_F_TUN_ID is last remaining flag, once we remove it, flags field from vport-ops can be removed. Since it does not complicate much code, we decided to remove this flag. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Move vport init to first port create.Pravin B Shelar2013-05-061-17/+34
| | | | | | | | | | | vport->init and exit() functions are defined by gre and netdev vport only and both can be moved to first port create. Following patch does same, it moves vport init to respective vport create and gets rid of vport->init() and vport->exit() functions. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Unify vport error stats handling.Pravin B Shelar2013-05-061-10/+4
| | | | | | | | Following patch changes vport->send return type so that vport layer can do error accounting. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* tunneling: Remove struct tnl_vport and tnl_ops.Pravin B Shelar2013-05-061-21/+46
| | | | | | | | | | After flow based tunneling, kernel tunneling is greatly simplified. There is no need to have extra tunneling layer between vport and particular protocol. Following patch removes tunneling struct which make code easy to read. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Simplify datapath locking.Pravin B Shelar2013-04-121-2/+2
| | | | | | | | | | | | Currently OVS uses combination of genl and rtnl lock to protect datapath state. This was done due to networking stack locking. But this has complicated locking and there are few lock ordering issues with new tunneling protocols. Following patch simplifies locking by introducing new ovs mutex and now this lock is used to protect entire ovs state. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Factor out common code from *_build_header() to ovs_tnl_send().Jarno Rajahalme2013-03-261-10/+0
| | | | | Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* Tunnel: Cleanup old tunnel infrastructure.Pravin B Shelar2013-03-041-86/+128
| | | | | | | | | | | | | | | | Since userspace flow based tunneling code is checked in, the kernel port based tunneling code can be removed. Patch removes following components: - tunnel ports hash table and moved tunnel ports list to individual vports. - Cleaned per tnl-port config. - OVS_KEY_ATTR_TUN_ID action is removed. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #15078
* tunneling: Don't send ICMP messages if no tunnel port is found.Jesse Gross2013-02-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | Some tunnel code in OVS (for example, CAPWAP) uses the skb->cb to store information while processing packets. However, if we don't find an appropriate tunnel port on receive, then we send an ICMP port unreachable message, which calls back into the IP stack. The stack assumes that skb->cb will still contain valid information about from the IP layer, including any IP options. As a result, icmp_echo_options() can read the garbage values from OVS and overwrite data on the stack, panicing the machine. This simply stops sending ICMP messages when ports are not found. Many people find them confusing and flow based tunneling will never send them (since it always finds a port) so it solves both problems at once. Bug #14880 Reported-by: Deepesh Govindan <dgovindan@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Remove compatibility GRE identifier.Jesse Gross2013-01-281-18/+0
| | | | | | | | | We want to move the GRE vport ID into the upstream range but in order to ease the transition kept the old ID around for one release. This removes the old value. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Remove vport MAC address configuration.Jesse Gross2013-01-281-6/+0
| | | | | | | | | | | | | The ability to retrieve and set MAC addresses on vports is only necessary for tunnel ports (the addresses for actual devices can be retrieved through direct Linux mechanisms). Tunnel ports only used the information for the purpose of generating path MTU discovery packets, which has now been removed. Current userspace code already reflects these changes, so this drops the functionality from the kernel. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Remove tunnel path MTU discovery support.Jesse Gross2013-01-281-125/+0
| | | | | | | | | | | Path MTU discovery can improve tunnel performance in some cases but is non-standard and can introduce problems in others. As a result it has already been deprecated and removed from userspace. This removes the corresponding kernel support to simplify the code. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* openvswitch: Remove Linux bridge compatibility.Pravin B Shelar2012-12-271-10/+0
| | | | | | | | | Currently brcompat does not work on master due to recent datapath changes. We have decided to remove it as it is not used very widely. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* tunnel: Zero keys if marked as not present.Jesse Gross2012-11-061-7/+10
| | | | | | | | | | | If a key used to find a port then we mark it as being not present (previously this was accomplished by setting it to zero). However, we also still pass the key to userspace which could lead to an inconsistent state. This also zeros out the key as before in order to make our reported results consistent. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Allow GRE64 to use flow based tunneling.Jesse Gross2012-11-061-32/+7
| | | | | | | | | | | There's no reason why GRE64 can't be configured using flow based tunneling. Since that's the direction we are moving, everything should support that. Once this special casing is removed, it's possible to unify the tunnel parameter parsing code since both GRE and CAPWAP are the same. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Shorten flow tunneling flags.Jesse Gross2012-11-061-5/+5
| | | | | | | | | The names for the flags used by flow based tunneling are pretty long. This shortens them a little by removing the word FLOW, which is a distinction that won't be meaningful in the near future. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Remove tunnel header caching.Pravin B Shelar2012-11-051-48/+12
| | | | | | | | | | | | | Tunnel caching was added to reduce CPU utilization on TX path by caching packet header, So performance gain is directly proportional to number of skbs transferred. But with help of offloads skb are getting larger. So there are less number of skbs. Therefore header caching does not shows similar gains we seen in past. And now kernel 3.6 has removed dst caching from networking which makes header caching even more tricky. So this commit removes header caching from OVS tunnelling. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Add Upstream id for GRE type.Pravin B Shelar2012-11-051-0/+23
| | | | | | | | | Once GRE is upstream it will have new type to have continuous sequence of ids for vport type. Following patch adds this ID to have compatibility with it. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix zero key tunnels.Pravin B Shelar2012-10-241-19/+6
| | | | | | | | | | | | | | Datapath tunneling check for flag OVS_FLOW_TNL_F_KEY is failing, causing it to drop packet. This only happens on tunnels with zero key as vswitchd does not generate set-tunnel action. Set tunnel action sets this flags for given action. To fix this issue the check is dropped. Bug #13666 Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Add support for tun_key to Open vSwitch datapathKyle Mestery2012-10-201-30/+101
| | | | | | | | | | | | | | | | | | | | | This is a first pass at providing a tun_key which can be used as the basis for flow-based tunnelling. The tun_key includes and replaces the tun_id in both struct ovs_skb_cb and struct sw_tun_key. This patch allows all existing tun_id behaviour to still work. Existing users of tun_id are redirected to tun_key->tun_id to retain compatibility. However, when the userspace code is updated to make use of the new tun_key, the old behaviour will be deprecated and removed. NOTE: With these changes, the tunneling code no longer assumes input and output keys are symmetric. If they are not, PMTUD needs to be disabled for tunneling to work. Signed-off-by: Kyle Mestery <kmestery@cisco.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath: Allow GRE64 tunnels without any key.Pravin B Shelar2012-10-091-3/+9
| | | | | | | | Now GRE64 deals with tunnel with no key and tunnel with zero key as a same. This behaviour is different than standard GRE. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix GRE tunnel without any key.Pravin B Shelar2012-10-091-1/+4
| | | | | | | | | | Commit 2de795adb96 (datapath: 64-bit GRE support) introduced a bug for tunnels with no key. Following patch fixes it by setting tunnel type to GRE type. Bugs: 13511 Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>