summaryrefslogtreecommitdiff
path: root/datapath/linux/compat/lisp.c
Commit message (Collapse)AuthorAgeFilesLines
* datapath: lisp: Fix uninitialized field in tunnel_cfg.Yunjian Wang2018-09-121-0/+1
| | | | | | | | | The tunnel_cfg had the gro_receive and gro_complete fields uninitialized in function lisp_open(). This caused an uninitialized memory read. Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* datapath: compat: Fix ndo_size in RHEL 7.5 backportYi-Hung Wei2018-05-231-0/+1
| | | | | | | | | | | | If 'ndo_size' is not set in 'struct net_device_ops', RHEL kernel will not make use of functions in 'struct net_device_ops_extended'. Fixes: 39ca338374ab ("datapath: compat: Fix build on RHEL 7.5") Reported-by: Jiri Benc <jbenc@redhat.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-May/347070.html Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Jiri Benc <jbenc@redhat.com>
* compat: Remove unsupported kernel compat codeGreg Rose2018-05-211-2/+0
| | | | | | | | | Anything less than 3.10 isn't supported since a couple of releases ago so remove the dead code. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: William Tu <u9012063@gmail.com>
* datapath: compat: Fix build on RHEL 7.5Yi-Hung Wei2018-05-141-0/+4
| | | | | | | | | | | | | | | | | | 1) OVS datapath compat modules breaks on RHEL 7.5, because it moves ndo_change_mtu function pointer from 'struct net_device_ops' to 'struct net_device_ops_extended'. 2) RHEL 7.5 introduces the MTU range checking as mentioned in 6c0bf091 ("datapath: use core MTU range checking in core net infra"). However, the max_mtu field is defined in 'struct net_device_extended' but not in 'struct net_device' as upstream kernel. This patch defines a new symbol HAVE_RHEL7_MAX_MTU that determines the previous 2 conditions, and fixes the backport issue. Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Acked-by: Lucas Alvares Gomes <lucasagomes@gmail.com> Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
* datapath: Fixup RTNL ops for kernel 4.13Greg Rose2017-09-221-11/+10
| | | | | | | | | | | | | The RTNL ops validate and newlink functions now take the extended netlink ack parameter. Use the new HAVE_EXT_ACK_IN_RTNL_LINKOPS define to check if the additional parameter is present and add the parameter if so. While in the modules remove the checks for Linux kernels < 2.3.39 since they are no longer supported since 2.5.x. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Andy Zhou <azhou@ovn.org>
* compat: Implement upstream net device free change.Greg Rose2017-07-241-0/+4
| | | | | | | | | | | | Upstream commit cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.") removed the destructor member of the net_device structure and replaced it with a boolean flag indicating that the net device resource needs freeing. Use compat flag HAVE_NEEDS_FREE_NETDEV to indicate whether the new flag should be used. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Joe Stringer <joe@ovn.org>
* lisp: avoid using stale lisp socket.Pravin B Shelar2016-10-311-9/+25
| | | | | | | | | | | This patch is similar to earlier vxlan patch. Lisp device close operation frees lisp socket. This operation can race with lisp-xmit function which dereferences lisp socket. Following patch uses RCU mechanism to avoid this situation. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Joe Stringer <joe@ovn.org>
* datapath: compat: tunnels: Log error during initialization.Pravin B Shelar2016-09-151-0/+1
| | | | | | | | | | At present OVS compat tunneling can fail due to conflict with already loaded tunneling kernel module. In this case openvswitch kernel module loading fails silently. Following patch give more clues about what went wrong. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Add support for kernel 4.6Pravin B Shelar2016-07-261-2/+25
| | | | | | | | | 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>
* 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: reset md_dst on recieve.Pravin B Shelar2016-07-171-1/+1
| | | | | | | On transmit metadata dst is cleared, do same on recieve. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: backport: ip_tunnel: Move stats update to iptunnel_xmit()Pravin B Shelar2016-07-081-5/+4
| | | | | | | | | | | | | | | | | | | Upstream commit: commit 039f50629b7f860f36644ed1f34b27da9aa62f43 Author: Pravin B Shelar <pshelar@ovn.org> ip_tunnel: Move stats update to iptunnel_xmit() By moving stats update into iptunnel_xmit(), we can simplify iptunnel_xmit() usage. With this change there is no need to call another function (iptunnel_xmit_stats()) to update stats in tunnel xmit code path. Signed-off-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: compat: rename HAVE_METADATA_DST to USE_UPSTREAM_TUNNELPravin B Shelar2016-07-081-4/+4
| | | | | | | 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_core: iptunnel_handle_offloads returns int and ↵Pravin B Shelar2016-07-081-5/+2
| | | | | | | | | | | | | | doesn't free skb There is return type change in upstream handle-offload functions. Following patch brings these changes in. This is backport of aed069df ("ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb") I have also removed duplicate definitions of tunnel_handle_offloads() from ip-tunnel header. 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-1/+4
| | | | | | | | | | | | | | | | | 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-8/+56
| | | | | | | | | | | | | 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: Drop support for kernel older than 3.10Pravin B Shelar2016-03-141-7/+3
| | | | | | | | | | | | | | | | 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: lisp: Relax MTU constraints.Joe Stringer2016-02-191-1/+15
| | | | | | | | | | Currently, even if the entire path supports jumbo frames, the LISP netdev limits the path MTU to 1500 bytes, and cannot be configured otherwise. Relax the constraints on modifying the device MTU, and set it to the maximum by default. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
* datapath: Add support for lwtunnelPravin B Shelar2015-12-031-0/+711
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>