Message ID | 5893664877d77075e32b33f72a7784f539555da0.1539266541.git.sbrivio@redhat.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | [net] ip6_tunnel: Don't update PMTU on tunnels with collect_md | expand |
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?
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?
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
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.
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;
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(-)