]> git.proxmox.com Git - ovs.git/commitdiff
compat: Include confirm_neigh parameter if needed
authorGreg Rose <gvrose8192@gmail.com>
Mon, 6 Jan 2020 21:36:34 +0000 (13:36 -0800)
committerSimon Horman <simon.horman@netronome.com>
Tue, 7 Jan 2020 07:57:12 +0000 (08:57 +0100)
A change backported to the Linux 4.14.162 LTS kernel requires
a boolean parameter.  Check for the presence of the parameter
and adjust the caller in that case.

Passes check-kmod test with no regressions.

Passes Travis build here:
https://travis-ci.org/gvrose8192/ovs-experimental/builds/633461320

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
acinclude.m4
datapath/linux/compat/ip6_gre.c
datapath/linux/compat/ip_tunnel.c

index 542637ac8cb8019aff86161236c008c2c437c363..18264c43bf42658a974befdec729f336e658df18 100644 (file)
@@ -1065,6 +1065,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
                   [OVS_DEFINE([HAVE_IP_GRE_CALC_HLEN])])
   OVS_GREP_IFELSE([$KSRC/include/linux/rbtree.h], [rb_link_node_rcu],
                   [OVS_DEFINE([HAVE_RBTREE_RB_LINK_NODE_RCU])])
+  OVS_GREP_IFELSE([$KSRC/include/net/dst_ops.h], [bool confirm_neigh],
+                  [OVS_DEFINE([HAVE_DST_OPS_CONFIRM_NEIGH])])
 
   if cmp -s datapath/linux/kcompat.h.new \
             datapath/linux/kcompat.h >/dev/null 2>&1; then
index afff817ecade3c2bfeafe6ee91eaeb8886b88bcd..7fd34530999cef8c57c84ece14092e82d1e5aa8a 100644 (file)
@@ -1089,7 +1089,11 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
 
        /* TooBig packet may have updated dst->dev's mtu */
        if (!t->parms.collect_md && dst && dst_mtu(dst) > dst->dev->mtu)
+#ifndef HAVE_DST_OPS_CONFIRM_NEIGH
                dst->ops->update_pmtu(dst, NULL, skb, dst->dev->mtu);
+#else
+               dst->ops->update_pmtu(dst, NULL, skb, dst->dev->mtu, false);
+#endif
 
        err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu,
                           NEXTHDR_GRE);
index 7dd57fee9e95bc99c0509ce87a14886e261b4b90..e7a0393582468165d03cfe09adc02e7a66b1a447 100644 (file)
@@ -267,7 +267,12 @@ static int rpl_tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
                mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
 
        if (skb_valid_dst(skb))
+#ifndef HAVE_DST_OPS_CONFIRM_NEIGH
                skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
+#else
+               skb_dst(skb)->ops->update_pmtu(skb_dst(skb),
+                                              NULL, skb, mtu, false);
+#endif
 
        if (skb->protocol == htons(ETH_P_IP)) {
                if (!skb_is_gso(skb) &&