Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>,  netdev@vger.kernel.org
Cc: davem@davemloft.net,  kuba@kernel.org,  pabeni@redhat.com,
	 edumazet@google.com,  dsahern@kernel.org,  horms@kernel.org,
	 willemdebruijn.kernel@gmail.com,
	 Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net] ipv6: Align behavior across nexthops during path selection
Date: Tue, 08 Apr 2025 10:02:16 -0400	[thread overview]
Message-ID: <67f52c6843f94_34067294be@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20250408084316.243559-1-idosch@nvidia.com>

Ido Schimmel wrote:
> A nexthop is only chosen when the calculated multipath hash falls in the
> nexthop's hash region (i.e., the hash is smaller than the nexthop's hash
> threshold) and when the nexthop is assigned a non-negative score by
> rt6_score_route().
> 
> Commit 4d0ab3a6885e ("ipv6: Start path selection from the first
> nexthop") introduced an unintentional difference between the first
> nexthop and the rest when the score is negative.
> 
> When the first nexthop matches, but has a negative score, the code will
> currently evaluate subsequent nexthops until one is found with a
> non-negative score. On the other hand, when a different nexthop matches,
> but has a negative score, the code will fallback to the nexthop with
> which the selection started ('match').
> 
> Align the behavior across all nexthops and fallback to 'match' when the
> first nexthop matches, but has a negative score.
> 
> Fixes: 3d709f69a3e7 ("ipv6: Use hash-threshold instead of modulo-N")
> Fixes: 4d0ab3a6885e ("ipv6: Start path selection from the first nexthop")
> Reported-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Closes: https://lore.kernel.org/netdev/67efef607bc41_1ddca82948c@willemb.c.googlers.com.notmuch/
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2025-04-08 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08  8:43 [PATCH net] ipv6: Align behavior across nexthops during path selection Ido Schimmel
2025-04-08 14:02 ` Willem de Bruijn [this message]
2025-04-08 15:17 ` David Ahern
2025-04-10  1:10 ` patchwork-bot+netdevbpf

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=67f52c6843f94_34067294be@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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