From: Jakub Sitnicki <jkbs@redhat.com>
To: Tom Herbert <tom@herbertland.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH net-next 5/5] ipv6: Compute multipath hash for forwarded ICMP errors from offending packet
Date: Sun, 30 Oct 2016 14:03:11 +0100 [thread overview]
Message-ID: <8760oa9egg.fsf@redhat.com> (raw)
In-Reply-To: <CALx6S35qmAwFfK1TNAcJJs1jK7JgM8U4MCh3wC8hkuf2qae+sw@mail.gmail.com>
On Fri, Oct 28, 2016 at 02:25 PM GMT, Tom Herbert wrote:
> On Fri, Oct 28, 2016 at 1:32 AM, Jakub Sitnicki <jkbs@redhat.com> wrote:
>> On Thu, Oct 27, 2016 at 10:35 PM GMT, Tom Herbert wrote:
>>> On Mon, Oct 24, 2016 at 2:28 AM, Jakub Sitnicki <jkbs@redhat.com> wrote:
>>>> Same as for the transmit path, let's do our best to ensure that received
>>>> ICMP errors that may be subject to forwarding will be routed the same
>>>> path as flow that triggered the error, if it was going in the opposite
>>>> direction.
>>>>
>>> Unfortunately our ability to do this is generally quite limited. This
>>> patch will select the route for multipath, but I don't believe sets
>>> the same link in LAG and definitely can't help switches doing ECMP to
>>> route the ICMP packet in the same way as the flow would be. Did you
>>> see a problem that warrants solving this case?
>>
>> The motivation here is to bring IPv6 ECMP routing on par with IPv4 to
>> enable its wider use, targeting anycast services. Forwarding ICMP errors
>> back to the source host, at the L3 layer, is what we thought would be a
>> step forward.
>>
>> Similar to change in IPv4 routing introduced in commit 79a131592dbb
>> ("ipv4: ICMP packet inspection for multipath", [1]) we do our best at
>> L3, leaving any potential problems with LAG at lower layer (L2)
>> unaddressed.
>>
> ICMP will almost certainly take a different path in the network than
> TCP or UDP due to ECMP. If we ever get proper flow label support for
> ECMP then that could solve the problem if all the devices do a hash
> just on <srcIP, destIP, FlowLabel>.
Sorry for my late reply, I have been traveling.
I think that either I am missing something here, or the proposed changes
address just the problem that you have described.
Yes, if we compute the hash that drives the route choice over the IP
header of the ICMP error, then there is no guarantee it will travel back
to the sender of the offending packet that triggered the error.
That is why, we look at the offending packet carried by an ICMP error
and hash over its fields, instead. We need, however, to take care of two
things:
1) swap the source with the destination address, because we are
forwarding the ICMP error in the opposite direction than the
offending packet was going (see icmpv6_multipath_hash() introduced in
patch 4/5); and
2) ensure the flow labels used in both directions are the same (either
reflected by one side, or fixed, e.g. not used and set to 0), so that
the 4-tuple we hash over when forwarding, <src addr, dst addr, flow
label, next hdr>, is the same both ways, modulo the order of
addresses.
> If this patch is being done to be compatible with IPv4 I guess that's
> okay, but it would be false advertisement to say this makes ICMP
> follow the same path as the flow being targeted in an error.
> Fortunately, I doubt anyone can have a dependency on this for ICMP.
I wouldn't want to propose anything that would be useless. If you think
that this is the case here, I would very much like to understand what
and why cannot work in practice.
Thanks for reviewing this series,
Jakub
next prev parent reply other threads:[~2016-10-30 13:03 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 9:28 [PATCH net-next 0/5] Route ICMPv6 errors with the flow when ECMP in use Jakub Sitnicki
2016-10-24 9:28 ` [PATCH net-next 1/5] ipv6: Fold rt6_info_hash_nhsfn() into its only caller Jakub Sitnicki
2016-10-24 9:28 ` [PATCH net-next 2/5] net: Extend struct flowi6 with multipath hash Jakub Sitnicki
2016-10-24 9:39 ` Hannes Frederic Sowa
2016-10-24 9:28 ` [PATCH net-next 3/5] ipv6: Use multipath hash from flow info if available Jakub Sitnicki
2016-10-24 9:40 ` Hannes Frederic Sowa
2016-10-24 9:28 ` [PATCH net-next 4/5] ipv6: Compute multipath hash for sent ICMP errors from offending packet Jakub Sitnicki
2016-10-24 9:40 ` Hannes Frederic Sowa
2016-10-27 15:24 ` David Miller
2016-10-27 22:00 ` Jakub Sitnicki
2016-10-24 9:28 ` [PATCH net-next 5/5] ipv6: Compute multipath hash for forwarded " Jakub Sitnicki
2016-10-24 9:43 ` Hannes Frederic Sowa
2016-10-27 15:25 ` David Miller
2016-10-27 22:10 ` Jakub Sitnicki
2016-10-27 22:35 ` Tom Herbert
2016-10-28 8:32 ` Jakub Sitnicki
2016-10-28 14:25 ` Tom Herbert
2016-10-30 13:03 ` Jakub Sitnicki [this message]
2016-10-31 19:15 ` David Miller
2016-11-01 15:13 ` Jakub Sitnicki
2016-11-01 15:35 ` David Miller
2016-11-01 16:26 ` Jakub Sitnicki
2016-11-01 16:27 ` Hannes Frederic Sowa
2016-11-01 16:39 ` David Miller
2016-11-01 16:59 ` Hannes Frederic Sowa
2016-10-31 19:25 ` Tom Herbert
2016-11-01 15:43 ` Jakub Sitnicki
2016-11-01 16:25 ` Hannes Frederic Sowa
2016-11-01 16:39 ` Tom Herbert
2016-11-01 16:54 ` Hannes Frederic Sowa
2016-10-27 15:23 ` [PATCH net-next 0/5] Route ICMPv6 errors with the flow when ECMP in use David Miller
2016-10-27 21:54 ` Hannes Frederic Sowa
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=8760oa9egg.fsf@redhat.com \
--to=jkbs@redhat.com \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).