summaryrefslogtreecommitdiff
path: root/include/linux/openvswitch.h
Commit message (Collapse)AuthorAgeFilesLines
* userspace: Add SRv6 tunnel support.Nobuhiro MIKI2023-03-291-0/+1
| | | | | | | | | | | | | | | | | SRv6 (Segment Routing IPv6) tunnel vport is responsible for encapsulation and decapsulation the inner packets with IPv6 header and an extended header called SRH (Segment Routing Header). See spec in: https://datatracker.ietf.org/doc/html/rfc8754 This patch implements SRv6 tunneling in userspace datapath. It uses `remote_ip` and `local_ip` options as with existing tunnel protocols. It also adds a dedicated `srv6_segs` option to define a sequence of routers called segment list. Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
* dpctl: Add support to count upcall packets.wangchuanlei2023-01-311-0/+14
| | | | | | | | | Add support to count upcall packets per port, both succeed and failed, which is a better way to see how many packets upcalled on each interface. Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: wangchuanlei <wangchuanlei@inspur.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
* make: Remove the Linux datapath.Greg Rose2022-07-151-0/+1176
| | | | | | | | | | | | | | | | Update the necessary make and configure files to remove the Linux datapath and then remove the datapath. Move datapath/linux/compat/include/linux/openvswitch.h to include/linux/openvswitch.h because it is needed to generate header files used by the userspace switch. Also remove references to the Linux datapath from auxiliary files and utilities since it is no longer supported. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
* Do not seemingly #include Linux-specific headers on other platforms.Ben Pfaff2014-08-041-616/+0
| | | | | | | | | | | | | | | | | | Until now, the OVS source tree has had a whole maze of header files that make "#include <linux/openvswitch.h>" work OK regardless of platform, but this confuses everyone new to the tree, at first glance, and is difficult to understand at second glance too. This commit renames include/linux/openvswitch.h to datapath/linux/compat/include/linux/openvswitch.h without other change, then modifies the userspace build to generate a header that makes sense in portable Open vSwitch userspace from that header. It then removes all the remaining include/linux/* files since they are now unused. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: reorder action netlink attribute definition for upstreamingAndy Zhou2014-07-241-3/+4
| | | | | | | | | | | | | | | | | Keeping the order of netlink attribute definition in the order of upstreaming is the best way to keep all released user space program forward compatible with upstreamed kernel modules. Adjust action netlink attribute order to match with the current upstreaming plan. Recirc and hash actions are introduced in branch 2.3, which will be fixed by the patch. The MPLS actions have been released since branch-2.1 but there is no kernel implementation of them prior to branch 2.3. Thus the ordering change should not affect them. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Add basic MPLS support to kernelSimon Horman2014-06-241-5/+4
| | | | | | | | | | | | | | Allow datapath to recognize and extract MPLS labels into flow keys and execute actions which push, pop, and set labels on packets. Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer. Cc: Ravi K <rkerur@gmail.com> Cc: Leo Alterman <lalterman@nicira.com> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Joe Stringer <joe@wand.net.nz> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Add support for Geneve tunneling.Jesse Gross2014-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* tunnel: Add support for matching on OAM packets.Jesse Gross2014-06-191-0/+1
| | | | | | | | | | | Some tunnel formats have mechanisms for indicating that packets are OAM frames that should be handled specially (either as high priority or not forwarded beyond an endpoint). This provides support for allowing those types of packets to be matched. 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-1/+1
| | | | | | | | | | | | | | | | 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>
* openvswitch.h: Clarify use of key attributes.Jarno Rajahalme2014-04-281-1/+3
| | | | | | | | | Key attributes relating to actual packet headers are ignored for OVS_PACKET_CMD_EXECUTE as the header key attributes are retrieved from the packet itself. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* openvswitch.h: Note that 64 bit ints are 4-aligned.Jarno Rajahalme2014-04-281-0/+1
| | | | | | | | | | | In general, all Netlink 64-bit data may be 4-byte aligned, due to netlink header and attributes being 4-aligned. To avoid unaligned access the data should be copied out of the netlink attribute before access. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: add hash actionAndy Zhou2014-04-211-1/+2
| | | | | Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* openvswitch.h: rename hash action definitionAndy Zhou2014-04-201-2/+2
| | | | | | | | Rename hash_bias to hash_basis to make it consistent with similar usages. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* dpif-netdev: Move hash function out of the recirc action, into its own actionAndy Zhou2014-04-161-12/+9
| | | | | | | | | | | | | | | | Currently recirculation action can optionally compute hash. This patch adds a hash action that is independent of the recirc action, which no longer computes hash. For megaflow bond with recirc, the output to a bond port action will look like: hash(hash_l4(0)), recirc(<recirc_id>) Obviously, when a recirculation application that does not depend on hash value can just use the recirc action alone. Signed-off-by: Andy Zhou <azhou@nicira.com> Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Pravin B Shelar <pshelar@nicira.com
* datapath: Allow each vport to have an array of 'port_id's.Alex Wang2014-04-141-4/+9
| | | | | | | | | | | In order to allow handlers directly read upcalls from datapath, we need to support per-handler netlink socket for each vport in datapath. This commit makes this happen. Also, it is guaranteed to be backward compatible with previous branch. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Thomas Graf <tgraf@redhat.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* recirculation: Adjust ovs_key_attr ABIAndy Zhou2014-03-281-3/+4
| | | | | | | | Jesse helped to clarify how to maintain the ABI. Making the adjustment accordingly and add some comments. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* recirculation: Some cosmetic fixesYAMAMOTO Takashi2014-03-281-1/+2
| | | | | | | | | Wrap long lines, fix whitespaces, and fix a typo in a comment. No functional changes are intended. Cc: Andy Zhou <azhou@nicira.com> Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Andy Zhou <azhou@nicira.com>
* dpif-netdev: user space datapath recirculationAndy Zhou2014-03-251-1/+28
| | | | | | | | | Add basic recirculation infrastructure and user space data path support for it. The following bond mega flow patch will make use of this infrastructure. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath: Avoid assigning a NULL pointer to flow actions.Jarno Rajahalme2014-03-241-1/+3
| | | | | | | | | | | | Flow SET can accept an empty set of actions, with the intended semantics of leaving existing actions unmodified. This seems to have been brokin after OVS 1.7, as we have assigned the flow's actions pointer to NULL in this case, but we never check for the NULL pointer later on. This patch restores the intended behavior and documents it in the include/linux/openvswitch.h. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
* Always insert MPLS labels after VLAN tags.Ben Pfaff2014-02-061-4/+4
| | | | | | | | | | | | OpenFlow 1.1 and 1.2 always inserted MPLS labels after VLAN tags. OpenFlow 1.3 and 1.4 insert MPLS labels before VLAN tags. OpenFlow 1.3.4 and 1.5, both in preparation, recognize that the change in 1.3 was an error and revert it. This commit implements that reversion in Open vSwitch. EXT-457. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Simon Horman <horms@verge.net.au>
* datapath: Drop user features if old user space attempted to create datapathThomas Graf2013-12-161-1/+9
| | | | | | | | | | Drop user features if an outdated user space instance that does not understand the concept of user_features attempted to create a new datapath. Signed-off-by: Thomas Graf <tgraf@suug.ch> Reviewed-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Allow user space to announce ability to accept unaligned Netlink ↵Thomas Graf2013-12-161-0/+4
| | | | | | | | messages Signed-off-by: Thomas Graf <tgraf@suug.ch> Reviewed-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* TCP flags matching support.Jarno Rajahalme2013-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tcp_flags=flags/mask Bitwise match on TCP flags. The flags and mask are 16-bit num‐ bers written in decimal or in hexadecimal prefixed by 0x. Each 1-bit in mask requires that the corresponding bit in port must match. Each 0-bit in mask causes the corresponding bit to be ignored. TCP protocol currently defines 9 flag bits, and additional 3 bits are reserved (must be transmitted as zero), see RFCs 793, 3168, and 3540. The flag bits are, numbering from the least significant bit: 0: FIN No more data from sender. 1: SYN Synchronize sequence numbers. 2: RST Reset the connection. 3: PSH Push function. 4: ACK Acknowledgement field significant. 5: URG Urgent pointer field significant. 6: ECE ECN Echo. 7: CWR Congestion Windows Reduced. 8: NS Nonce Sum. 9-11: Reserved. 12-15: Not matchable, must be zero. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: collect mega flow mask statsAndy Zhou2013-10-221-3/+14
| | | | | | | | Collect mega flow mask stats. ovs-dpctl show command can be used to display them. Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Add SCTP supportJoe Stringer2013-08-221-0/+6
| | | | | | | | | | | | | | This patch adds support for rewriting SCTP src,dst ports similar to the functionality already available for TCP/UDP. Rewriting SCTP ports is expensive due to double-recalculation of the SCTP checksums; this is performed to ensure that packets traversing OVS with invalid checksums will continue to the destination with any checksum corruption intact. Reviewed-by: Simon Horman <horms@verge.net.au> Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath: Mega flow implementationAndy Zhou2013-06-201-1/+8
| | | | | | | | | | | | | | | | | | | | Add wildcarded flow support in kernel datapath. Wildcarded flow can improve OVS flow set up performance by avoid sending matching new flows to the user space program. The exact performance boost will largely dependent on wildcarded flow hit rate. In case all new flows hits wildcard flows, the flow set up rate is within 5% of that of linux bridge module. Pravin has made significant contributions to this patch. Including API clean ups and bug fixes. Co-authored-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> [jesse: Additional documentation, fix memory leak, and improve validation.] Signed-off-by: Jesse Gross <jesse@nicira.com>
* Make it more obvious that OVS_KEY_ATTR_MPLS may be an arraySimon Horman2013-05-011-2/+4
| | | | | | | | | | | | | | | | | Note that OVS_KEY_ATTR_MPLS may be an array of ovs_key_mpls and that the acceptable length may be restricted by the implementation. Currently the user-space datapath and proposed kernel datapath implementation restrict the length to a single element. Also update the mpls_top_lse name of the element of struct ovs_key_mpls, as it is an array of LSEs and thus not necessarily just the top LSE. As requested by Jesse Gross Cc: Jesse Gross <jesse@nicira.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Use ETH_ALEN to define ethernet addressesThomas Graf2013-03-291-6/+7
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove old patch interface definitions.Jesse Gross2013-03-151-9/+0
| | | | | | | | | Patch ports have been completely moved to userspace at this point but one part of the interface remained. It's no longer used by either userspace or kernel so this deletes it. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* Tunnel: Cleanup old tunnel infrastructure.Pravin B Shelar2013-03-041-1/+10
| | | | | | | | | | | | | | | | 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
* Add support for LISP tunnelingLorand Jakab2013-02-251-0/+1
| | | | | | | | | | | | | | | | LISP is an experimental layer 3 tunneling protocol, described in RFC 6830. This patch adds support for LISP tunneling. Since LISP encapsulated packets do not carry an Ethernet header, it is removed before encapsulation, and added with hardcoded source and destination MAC addresses after decapsulation. The harcoded MAC chosen for this purpose is the locally administered address 02:00:00:00:00:00. Flow actions can be used to rewrite this MAC for correct reception. As such, this patch is intended to be used for static network configurations, or with a LISP capable controller. Signed-off-by: Lorand Jakab <lojakab@cisco.com> Signed-off-by: Kyle Mestery <kmestery@cisco.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove CAPWAP tunneling support.Pravin B Shelar2013-02-191-1/+0
| | | | | | | | | | | | The CAPWAP implementation is just the encapsulation format and therefore really not the full protocol. While there were some uses of it (primarily hardware support and UDP transport). But these are most likely better provided by VXLAN. Following patch removes CAPWAP tunneling support. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Allow OVS_USERSPACE_ATTR_USERDATA to be variable length.Ben Pfaff2013-02-151-5/+6
| | | | | | | | | | | | | | | Until now, the optional OVS_USERSPACE_ATTR_USERDATA attribute had to be exactly 64 bits long, if it was present. However, 64 bits is not enough space to associate as much information with a flow as would be convenient for some userspace features now under development. This commit generalizes the attribute, allowing it to be any length. This generalization is backward-compatible: if userspace only uses 64-bit attributes, then it will not see any change in behavior. CC: Romain Lenglet <rlenglet@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* User-Space MPLS actions and matchesSimon Horman2013-02-051-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements use-space datapath and non-datapath code to match and use the datapath API set out in Leo Alterman's patch "user-space datapath: Add basic MPLS support to kernel". The resulting MPLS implementation supports: * Pushing a single MPLS label * Poping a single MPLS label * Modifying an MPLS lable using set-field or load actions that act on the label value, tc and bos bit. * There is no support for manipulating the TTL this is considered future work. The single-level push pop limitation is implemented by processing push, pop and set-field/load actions in order and discarding information that would require multiple levels of push/pop to be supported. e.g. push,push -> the first push is discarded pop,pop -> the first pop is discarded This patch is based heavily on work by Ravi K. Cc: Ravi K <rkerur@gmail.com> Reviewed-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath: Remove kernel patch ports.Jesse Gross2013-01-281-1/+0
| | | | | | | | Now that userspace implements patch ports completely internally, it's possible to remove the kernel implementation of them. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Remove compatibility GRE identifier.Jesse Gross2013-01-281-3/+2
| | | | | | | | | 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-4/+2
| | | | | | | | | | | | | 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: More flexible kernel/userspace tunneling attribute.Pravin B Shelar2013-01-181-15/+17
| | | | | | | | | | Following patch breaks down single ipv4_tunnel netlink attribute into individual member attributes. It will help when we extend tunneling parameters in future. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #14611
* include/linux/openvswitch.h: Make OVSP_LOCAL 32-bit.Jarno Rajahalme2013-01-071-1/+1
| | | | | | | | ODP ports are now 32-bit, so OVSP_LOCAL should be too. (Internally, kernel module still keeps port numbers 16-bit, though.) Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Add support for VXLAN tunnels to Open vSwitchKyle Mestery2012-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for VXLAN tunnels to Open vSwitch. Add support for setting the destination UDP port on a per-port basis. This is done by adding a "dst_port" parameter to the port configuration. This is only applicable currently to VXLAN tunnels. Please note this currently does not implement any sort of multicast learning. With this patch, VXLAN tunnels must be configured similar to GRE tunnels (e.g. point to point). A subsequent patch will implement a VXLAN control plane in userspace to handle multicast learning. This patch set is based on one posted by Ben Pfaff on Oct. 12, 2011 to the ovs-dev mailing list: http://openvswitch.org/pipermail/dev/2011-October/012051.html The patch has been maintained, updated, and freshened by me and a version of it is available at the following github repository: https://github.com/mestery/ovs-vxlan/tree/vxlan I've tested this patch with multiple VXLAN tunnels between hosts using different UDP port numbers. Performance is on par (though slightly faster) than comparable GRE tunnels. See the following IETF draft for additional information about VXLAN: http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-02 Signed-off-by: Kyle Mestery <kmestery@cisco.com> [jesse: simplify error path in vxlan_tunnel_setup, don't print default VXLAN port, and remove dead code] Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: add skb mark matching and set actionAnsis Atteka2012-11-211-0/+1
| | | | | | | This patch adds support for skb mark matching and set action. Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
* datapath: Shorten flow tunneling flags.Jesse Gross2012-11-061-3/+3
| | | | | | | | | 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: Include OVS_KEY_ATTR_IPV4_TUNNEL in upstream range.Jesse Gross2012-11-061-1/+1
| | | | | | | | | | | During development it was preferable to keep OVS_KEY_ATTR_IPV4_TUNNEL in the non-upstream range of identifiers to avoid conflicts or compatibility issues as it evolved. However, since the intention is to get it upstream, it makes sense to move it down now to avoid issues with compatibility when upgrading. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Add Upstream id for GRE type.Pravin B Shelar2012-11-051-0/+1
| | | | | | | | | 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: Add support for tun_key to Open vSwitch datapathKyle Mestery2012-10-201-1/+17
| | | | | | | | | | | | | | | | | | | | | 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: 64-bit GRE supportPravin B Shelar2012-10-051-0/+1
| | | | | | | | | | Extend GRE to have a 64-bit key. Use GRE sequence number to store upper 32-bits of the key, but this is not standard way of using GRE sequence number. Bug #13186 Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath: Reformat copyright messages.Jesse Gross2011-11-161-12/+12
| | | | | | | | | | | Many of our kernel copyright messages make reference to code being copied from the Linux kernel, which is a bit odd for code in the kernel. This changes them to use the standard GNU GPL boilerplate instead. It does not change the actual license, which continues to be GPLv2. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath: Don't drop packets with partial vlan tags.Ben Pfaff2011-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the future it is likely that our vlan support will expand to include multiply tagged packets. When this happens, we would ideally like for it to be consistent with our current tagging. Currently, if we receive a packet with a partial VLAN tag we will automatically drop it in the kernel, which is unique among the protocols we support. The only other reason to drop a packet is a memory allocation error. For a doubly tagged packet, we will parse the first tag and indicate that another tag was present but do not drop if the second tag is incorrect as we do not parse it. This changes the behavior of the vlan parser to match other protocols and also deeper tags by indicating the presence of a broken tag with the 802.1Q EtherType but no vlan information. This shifts the policy decision to userspace on whether to drop broken tags and allows us to uniformly add new levels of tag parsing. Although additional levels of control are provided to userspace, this maintains the current behavior of dropping packets with a broken tag when using the NORMAL action because that is the correct behavior for an 802.1Q-aware switch. The userspace flow parser actually already had the new behavior so this corrects an inconsistency. Reported-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Describe policy for extending flow key, implement needed changes.Ben Pfaff2011-11-141-19/+29
| | | | | | | | | | | | | | | | | | | | When the datapath was converted to use Netlink attributes for describing flow keys, I had a vague idea of how it could be smoothly extensible, but I didn't actually implement extensibility or carefully think it through. This commit adds a document that describes how flow keys can be extended in a compatible fashion and adapts the existing interface to match what it says. This commit doesn't actually implement extensibility. I already have a separate patch series out for that. This patch series borrows from that one heavily, but the extensibility series will need to be reworked somewhat once this one is in. This commit is only lightly tested because I don't have a good test setup for VLANs. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>