Netdev Archive on
help / color / mirror / Atom feed
From: David Ahern <>
To: Vadim Fedorenko <>
Cc: Willem de Bruijn <>,
	Paolo Abeni <>, Jakub Kicinski <>,
	"David S. Miller" <>,
Subject: Re: [PATCH net] net: ipv4: fix path MTU for multi path routes
Date: Sun, 1 Aug 2021 11:12:00 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 2095 bytes --]

On 7/30/21 7:17 PM, Vadim Fedorenko wrote:
> Bug 213729 showed that MTU check could be used against route that
> will not be used in actual transmit if source ip is not specified.
> But path MTU update is always done on route with defined source ip.
> Fix route selection by updating flow info in case when source ip
> is not explicitly defined in raw and udp sockets.

There is more to it than just setting the source address and doing a
second lookup.

Attached is a test script I started last summer which shows the problem
at hand and is setup to cover various permutations of routing (legacy
routing, nexthop objects, and vrf), network protocols (v4 and v6) and
should cover tcp, udp and icmp:

# PMTU handling with multipath routing.
#          .-- sw1 --.
#   h1 ----|-- sw2 --|---- h2 -------- h3
#          |   ...   |       reduced mtu
#          .-- swN --.
# h2-h3 segment has reduced mtu.
# Exceptions created in h1 for h3.

N=8 (8-way multipath) seems to always demonstrate it; N=2 is a 50-50 chance.

Snippet from a run this morning:

# ip netns exec h1 ping -s 1450
PING ( 1450(1478) bytes of data.
From icmp_seq=1 Frag needed and DF set (mtu = 1420)
From icmp_seq=2 Frag needed and DF set (mtu = 1420)
From icmp_seq=3 Frag needed and DF set (mtu = 1420)
From icmp_seq=4 Frag needed and DF set (mtu = 1420)

ok, an MTU message makes it back to h1, but that it continues shows the
exception is not created on the right interface:

# ip -netns h1 ro ls cache via dev eth5
    cache expires 580sec mtu 1420

But the selected path is:
# ip -netns h1 ro get via dev eth2 src uid 0

Adding in the source address does not fix it but it does change the
selected path. .e.g,

# ip -netns h1 ro get from from via dev eth4 uid 0

If is the set source address then egress should be eth6, not
eth4, since that is an address on eth6.

[-- Attachment #2: --]
[-- Type: application/x-sh, Size: 9535 bytes --]

  reply	other threads:[~2021-08-01 17:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  1:17 Vadim Fedorenko
2021-08-01 17:12 ` David Ahern [this message]
2021-08-05 20:51   ` Vadim Fedorenko
2021-08-05 23:13     ` David Ahern

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH net] net: ipv4: fix path MTU for multi path routes' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).