* [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md
@ 2018-10-12 12:32 Stefano Brivio
2018-10-12 15:58 ` Nicolas Dichtel
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Brivio @ 2018-10-12 12:32 UTC (permalink / raw)
To: David S. Miller; +Cc: Nicolas Dichtel, Alexei Starovoitov, netdev
Commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6
tunnels") introduced a check to avoid updating PMTU when
collect_md mode is enabled.
Later, commit f15ca723c1eb ("net: don't call update_pmtu
unconditionally") dropped this check, I guess inadvertently.
Restore it.
Fixes: f15ca723c1eb ("net: don't call update_pmtu unconditionally")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
net/ipv6/ip6_tunnel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index a0b6932c3afd..6f05e0f74bdf 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1136,7 +1136,8 @@ 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);
+ if (!t->parms.collect_md)
+ skb_dst_update_pmtu(skb, mtu);
if (skb->len - t->tun_hlen - eth_hlen > mtu && !skb_is_gso(skb)) {
*pmtu = mtu;
err = -EMSGSIZE;
--
2.19.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md
2018-10-12 12:32 [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md Stefano Brivio
@ 2018-10-12 15:58 ` Nicolas Dichtel
2018-10-12 16:34 ` Stefano Brivio
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Dichtel @ 2018-10-12 15:58 UTC (permalink / raw)
To: Stefano Brivio, David S. Miller; +Cc: Alexei Starovoitov, netdev
Le 12/10/2018 à 14:32, Stefano Brivio a écrit :
> Commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6
> tunnels") introduced a check to avoid updating PMTU when
> collect_md mode is enabled.
>
> Later, commit f15ca723c1eb ("net: don't call update_pmtu
> unconditionally") dropped this check, I guess inadvertently.
I removed it because update_pmtu() is not set for md_dst_op, thus I assume this
check was done for that purpose.
Could you explain in your commit log which problem your patch fixes?
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md
2018-10-12 15:58 ` Nicolas Dichtel
@ 2018-10-12 16:34 ` Stefano Brivio
2018-10-15 8:48 ` Nicolas Dichtel
0 siblings, 1 reply; 5+ messages in thread
From: Stefano Brivio @ 2018-10-12 16:34 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: David S. Miller, Alexei Starovoitov, netdev
On Fri, 12 Oct 2018 17:58:55 +0200
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> Le 12/10/2018 à 14:32, Stefano Brivio a écrit :
> > Commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6
> > tunnels") introduced a check to avoid updating PMTU when
> > collect_md mode is enabled.
> >
> > Later, commit f15ca723c1eb ("net: don't call update_pmtu
> > unconditionally") dropped this check, I guess inadvertently.
> I removed it because update_pmtu() is not set for md_dst_op, thus I assume this
> check was done for that purpose.
Ha, sounds reasonable, yes.
> Could you explain in your commit log which problem your patch fixes?
Nothing really.
The change in f15ca723c1eb looked accidental and I thought it doesn't
make sense to update the PMTU in that case, but I didn't figure out
it's not actually done anyway.
Maybe it makes things a bit more readable, in that case I'd target it
for net-next. What do you think?
--
Stefano
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md
2018-10-12 16:34 ` Stefano Brivio
@ 2018-10-15 8:48 ` Nicolas Dichtel
2018-10-15 9:09 ` Stefano Brivio
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Dichtel @ 2018-10-15 8:48 UTC (permalink / raw)
To: Stefano Brivio; +Cc: David S. Miller, Alexei Starovoitov, netdev
Le 12/10/2018 à 18:34, Stefano Brivio a écrit :
> On Fri, 12 Oct 2018 17:58:55 +0200
> Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
[snip]
>> Could you explain in your commit log which problem your patch fixes?
>
> Nothing really.
>
> The change in f15ca723c1eb looked accidental and I thought it doesn't
> make sense to update the PMTU in that case, but I didn't figure out
> it's not actually done anyway.
>
> Maybe it makes things a bit more readable, in that case I'd target it
> for net-next. What do you think?
>
I don't think that this patch helps. The purpose of the skb_dst_update_pmtu()
helper is to hide those things. If one day, update_pmtu is defined for
md_dst_op, I bet that we won't remove this test.
Regards,
Nicolas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md
2018-10-15 8:48 ` Nicolas Dichtel
@ 2018-10-15 9:09 ` Stefano Brivio
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Brivio @ 2018-10-15 9:09 UTC (permalink / raw)
To: Nicolas Dichtel, David S. Miller; +Cc: Alexei Starovoitov, netdev
On Mon, 15 Oct 2018 10:48:05 +0200
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> Le 12/10/2018 à 18:34, Stefano Brivio a écrit :
> > On Fri, 12 Oct 2018 17:58:55 +0200
> > Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:
> [snip]
> >> Could you explain in your commit log which problem your patch fixes?
> >
> > Nothing really.
> >
> > The change in f15ca723c1eb looked accidental and I thought it doesn't
> > make sense to update the PMTU in that case, but I didn't figure out
> > it's not actually done anyway.
> >
> > Maybe it makes things a bit more readable, in that case I'd target it
> > for net-next. What do you think?
> >
> I don't think that this patch helps. The purpose of the skb_dst_update_pmtu()
> helper is to hide those things. If one day, update_pmtu is defined for
> md_dst_op, I bet that we won't remove this test.
I see, makes sense.
David, please drop this patch, and sorry for the noise.
--
Stefano
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-15 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 12:32 [PATCH net] ip6_tunnel: Don't update PMTU on tunnels with collect_md Stefano Brivio
2018-10-12 15:58 ` Nicolas Dichtel
2018-10-12 16:34 ` Stefano Brivio
2018-10-15 8:48 ` Nicolas Dichtel
2018-10-15 9:09 ` Stefano Brivio
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).