From: Jakub Kicinski <kuba@kernel.org>
To: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
<yoshfuji@linux-ipv6.org>, <netdev@vger.kernel.org>,
<sbrivio@redhat.com>, Kaustubh Pandey <quic_kapandey@quicinc.com>,
Sean Tranchetti <quic_stranche@quicinc.com>,
maze@google.com
Subject: Re: [PATCH net v2 1/2] ipv6: Honor route mtu if it is within limit of dev mtu
Date: Wed, 15 Jun 2022 17:35:16 -0700 [thread overview]
Message-ID: <20220615173516.29c80c96@kernel.org> (raw)
In-Reply-To: <1655182915-12897-2-git-send-email-quic_subashab@quicinc.com>
On Mon, 13 Jun 2022 23:01:54 -0600 Subash Abhinov Kasiviswanathan wrote:
> When netdevice MTU is increased via sysfs, NETDEV_CHANGEMTU is raised.
>
> addrconf_notify -> rt6_mtu_change -> rt6_mtu_change_route ->
> fib6_nh_mtu_change
>
> As part of handling NETDEV_CHANGEMTU notification we land up on a
> condition where if route mtu is less than dev mtu and route mtu equals
> ipv6_devconf mtu, route mtu gets updated.
>
> Due to this v6 traffic end up using wrong MTU then configured earlier.
> This commit fixes this by removing comparison with ipv6_devconf
> and updating route mtu only when it is greater than incoming dev mtu.
>
> This can be easily reproduced with below script:
> pre-condition:
> device up(mtu = 1500) and route mtu for both v4 and v6 is 1500
>
> test-script:
> ip route change 192.168.0.0/24 dev eth0 src 192.168.0.1 mtu 1400
> ip -6 route change 2001::/64 dev eth0 metric 256 mtu 1400
> echo 1400 > /sys/class/net/eth0/mtu
> ip route change 192.168.0.0/24 dev eth0 src 192.168.0.1 mtu 1500
> echo 1500 > /sys/class/net/eth0/mtu
CC maze, please add him if there is v3
I feel like the problem is with the fact that link mtu resets protocol
MTUs. Nothing we can do about that, so why not set link MTU to 9k (or
whatever other quantification of infinity there is) so you don't have
to touch it as you discover the MTU for v4 and v6?
My worry is that the tweaking of the route MTU update heuristic will
have no end.
Stefano, does that makes sense or you think the change is good?
next prev parent reply other threads:[~2022-06-16 0:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 5:01 [PATCH net v2 0/2] net: ipv6: Update route MTU behavior Subash Abhinov Kasiviswanathan
2022-06-14 5:01 ` [PATCH net v2 1/2] ipv6: Honor route mtu if it is within limit of dev mtu Subash Abhinov Kasiviswanathan
2022-06-14 12:27 ` Stefano Brivio
2022-06-14 18:34 ` Subash Abhinov Kasiviswanathan (KS)
2022-06-16 0:35 ` Jakub Kicinski [this message]
2022-06-16 1:21 ` Maciej Żenczykowski
2022-06-16 5:36 ` Subash Abhinov Kasiviswanathan (KS)
2022-06-16 7:33 ` Maciej Żenczykowski
2022-06-16 16:42 ` Jakub Kicinski
2022-06-16 17:08 ` Maciej Żenczykowski
2022-06-16 13:39 ` Stefano Brivio
2022-06-14 5:01 ` [PATCH net v2 2/2] tools: selftests: Update tests for new IPv6 route MTU behavior Subash Abhinov Kasiviswanathan
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=20220615173516.29c80c96@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=quic_kapandey@quicinc.com \
--cc=quic_stranche@quicinc.com \
--cc=quic_subashab@quicinc.com \
--cc=sbrivio@redhat.com \
--cc=yoshfuji@linux-ipv6.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).