[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv0gt7stf+ADcsi7Yt-X8SZ=gYZuYfk9sQCLzPOjaabFvQ@mail.gmail.com>
Date: Sat, 9 Nov 2024 08:40:20 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Michael Chan <michael.chan@...adcom.com>
Cc: Daniel Xu <dxu@...uu.xyz>, kuba@...nel.org, edumazet@...gle.com,
davem@...emloft.net, andrew+netdev@...n.ch, pabeni@...hat.com,
martin.lau@...ux.dev, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com
Subject: Re: [PATCH net-next] bnxt_en: ethtool: Supply ntuple rss context action
On Sat, Nov 9, 2024 at 6:19 AM Michael Chan <michael.chan@...adcom.com> wrote:
>
> On Fri, Nov 8, 2024 at 11:07 AM Daniel Xu <dxu@...uu.xyz> wrote:
> >
> > Commit 2f4f9fe5bf5f ("bnxt_en: Support adding ntuple rules on RSS
> > contexts") added support for redirecting to an RSS context as an ntuple
> > rule action. However, it forgot to update the ETHTOOL_GRXCLSRULE
> > codepath. This caused `ethtool -n` to always report the action as
> > "Action: Direct to queue 0" which is wrong.
> >
> > Fix by teaching bnxt driver to report the RSS context when applicable.
> >
> > Signed-off-by: Daniel Xu <dxu@...uu.xyz>
> > ---
> > drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> > index cfd2c65b1c90..a218802befa8 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> > @@ -1187,10 +1187,14 @@ static int bnxt_grxclsrule(struct bnxt *bp, struct ethtool_rxnfc *cmd)
> > }
> > }
> >
> > - if (fltr->base.flags & BNXT_ACT_DROP)
> > + if (fltr->base.flags & BNXT_ACT_DROP) {
> > fs->ring_cookie = RX_CLS_FLOW_DISC;
> > - else
> > + } else if (fltr->base.flags & BNXT_ACT_RSS_CTX) {
> > + fs->flow_type |= FLOW_RSS;
> > + cmd->rss_context = fltr->base.fw_vnic_id;
>
> I think the rss_context should be the index and not the VNIC ID.
No, for RSS contexts, we save their index in the fw_vnic_id of the
filters. Hence what Daniel has done is correct.
>
> Pavan, please take a look.
>
> > + } else {
> > fs->ring_cookie = fltr->base.rxq;
> > + }
> > rc = 0;
> >
> > fltr_err:
> > --
> > 2.46.0
> >
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists