From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: Julian Anastasov <ja@ssi.bg>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
David Ahern <dsahern@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Guillaume Nault <gnault@redhat.com>,
David Miller <davem@davemloft.net>,
Pablo Neira <pablo@netfilter.org>,
Stephen Hemminger <stephen@networkplumber.org>,
Alexey Kodanev <alexey.kodanev@oracle.com>,
Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCHv5 net 5/8] tunnel: do not confirm neighbor when do pmtu update
Date: Sun, 22 Dec 2019 10:51:13 +0800 [thread overview]
Message-ID: <20191222025116.2897-6-liuhangbin@gmail.com> (raw)
In-Reply-To: <20191222025116.2897-1-liuhangbin@gmail.com>
When do tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end,
we should not call dst_confirm_neigh() as there is no two-way communication.
v5: No Change.
v4: Update commit description
v3: Do not remove dst_confirm_neigh, but add a new bool parameter in
dst_ops.update_pmtu to control whether we should do neighbor confirm.
Also split the big patch to small ones for each area.
v2: Remove dst_confirm_neigh in __ip6_rt_update_pmtu.
Fixes: 0dec879f636f ("net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP")
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Tested-by: Guillaume Nault <gnault@redhat.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
net/ipv4/ip_tunnel.c | 2 +-
net/ipv6/ip6_tunnel.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 38c02bb62e2c..0fe2a5d3e258 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -505,7 +505,7 @@ static int 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))
- skb_dst_update_pmtu(skb, mtu);
+ skb_dst_update_pmtu_no_confirm(skb, mtu);
if (skb->protocol == htons(ETH_P_IP)) {
if (!skb_is_gso(skb) &&
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 754a484d35df..2f376dbc37d5 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -640,7 +640,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
if (rel_info > dst_mtu(skb_dst(skb2)))
goto out;
- skb_dst_update_pmtu(skb2, rel_info);
+ skb_dst_update_pmtu_no_confirm(skb2, rel_info);
}
icmp_send(skb2, rel_type, rel_code, htonl(rel_info));
@@ -1132,7 +1132,7 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
mtu = max(mtu, skb->protocol == htons(ETH_P_IPV6) ?
IPV6_MIN_MTU : IPV4_MIN_MTU);
- skb_dst_update_pmtu(skb, mtu);
+ skb_dst_update_pmtu_no_confirm(skb, mtu);
if (skb->len - t->tun_hlen - eth_hlen > mtu && !skb_is_gso(skb)) {
*pmtu = mtu;
err = -EMSGSIZE;
--
2.19.2
next prev parent reply other threads:[~2019-12-22 2:51 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 6:19 [PATCH net] ipv6/route: only update neigh confirm time if pmtu changed Hangbin Liu
2019-11-22 18:04 ` David Miller
2019-11-26 9:17 ` Hangbin Liu
2019-12-03 2:11 ` [PATCHv2 net] ipv6/route: should not update neigh confirm time during PMTU update Hangbin Liu
2019-12-03 2:47 ` David Miller
2019-12-03 10:15 ` Hangbin Liu
2019-12-03 10:25 ` Hangbin Liu
2019-12-03 19:58 ` David Miller
2019-12-10 3:36 ` Hangbin Liu
2019-12-10 17:00 ` Guillaume Nault
2019-12-18 11:53 ` [PATCH net-next 0/8] disable neigh update for tunnels during pmtu update Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 1/8] net: add bool confirm_neigh parameter for dst_ops.update_pmtu Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 2/8] ip6_gre: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 3/8] gtp: " Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 4/8] net/dst: add new function skb_dst_update_pmtu_no_confirm Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 5/8] tunnel: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-19 17:47 ` Guillaume Nault
2019-12-20 2:36 ` Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 6/8] vti: " Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 7/8] sit: " Hangbin Liu
2019-12-18 11:53 ` [PATCH net-next 8/8] net/dst: do not confirm neighbor for vxlan and geneve " Hangbin Liu
2019-12-19 17:49 ` Guillaume Nault
2019-12-18 12:01 ` [PATCH net-next 0/8] disable neigh update for tunnels during " Hangbin Liu
2019-12-19 17:57 ` Guillaume Nault
2019-12-20 2:48 ` Hangbin Liu
2019-12-19 17:53 ` Guillaume Nault
2019-12-20 3:25 ` [PATCHv4 net " Hangbin Liu
2019-12-20 3:25 ` [PATCHv4 net 1/8] net: add bool confirm_neigh parameter for dst_ops.update_pmtu Hangbin Liu
2019-12-20 3:25 ` [PATCHv4 net 2/8] ip6_gre: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-20 3:25 ` [PATCHv4 net 3/8] gtp: " Hangbin Liu
2019-12-21 18:35 ` Guillaume Nault
2019-12-20 3:25 ` [PATCHv4 net 4/8] net/dst: add new function skb_dst_update_pmtu_no_confirm Hangbin Liu
2019-12-20 3:25 ` [PATCHv4 net 5/8] tunnel: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-21 18:43 ` Guillaume Nault
2019-12-20 3:25 ` [PATCHv4 net 6/8] vti: " Hangbin Liu
2019-12-21 18:30 ` Guillaume Nault
2019-12-20 3:25 ` [PATCHv4 net 7/8] sit: " Hangbin Liu
2019-12-20 3:25 ` [PATCHv4 net 8/8] net/dst: do not confirm neighbor for vxlan and geneve " Hangbin Liu
2019-12-21 18:38 ` Guillaume Nault
2019-12-20 16:14 ` [PATCHv4 net 0/8] disable neigh update for tunnels during " David Ahern
2019-12-22 2:51 ` [PATCHv5 " Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 1/8] net: add bool confirm_neigh parameter for dst_ops.update_pmtu Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 2/8] ip6_gre: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 3/8] gtp: " Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 4/8] net/dst: add new function skb_dst_update_pmtu_no_confirm Hangbin Liu
2019-12-22 2:51 ` Hangbin Liu [this message]
2019-12-22 2:51 ` [PATCHv5 net 6/8] vti: do not confirm neighbor when do pmtu update Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 7/8] sit: " Hangbin Liu
2019-12-22 2:51 ` [PATCHv5 net 8/8] net/dst: do not confirm neighbor for vxlan and geneve " Hangbin Liu
2019-12-22 22:10 ` [PATCHv5 net 0/8] disable neigh update for tunnels during " Guillaume Nault
2019-12-25 6:30 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191222025116.2897-6-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=alexey.kodanev@oracle.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=ja@ssi.bg \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).