netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Benjamin Poirier <bpoirier@nvidia.com>, netdev@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next 1/4] nexthop: Factor out hash threshold fdb nexthop selection
Date: Tue, 30 May 2023 08:57:54 -0600	[thread overview]
Message-ID: <d030c097-ac93-eed4-5bdd-11f902b16fca@kernel.org> (raw)
In-Reply-To: <20230529201914.69828-2-bpoirier@nvidia.com>

On 5/29/23 2:19 PM, Benjamin Poirier wrote:
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index f95142e56da0..27089dea0ed0 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c
> @@ -1152,11 +1152,31 @@ static bool ipv4_good_nh(const struct fib_nh *nh)
>  	return !!(state & NUD_VALID);
>  }
>  
> +static struct nexthop *nexthop_select_path_fdb(struct nh_group *nhg, int hash)
> +{
> +	int i;
> +
> +	for (i = 0; i < nhg->num_nh; i++) {
> +		struct nh_grp_entry *nhge = &nhg->nh_entries[i];
> +
> +		if (hash > atomic_read(&nhge->hthr.upper_bound))
> +			continue;
> +
> +		return nhge->nh;
> +	}
> +
> +	WARN_ON_ONCE(1);

I do not see how the stack is going to provide useful information; it
should always be vxlan_xmit ... nexthop_select_path_fdb, right?

besides that:
Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2023-05-30 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 20:19 [PATCH net-next 0/4] nexthop: Refactor and fix nexthop selection for multipath routes Benjamin Poirier
2023-05-29 20:19 ` [PATCH net-next 1/4] nexthop: Factor out hash threshold fdb nexthop selection Benjamin Poirier
2023-05-30 14:57   ` David Ahern [this message]
2023-07-19 13:54     ` Benjamin Poirier
2023-05-29 20:19 ` [PATCH net-next 2/4] nexthop: Factor out neighbor validity check Benjamin Poirier
2023-05-30 14:58   ` David Ahern
2023-05-29 20:19 ` [PATCH net-next 3/4] nexthop: Do not return invalid nexthop object during multipath selection Benjamin Poirier
2023-05-30 15:08   ` David Ahern
2023-05-31  6:04     ` Ido Schimmel
2023-05-29 20:19 ` [PATCH net-next 4/4] selftests: net: Add test cases for nexthop groups with invalid neighbors Benjamin Poirier
2023-05-30 15:10   ` 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=d030c097-ac93-eed4-5bdd-11f902b16fca@kernel.org \
    --to=dsahern@kernel.org \
    --cc=bpoirier@nvidia.com \
    --cc=idosch@nvidia.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).