2020-07-14 11:02:52 +00:00
|
|
|
From 6d90cbb44fd51e1cbb757107d2a86276a66c43df Mon Sep 17 00:00:00 2001
|
2020-01-08 04:03:06 +00:00
|
|
|
From: Greg Rose <gvrose8192@gmail.com>
|
|
|
|
Date: Mon, 6 Jan 2020 13:36:34 -0800
|
|
|
|
Subject: [PATCH] compat: Include confirm_neigh parameter if needed
|
|
|
|
|
|
|
|
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>
|
2020-07-14 11:02:52 +00:00
|
|
|
(cherry picked from commit 6634cc8aed485967737ef7eda489b9d625a4ca74)
|
2020-01-08 04:03:06 +00:00
|
|
|
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
|
|
|
|
---
|
|
|
|
acinclude.m4 | 2 ++
|
|
|
|
datapath/linux/compat/ip6_gre.c | 4 ++++
|
|
|
|
datapath/linux/compat/ip_tunnel.c | 5 +++++
|
|
|
|
3 files changed, 11 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/acinclude.m4 b/acinclude.m4
|
2020-07-14 11:02:52 +00:00
|
|
|
index f15b1ff67..84098f2a5 100644
|
2020-01-08 04:03:06 +00:00
|
|
|
--- a/acinclude.m4
|
|
|
|
+++ b/acinclude.m4
|
2020-07-14 11:02:52 +00:00
|
|
|
@@ -967,6 +967,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
|
|
|
|
[OVS_DEFINE([HAVE_NF_CONNTRACK_IN_TAKES_NF_HOOK_STATE])])
|
|
|
|
OVS_GREP_IFELSE([$KSRC/include/net/ipv6_frag.h], [IP6_DEFRAG_CONNTRACK_IN],
|
|
|
|
[OVS_DEFINE([HAVE_IPV6_FRAG_H])])
|
2020-01-08 04:03:06 +00:00
|
|
|
+ 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
|
|
|
|
diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c
|
2020-07-14 11:02:52 +00:00
|
|
|
index 2ffdda5e1..89705d778 100644
|
2020-01-08 04:03:06 +00:00
|
|
|
--- a/datapath/linux/compat/ip6_gre.c
|
|
|
|
+++ b/datapath/linux/compat/ip6_gre.c
|
2020-07-14 11:02:52 +00:00
|
|
|
@@ -1196,7 +1196,11 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
|
2020-01-08 04:03:06 +00:00
|
|
|
|
|
|
|
/* 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);
|
|
|
|
diff --git a/datapath/linux/compat/ip_tunnel.c b/datapath/linux/compat/ip_tunnel.c
|
2020-07-14 11:02:52 +00:00
|
|
|
index d16e60fbf..f1c8ba7cd 100644
|
2020-01-08 04:03:06 +00:00
|
|
|
--- a/datapath/linux/compat/ip_tunnel.c
|
|
|
|
+++ b/datapath/linux/compat/ip_tunnel.c
|
2020-07-14 11:02:52 +00:00
|
|
|
@@ -266,7 +266,12 @@ static int rpl_tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
|
|
|
|
mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
|
2020-01-08 04:03:06 +00:00
|
|
|
|
|
|
|
if (skb_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) &&
|