public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: Re: [PATCH v2] ipv6: fix ecmp lookup when oif is specified
Date: Mon, 24 Jun 2013 18:44:24 +0200	[thread overview]
Message-ID: <51C87768.7090008@6wind.com> (raw)
In-Reply-To: <20130623.184018.934611809597741522.davem@davemloft.net>

Le 24/06/2013 03:40, David Miller a écrit :
> From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
> Date: Fri, 14 Jun 2013 10:32:58 +0200
>
>> There is no reason to skip ECMP lookup when oif is specified, but this implies
>> to check oif given by user when selecting another route.
>> When the new route does not match oif requirement, we simply keep the initial
>> one.
>>
>> Spotted-by: dingzhi <zhi.ding@6wind•com>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind•com>
>
> IPV4 routing has elided the multipath lookup when the interface is specified
> for nearly two decades.
>
> So two things:
>
> 1) A decision that old must have a good reason, and you must do some
>     research to figure out exactly what that reason is.
>
> 2) If ipv4 is found to be wrong too, we must bring both ipv4 and ipv6
>     into the same behavior at the same time.
In fact, routing engines are different in forwarding case:

IPv4 case:
fl4->flowi4_oif is 0 when a packet is forwarded and this value is checked to 
select or not multipath functions.

IPv6 case:
The check is done against the argument oif (not fl6->flowi6_oif) of the function 
ip6_pol_route(). And this argument is set to the input interface by 
ip6_pol_route_input().

Functions call:
   - ip6_rcv_finish() -> ip6_route_input() -> ip6_route_input_lookup() -> 
fib6_rule_lookup() -> ip6_pol_route_input() -> ip6_pol_route()

Will you accept the patch if I remove only the check of oif argument in 
ip6_pol_route() (and leave ip6_pol_route_lookup() untouched).

My goal was only to have ECMP working in the forwarding case.

  reply	other threads:[~2013-06-24 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 14:04 [PATCH] ipv6: fix ecmp lookup on forwarding path Nicolas Dichtel
2013-06-14  0:38 ` David Miller
2013-06-14  8:32   ` [PATCH v2] ipv6: fix ecmp lookup when oif is specified Nicolas Dichtel
2013-06-24  1:40     ` David Miller
2013-06-24 16:44       ` Nicolas Dichtel [this message]
2013-06-26 22:19         ` David Miller
2013-06-28 15:35           ` [PATCH v3] " Nicolas Dichtel
2013-07-01 20:27             ` David Miller

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=51C87768.7090008@6wind.com \
    --to=nicolas.dichtel@6wind$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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