netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net/ipv6: Handle onlink flag with multipath routes
Date: Fri, 16 Mar 2018 11:18:55 -0700	[thread overview]
Message-ID: <36fe3314-1c44-5516-54c5-4aa33e80942c@gmail.com> (raw)
In-Reply-To: <20180316.123847.1371456393189460416.davem@davemloft.net>

On 3/16/18 9:38 AM, David Miller wrote:
> From: David Ahern <dsahern@gmail.com>
> Date: Fri, 16 Mar 2018 08:45:10 -0700
> 
>> On 3/16/18 8:40 AM, David Miller wrote:
>>> Hmmm, this actually "accumulates" the flag rather than sets it.
>>>
>>> Have you thought about what should happen if the cfg has RTNH_F_ONLINK
>>> set?
>>
>> yes, that's why the test script adds cases with the ONLINK flag set for
>> both nexthops, then one with it on the first nexthop only, and one with
>> the flag only on the second nexthop.
>>
>> If you look at the full loop 'cfg' is the variable with the user data,
>> and r_cfg is the 'local loop version' so r_cfg.fc_flags gets reset for
>> each nexthop:
>>
>>         while (rtnh_ok(rtnh, remaining)) {
>>                 memcpy(&r_cfg, cfg, sizeof(*cfg));
>> 		...
>> 		r_cfg.fc_flags |= (rtnh->rtnh_flags & RTNH_F_ONLINK);
>> 		rt = ip6_route_info_create(&r_cfg, extack);
> 
> Right.
> 
>>> I think you should either change this logic to a true 'set', or adjust
>>> your commit message to address this aspect of the new behavior.
>>
>> I can update the commit message.
> 
> Please do, thanks David.
> 

And it looks like patch 1 needs to be in 'net'; did not realize the ipv6
ONLINK support is already in 4.16. I will send the patch adding tests
separately for net-next.

  reply	other threads:[~2018-03-16 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 15:40 [PATCH net-next 0/2] net/ipv6: Handle onlink flag with multipath routes David Ahern
2018-03-13 15:40 ` [PATCH net-next 1/2] " David Ahern
2018-03-16 15:40   ` David Miller
2018-03-16 15:45     ` David Ahern
2018-03-16 16:38       ` David Miller
2018-03-16 18:18         ` David Ahern [this message]
2018-03-13 15:40 ` [PATCH net-next 2/2] selftests: Add multipath tests for onlink flag 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:
  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=36fe3314-1c44-5516-54c5-4aa33e80942c@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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).