Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Benjamin Poirier <bpoirier@nvidia.com>
To: David Ahern <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next v2 0/4] nexthop: Refactor and fix nexthop selection for multipath routes
Date: Wed, 19 Jul 2023 13:57:06 +0000	[thread overview]
Message-ID: <20230719-nh_select-v2-0-04383e89f868@nvidia.com> (raw)

In order to select a nexthop for multipath routes, fib_select_multipath()
is used with legacy nexthops and nexthop_select_path_hthr() is used with
nexthop objects. Those two functions perform a validity test on the
neighbor related to each nexthop but their logic is structured differently.
This causes a divergence in behavior and nexthop_select_path_hthr() may
return a nexthop that failed the neighbor validity test even if there was
one that passed.

Refactor nexthop_select_path_hthr() to make it more similar to
fib_select_multipath() and fix the problem mentioned above.

v2:
Removed unnecessary "first" variable in "nexthop: Do not return invalid
nexthop object during multipath selection".

v1:
https://lore.kernel.org/netdev/20230529201914.69828-1-bpoirier@nvidia.com/

---
Benjamin Poirier (4):
      nexthop: Factor out hash threshold fdb nexthop selection
      nexthop: Factor out neighbor validity check
      nexthop: Do not return invalid nexthop object during multipath selection
      selftests: net: Add test cases for nexthop groups with invalid neighbors

 net/ipv4/nexthop.c                          |  61 +++++++++----
 tools/testing/selftests/net/fib_nexthops.sh | 129 ++++++++++++++++++++++++++++
 2 files changed, 171 insertions(+), 19 deletions(-)
---
base-commit: 36395b2efe905650cd179d67411ffee3b770268b
change-id: 20230719-nh_select-0303d55a1fb0

Best regards,
-- 
Benjamin Poirier <bpoirier@nvidia.com>


             reply	other threads:[~2023-07-19 13:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 13:57 Benjamin Poirier [this message]
2023-07-19 13:57 ` [PATCH net-next v2 1/4] nexthop: Factor out hash threshold fdb nexthop selection Benjamin Poirier
2023-07-19 13:57 ` [PATCH net-next v2 2/4] nexthop: Factor out neighbor validity check Benjamin Poirier
2023-07-19 13:57 ` [PATCH net-next v2 3/4] nexthop: Do not return invalid nexthop object during multipath selection Benjamin Poirier
2023-07-20 15:18   ` David Ahern
2023-07-19 13:57 ` [PATCH net-next v2 4/4] selftests: net: Add test cases for nexthop groups with invalid neighbors Benjamin Poirier
2023-07-21  3:30 ` [PATCH net-next v2 0/4] nexthop: Refactor and fix nexthop selection for multipath routes 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=20230719-nh_select-v2-0-04383e89f868@nvidia.com \
    --to=bpoirier@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@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