From: Benjamin Poirier <bpoirier@nvidia.com>
To: David Ahern <dsahern@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Shuah Khan <shuah@kernel.org>,
"linux-kselftest@vger.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: Wed, 19 Jul 2023 13:54:40 +0000 [thread overview]
Message-ID: <ZLfrG3Layt4fUmt8@d3> (raw)
In-Reply-To: <d030c097-ac93-eed4-5bdd-11f902b16fca@kernel.org>
On 2023-05-30 08:57 -0600, David Ahern wrote:
> 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?
Not always, it is also possible to have a resilient nhg with fdb
nexthops. In that case, nexthop_select_path_fdb() is not called. In
practice, I tried such a configuration and it does not work well. I have
prepared a fix that I'll send after the current series has been dealt
with.
Sorry for the long delay before my reply.
next prev parent reply other threads:[~2023-07-19 13:54 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
2023-07-19 13:54 ` Benjamin Poirier [this message]
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=ZLfrG3Layt4fUmt8@d3 \
--to=bpoirier@nvidia.com \
--cc=dsahern@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.