summaryrefslogtreecommitdiff
path: root/acinclude.m4
Commit message (Collapse)AuthorAgeFilesLines
* datapath: Add support for kernel 4.7Pravin B Shelar2016-08-221-2/+2
| | | | | Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* netdev-dpdk: Fix occurance of error logCiara Loftus2016-08-181-1/+2
| | | | | | | | | | | | If NUMA information can't be derived from a vHost User device, only print an error if the VHOST_NUMA option is enabled in DPDK. Otherwise 'fail' silently. Fixes: 0a0f39df1d5a ("netdev-dpdk: Add support for DPDK 16.07") Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Reported-by: Ian Stokes <ian.stokes@intel.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: compat: backport LCO optimization.Pravin B Shelar2016-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This basically backport commit: commit 179bc67f69b6cb53ad68cfdec5a917c2a2248355 Author: Edward Cree <ecree@solarflare.com> Date: Thu Feb 11 20:48:04 2016 +0000 net: local checksum offload for encapsulation The arithmetic properties of the ones-complement checksum mean that a correctly checksummed inner packet, including its checksum, has a ones complement sum depending only on whatever value was used to initialise the checksum field before checksumming (in the case of TCP and UDP, this is the ones complement sum of the pseudo header, complemented). Consequently, if we are going to offload the inner checksum with CHECKSUM_PARTIAL, we can compute the outer checksum based only on the packed data not covered by the inner checksum, and the initial value of the inner checksum field. Signed-off-by: Edward Cree <ecree@solarflare.com> 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>
* netdev-dpdk: Remove dpdkvhostcuse portsCiara Loftus2016-08-151-12/+0
| | | | | | | | | | | | | | | | | | | This commit removes the 'dpdkvhostcuse' port type from the userspace datapath. vhost-cuse ports are quickly becoming obsolete as the vhost-user port type begins to support a greater feature-set thanks to the addition of things like vhost-user multiqueue and potential upcoming features like vhost-user client-mode and vhost-user reconnect. The feature is also expected to be removed from DPDK soon. One potential drawback of the removal of this support is that a userspace vHost port type is not available in OVS for use with older versions of QEMU (pre v2.2). Considering v2.2 is nearly two years old this should however be a low impact change. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
* netdev-dpdk: add DPDK pdump capabilityCiara Loftus2016-08-121-0/+23
| | | | | | | | | | | | | | | This commit provides the ability to 'listen' on DPDK ports and save packets to a pcap file with a DPDK app that uses the librte_pdump library. One such app is the 'pdump' app that can be found in the DPDK 'app' directory. Instructions on how to use this can be found in INSTALL.DPDK-ADVANCED.md Pdump capability in OVS with DPDK will only be initialised if the CONFIG_RTE_LIBRTE_PMD_PCAP=y and CONFIG_RTE_LIBRTE_PDUMP=y options are set in DPDK. libpcap is required if the above configuration is used. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: compat: keep skb mark across tunnel devices.Pravin B Shelar2016-08-121-2/+0
| | | | | | | | | | | | | Older kernel skb_scrub_packet() has bug which resets skb mark for all packet. It is fixed during 3.18 release where it is reset only for packets crossing namespace. So OVS is forced to use compat skb_scrub_packet() on older kernel. This is related to upstream bug fix commit ca7c7b9059e3 ("skbuff: Do not scrub skb mark within the same name space"). VMware-BZ: #1710701 Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* datapath: compat: geneve: fix geneve_notify_add_rx_port()Pravin B Shelar2016-08-111-0/+4
| | | | | | | | Remove mutual exclusion between udp-gro registration and geneve receive port registration. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* netdev-dpdk: Make libnuma dependencies optionalCiara Loftus2016-08-041-2/+12
| | | | | | | | | | Prior to this patch, OVS with DPDK required the libnuma packages to build. This patch removes this dependency, making it only a requirement when the CONFIG_RTE_LIBRTE_VHOST_NUMA option is detected as enabled in the DPDK build. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: compat: Detect GSO support at ovs configurePravin B Shelar2016-08-031-0/+2
| | | | | | | | | | OVS turns on tunnel GSO for statically for kernel older than 3.18. Some distributions kernel could backport tunnel GSO. To make use of device offload on such kernel detect the support at configure stage. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* compat: Properly handle fragment lru.Joe Stringer2016-08-011-0/+1
| | | | | | | | | | | In kernels <=3.16 there is an LRU for managing fragment queues for IPv4 and IPv6. Because the backport code comes from more recent upstream versions of Linux, this LRU management was missing from ip_frag_queue() and nf_ct_frag6_queue(). Fixes: 595e069a0634 ("compat: Backport IPv4 reassembly.") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* compat: Simplify inet_fragment backports.Joe Stringer2016-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core fragmentation handling logic is exported on all supported kernels, so it's not necessary to backport the latest version of this. This greatly simplifies the code due to inconsistencies between the old per-lookup garbage collection and the newer workqueue based garbage collection. As a result of simplifying and removing unnecessary backport code, a few bugs are fixed for corner cases such as when some fragments remain in the fragment cache when openvswitch is unloaded. Some backported ip functions need a little extra logic than what is seen on the latest code due to this, for instance on kernels <3.17: * Call inet_frag_evictor() before defrag * Limit hashsize in ip{,6}_fragment logic The pernet init/exit logic also differs a little from upstream. Upstream ipv[46]_defrag logic initializes the various pernet fragment parameters and its own global fragments cache. In the OVS backport, the pernet parameters are shared while the fragments cache is separate. The backport relies upon upstream pernet initialization to perform the shared setup, and performs no pernet initialization of its own. When it comes to pernet exit however, the backport must ensure that all OVS-specific fragment state is cleared, while the shared state remains untouched so that the regular ipv[46] logic may do its own cleanup. In practice this means that OVS must have its own divergent implementation of inet_frags_exit_net(). Fixes the following crash: Call Trace: <IRQ> [<ffffffff810744f6>] ? call_timer_fn+0x36/0x100 [<ffffffff8107548f>] run_timer_softirq+0x1ef/0x2f0 [<ffffffff8106cccc>] __do_softirq+0xec/0x2c0 [<ffffffff8106d215>] irq_exit+0x105/0x110 [<ffffffff81737095>] smp_apic_timer_interrupt+0x45/0x60 [<ffffffff81735a1d>] apic_timer_interrupt+0x6d/0x80 <EOI> [<ffffffff8104f596>] ? native_safe_halt+0x6/0x10 [<ffffffff8101cb2f>] default_idle+0x1f/0xc0 [<ffffffff8101d406>] arch_cpu_idle+0x26/0x30 [<ffffffff810bf3a5>] cpu_startup_entry+0xc5/0x290 [<ffffffff810415ed>] start_secondary+0x21d/0x2d0 Code: Bad RIP value. RIP [<ffffffffa0177480>] 0xffffffffa0177480 RSP <ffff88003f703e78> CR2: ffffffffa0177480 ---[ end trace eb98ca80ba07bd9c ]--- Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* datapath: Add support for kernel 4.6Pravin B Shelar2016-07-261-3/+4
| | | | | | | | | Most of patch iron out USE_UPSTREAM_TUNNEL case where datapath directly use upstream tunneling modules. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org> Acked-by: Amitabha Biswas <abiswas@us.ibm.com>
* datapath: compat: fix udp checksum calculationPravin B Shelar2016-07-261-1/+0
| | | | | | | | | | In upstream linux kernel networking stack udp_set_csum() is called with only udp header applied but in case of compat layer it can be called with IP header. So following patch take the offset into account. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Add support for kernel 4.5Pravin B Shelar2016-07-191-2/+5
| | | | | Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Add support for kernel 4.4Pravin B Shelar2016-07-181-2/+15
| | | | | | | | Most of changes are related to ip-fragment API and genetlink API changes. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: genlmsg_new_unicast to genlmsg_newPravin B Shelar2016-07-181-1/+0
| | | | | | | | | | | | | | API changes are related commit: openvswitch: Revert: "Enable memory mapped Netlink i/o" revert commit 795449d8b846 ("openvswitch: Enable memory mapped Netlink i/o"). Following the mmaped netlink removal this code can be removed. Signed-off-by: Florian Westphal <fw@strlen.de> 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>
* datapath: use PTR_ERR_OR_ZEROPravin B Shelar2016-07-171-0/+1
| | | | | | | | | | | | | | | Upstream commit: commit f35423c137b0e64155f52c166db1d13834a551f2 Author: Fabian Frederick <fabf@skynet.be> openvswitch: use PTR_ERR_OR_ZERO Signed-off-by: Fabian Frederick <fabf@skynet.be> 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>
* datapath: backport: ovs: propagate per dp max headroom to all vportsPravin B Shelar2016-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | Upstream commit: commit 3a927bc7cf9d0fbe8f4a8189dd5f8440228f64e7 Author: Paolo Abeni <pabeni@redhat.com> ovs: propagate per dp max headroom to all vports This patch implements bookkeeping support to compute the maximum headroom for all the devices in each datapath. When said value changes, the underlying devs are notified via the ndo_set_rx_headroom method. This also increases the internal vports xmit performance. Signed-off-by: Paolo Abeni <pabeni@redhat.com> 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>
* datapath: backport: ovs: align nlattr properly when neededPravin B Shelar2016-07-171-0/+1
| | | | | | | | | | | | | | | | | | Upstream commit: commit 66c7a5ee1a6b7c69d41dfd68d207fdd54efba56a Author: Nicolas Dichtel <nicolas.dichtel@6wind.com> ovs: align nlattr properly when needed I also fix commit 8b32ab9e6ef1: use nla_total_size_64bit() for OVS_FLOW_ATTR_USED in ovs_flow_cmd_msg_size(). Fixes: 8b32ab9e6ef1 ("ovs: use nla_put_u64_64bit()") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> 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>
* datapath: Use skb_postpush_rcsum()Pravin B Shelar2016-07-171-0/+1
| | | | | | | Use kernel function to update checksum. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: get rid of OVS_CB inner header offsets.Pravin B Shelar2016-07-081-2/+1
| | | | | | | | | | | | OVS has GSO compat functionality which needs inner offset of the packet to segment a packet. older kernel did not include these offsets in skb, therefore these were stored in OVS_GSO_CB. Now OVS has dropped support for these old kernel, So none of the supported kernel needs this comapt code. Following patch removes it. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: Update Geneve and VxLAN modules.Pravin B Shelar2016-07-081-2/+12
| | | | | | | | | | | This patch brings in various updates to upstream Geneve and VxLAN modules. For geneve this patch adds IPv6 support, for vxlan it adds VXLAN GPE is the major feature. This should make OVS compat tunnel implementation in sync upto current net branch. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: backport: udp: Add socket based GRO and configPravin B Shelar2016-07-081-0/+2
| | | | | | | | | | | | | | | Upstream commit: commit 38fd2af24fcfda93f9fea3e53f26e48775ae9e09 Author: Tom Herbert <tom@herbertland.com> udp: Add socket based GRO and config Add gro_receive and gro_complete to struct udp_tunnel_sock_cfg. Signed-off-by: Tom Herbert <tom@herbertland.com> 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>
* datapath: compat: Update udp_sock_createPravin B Shelar2016-07-081-0/+2
| | | | | | | | | | Update udp-socket-create to create ipv6 socket currectly. Partially backports commit fd384412e199b ("udp_tunnel: Seperate ipv6 functions into its own file.") Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat: rename HAVE_METADATA_DST to USE_UPSTREAM_TUNNELPravin B Shelar2016-07-081-1/+1
| | | | | | | To better represent the meaning of symbol. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: backport: ip_tunnel: add support for setting flow label via ↵Pravin B Shelar2016-07-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | collect metadata Update udp_tunnel6_xmit_skb(). Specificaly changes are related to setting ipv6 label. Upstream commit: commit 134611446dc657e1bbc73ca0e4e6b599df687db0 Author: Daniel Borkmann <daniel@iogearbox.net> ip_tunnel: add support for setting flow label via collect metadata This patch extends udp_tunnel6_xmit_skb() to pass in the IPv6 flow label from call sites. Currently, there's no such option and it's always set to zero when writing ip6_flow_hdr(). Add a label member to ip_tunnel_key, so that flow-based tunnels via collect metadata frontends can make use of it. vxlan and geneve will be converted to add flow label support separately. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> 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>
* datapath: backport: tunnels: Remove encapsulation offloads on decap.Pravin B Shelar2016-07-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following patch backports updated iptunnel pull function. Also brings in following upstream fix: commit a09a4c8dd1ec7f830e1fb9e59eb72bddc965d168 Author: Jesse Gross <jesse@kernel.org> tunnels: Remove encapsulation offloads on decap. If a packet is either locally encapsulated or processed through GRO it is marked with the offloads that it requires. However, when it is decapsulated these tunnel offload indications are not removed. This means that if we receive an encapsulated TCP packet, aggregate it with GRO, decapsulate, and retransmit the resulting frame on a NIC that does not support encapsulation, we won't be able to take advantage of hardware offloads even though it is just a simple TCP packet at this point. This fixes the problem by stripping off encapsulation offload indications when packets are decapsulated. The performance impacts of this bug are significant. In a test where a Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed, decapsulated, and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a result of avoiding unnecessary segmentation at the VM tap interface. Reported-by: Ramu Ramamurthy <sramamur@linux.vnet.ibm.com> Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE") Signed-off-by: Jesse Gross <jesse@kernel.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>
* datapath: backport: iptunnel: scrub packet in iptunnel_pull_headerPravin B Shelar2016-07-081-0/+1
| | | | | | | | | | | | | | | | | Upstream Commit: commit 7f290c94352e59b1d720055fce760a69a63bd0a1 Author: Jiri Benc <jbenc@redhat.com> iptunnel: scrub packet in iptunnel_pull_header Part of skb_scrub_packet was open coded in iptunnel_pull_header. Let it call skb_scrub_packet directly instead. Signed-off-by: Jiri Benc <jbenc@redhat.com> 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>
* datapath: compat: Refactor egress tunnel infoPravin B Shelar2016-07-081-0/+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>
* compat: ipv4: Pass struct net through ip_fragment.Eric W. Biederman2016-06-271-1/+3
| | | | | | | | | | | Upstream commit: ipv4: Pass struct net through ip_fragment Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Upstream: 694869b3c544 ("ipv4: Pass struct net through ip_fragment") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* acinclude: check for numa libraryBhanuprakash Bodireddy2016-06-241-0/+2
| | | | | | | | | | | | | | | Numa library is needed for NUMA aware vHost User functionality. Incase of missing numa package, the OVS DPDK configuration fails with "error: Could not find DPDK libraries in <DPDK_LOC>/TARGET/lib" though the DPDK library is installed. This patch fixes this inappropriate error by checking for presence of numa library and output an appropriate error message "error: unable to find libnuma, install the dependency package" in case of missing package. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Acked-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: change nf_connlabels_get bit arg to 'highest used'Jarno Rajahalme2016-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: commit adff6c65600000ec2bb71840c943ee12668080f5 Author: Florian Westphal <fw@strlen.de> Date: Tue Apr 12 18:14:25 2016 +0200 netfilter: connlabels: change nf_connlabels_get bit arg to 'highest used' nf_connlabel_set() takes the bit number that we would like to set. nf_connlabels_get() however took the number of bits that we want to support. So e.g. nf_connlabels_get(32) support bits 0 to 31, but not 32. This changes nf_connlabels_get() to take the highest bit that we want to set. Callers then don't have to cope with a potential integer wrap when using nf_connlabels_get(bit + 1) anymore. Current callers are fine, this change is only to make folloup nft ct label set support simpler. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Jarno Rajahalme <jarno@ovn.org> OVS compat code defined nf_connlabels_get() if it was missing. Now we redefine it if it is missing, or if it has the old signature. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: compat for NAT.Jarno Rajahalme2016-06-201-0/+3
| | | | | | | | | | | Compat code required to make the NAT code in the following patch compile with Linux 3.10 - 4.6. Some compat code applies to the conntrack.c itself; these are added after the main NAT backport for conntrack.c later in the series. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* acinclude: Add OVS_FIND_PARAM_IFELSE.Jarno Rajahalme2016-06-201-4/+37
| | | | | | | | | | | | OVS_FIND_PARAM_IFELSE is more robust macro for checking function parameters, as it does not require the parameter to be on the same line as the function name like the OVS_GREP_IFELSE does. Use this to fix the check for struct conntrack_zone parameter, which is on a different line on Linux 4.3 and higher. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* netdev-dpdk: NUMA Aware vHost UserCiara Loftus2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | This commit allows for vHost User memory from QEMU, DPDK and OVS, as well as the servicing PMD, to all come from the same socket. The socket id of a vhost-user port used to be set to that of the master lcore. Now it is possible to update the socket id if it is detected (during VM boot) that the vhost device memory is not on this node. If this is the case, a new mempool is created from the new node, and the PMD thread currently servicing the port will no longer, in favour of a thread from the new node (if enabled in the pmd-cpu-mask). To avail of this functionality, one must enable the CONFIG_RTE_LIBRTE_VHOST_NUMA DPDK configuration option. Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* acinclude: fix issue when configuring with --with-dpdkMauricio Vasquez B2016-06-011-2/+3
| | | | | | | | | | | | when an empty path is given to the --with-dpdk option (--with-dpdk="" or --width-dpdk=$NON_SET_ENV_VARIABLE) the configure script does not show any error and configures OvS without DPDK support, this can create some confusion. This patch modifies that behavior showing an explicity error in that case. Signed-off-by: Mauricio Vasquez B <mauricio.vasquezbernal@studenti.polito.it> Signed-off-by: Ben Pfaff <blp@ovn.org>
* acinclude.m4: Fix skb_get_hash function detectionMarkos Chandras2016-05-161-1/+2
| | | | | | | | | | | | | | | | Commit e2f3178f0582 ("datapath: Add support for kernel 3.14.") added support for 3.14 kernels and a new OVS_GREP_IFELSE check for the "skg_get_hash" function in the process. "skb_get_hash" was introduced in the Linux kernel commit 3958afa1b272 ("net: Change skb_get_rxhash to skb_get_hash") which exists in >=3.14 but the OVS_GREP_IFELSE macro also matches the "skb_get_hash_raw" function which exists in older kernels. As a result of which, the check makes the build system behave as if the "skb_get_hash" function is available in these older kernels leading to build failures. We fix this by explicitly checking for "skb_get_hash(" which matches the function definition. Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Jesse Gross <jesse@kernel.org>
* compat: Remove skbuff header helper backports.Joe Stringer2016-05-031-4/+0
| | | | | | | These have existed largely since v2.6.22, so it's well overdue. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* compat: Remove unused ipv[46] backports.Joe Stringer2016-05-031-1/+0
| | | | | | | | These pieces #if on kernel versions which are not supported since commit f2ab1536ddbc ("compat: Backport conntrack strictly to v3.10+.") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* compat: ipv4: Pass struct net into ip_defrag.Joe Stringer2016-05-021-0/+2
| | | | | | | | | | | | | | | | | | | | Upstream commit: ipv4: Pass struct net into ip_defrag and ip_check_defrag The function ip_defrag is called on both the input and the output paths of the networking stack. In particular conntrack when it is tracking outbound packets from the local machine calls ip_defrag. So add a struct net parameter and stop making ip_defrag guess which network namespace it needs to defragment packets in. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net> Upstream: 19bcf9f203c8 ("ipv4: Pass struct net into ip_defrag and ip_check_defrag") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* compat: Add a struct net parameter to l4_pkt_to_tuple.Joe Stringer2016-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | Upstream commit: netfilter: nf_conntrack: Add a struct net parameter to l4_pkt_to_tuple As gre does not have the srckey in the packet gre_pkt_to_tuple needs to perform a lookup in it's per network namespace tables. Pass in the proper network namespace to all pkt_to_tuple implementations to ensure gre (and any similar protocols) can get this right. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Upstream: a31f1adc0948 ("netfilter: nf_conntrack: Add a struct net parameter to l4_pkt_to_tuple") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* acinclude: Autodetect DPDK location when configuring OVSBhanuprakash Bodireddy2016-04-151-24/+52
| | | | | | | | | | | | | | | When using DPDK datapath, the OVS configure script requires the DPDK build directory passed on --with-dpdk. This can be avoided if DPDK library, headers are in standard compiler search paths. This patch fixes the problem by searching for DPDK libraries in standard locations and configure OVS sources for dpdk datapath. If the install location is manually specified in "--with-dpdk" autodiscovery shall be skipped. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
* datapath: Check for sock argument to v6ops->fragment.Jesse Gross2016-03-211-1/+1
| | | | | | | | | | | | | | | | | Ubuntu 3.13.0-83-generic has backported a patch that adds an intermediate version of the v6ops->fragment function that doesn't seem to ever been part of a released upstream kernel. This version is missing the sock argument to the fragment function. Since we already have a backported version of the function from a newer kernel, this simply ignores the version that Ubuntu is now making available and continues to use the OVS version, similar to what it was doing before. Reported-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Reported-by: Aaron Rosen <aaronorosen@gmail.com> Reported-by: Russell Bryant <russell@ovn.org> Signed-off-by: Jesse Gross <jesse@kernel.org> Acked-by: Russell Bryant <russell@ovn.org>
* datapath: Remove OVS_FRAGMENT_BACKPORTPravin B Shelar2016-03-141-9/+0
| | | | | | | | This macro is not required as we drop support for unsupported kernel versions. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Drop support for kernel older than 3.10Pravin B Shelar2016-03-141-14/+7
| | | | | | | | | | | | | | | | Currently OVS out of tree datapath supports a large number of kernel versions. From 2.6.32 to 4.3 and various distribution-specific kernels. But at this point major features are only available on more recent kernels. For example, stateful services are only available starting in kernel 3.10 and STT is available on starting with 3.5. Since these features are becoming essential to many OVS deployments, and the effort of maintaining the backports is high. We have decided to drop support for older kernel. Following patch drops supports for kernel older than 3.10. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Set a large MTU on tunnel devices.David Wragg2016-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could transmit vxlan packets of any size, constrained only by the ability to send out the resulting packets. 4.3 introduced netdevs corresponding to tunnel vports. These netdevs have an MTU, which limits the size of a packet that can be successfully encapsulated. The default MTU values are low (1500 or less), which is awkwardly small in the context of physical networks supporting jumbo frames, and leads to a conspicuous change in behaviour for userspace. Instead, set the MTU on openvswitch-created netdevs to be the relevant maximum (i.e. the maximum IP packet size minus any relevant overhead), effectively restoring the behaviour prior to 4.3. Signed-off-by: David Wragg <david@weave.works> Signed-off-by: David S. Miller <davem@davemloft.net> Upstream: 7e059158d57b ("vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Re-designate OVS_FRAGMENT_BACKPORT.Joe Stringer2016-02-041-1/+4
| | | | | | | | | | | | | | | | | Typically the way that we include backported code is by testing for existence of the feature in the upstream codebase via header checks, then attempt to use the upstream code as much as possible. However, for the IP fragmentation handling backport we have an additional constraint which is that we cannot support kernels older than Linux-3.10. To date, OVS_FRAGMENT_BACKPORT has been defined to include the backport of the IP fragmentation code for all kernels from 3.10 to 4.2, rather than attempting to use the upstream code as much as possible. This patch relaxes OVS_FRAGMENT_BACKPORT to only check the lower bound so that the upstream code may be used in more circumstances. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* compat: Detect and use upstream ip_fragment().Joe Stringer2016-02-041-0/+3
| | | | | | | | | | Previously a version check was used to determine whether the upstream ip_fragment() should be used or the backported version. The actual test is for whether upstream commit d6b915e29f4a ("ip_fragment: don't forward defragmented DF packet") is present, so test for that instead. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* compat: Detect and use inet_frag_queue->list_evictor.Joe Stringer2016-02-041-0/+3
| | | | | | | | | | | Kernels 3.17 to 4.2 have a work queue to evict old fragments, but do not track these fragments in an eviction list. On these kernels, we detect the absence of the list_evictor and provide one. This commit fixes the reliance on kernel versions in the case that this functionality is backported. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
* compat: Detect and use nf_ct_frag6_gather().Joe Stringer2016-02-021-0/+4
| | | | | | | | | This function is a likely candidate for backporting, and currently relies on version checks to include the source or not. Grep for the appropriate functions instead, and include the backport based on that. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>