From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: David Miller <davem@davemloft.net>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 6/8] bnxt_en: Implement ethtool -X to set indirection table.
Date: Tue, 30 Jun 2020 12:05:17 -0700 [thread overview]
Message-ID: <20200630120517.2237bb87@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <CACKFLin7DSADqfm8BjQxtM2sYZZV6Ycq_oHPT0+e53xpCoi1xA@mail.gmail.com>
On Mon, 29 Jun 2020 17:38:33 -0700 Michael Chan wrote:
> On Mon, Jun 29, 2020 at 5:06 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Mon, 29 Jun 2020 02:34:22 -0400 Michael Chan wrote:
> > > With the new infrastructure in place, we can now support the setting of
> > > the indirection table from ethtool.
> > >
> > > The user-configured indirection table will need to be reset to default
> > > if we are unable to reserve the requested number of RX rings or if the
> > > RSS table size changes.
> > >
> > > Signed-off-by: Michael Chan <michael.chan@broadcom.com>
> >
> > Hm. Clearing IFF_RXFH_CONFIGURED seems wrong. The user has clearly
> > requested a RSS mapping, if it can't be maintained driver should
> > return an error from the operation which attempts to change the ring
> > count.
>
> Right. In this case the user has requested non default RSS map and is
> now attempting to change rings. We have a first level check by
> calling bnxt_check_rings(). Firmware will tell us if the requested
> rings are available or not. If not, we will return error and the
> existing rings and RSS map will be kept. This should be the expected
> outcome in most cases.
>
> In rare cases, firmware can return success during bnxt_check_rings()
> but during the actual ring reservation, it fails to reserve all the
> rings it promised were available earlier. In this case, we fall back
> and accept the fewer rings and set the RSS map to default. I have
> never seen this scenario but we need to put the code in just in case
> it happens. It should be rare.
What's the expected application flow? Every time the application
makes a change to NIC settings it has to re-validate that some of
the previous configuration didn't get lost? I don't see the driver
returning the error if FW gave it less rings than requested. There
isn't even a warning printed..
I'd prefer if the driver wrapped the rss indexes, and printed a
warning, but left the config intact. And IMO set_channels should
return an error.
next prev parent reply other threads:[~2020-06-30 19:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 6:34 [PATCH net-next 0/8] bnxt_en: Driver update for net-next Michael Chan
2020-06-29 6:34 ` [PATCH net-next 1/8] bnxt_en: Set up the chip specific RSS table size Michael Chan
2020-06-29 6:34 ` [PATCH net-next 2/8] bnxt_en: Add logical RSS indirection table structure Michael Chan
2020-06-29 23:53 ` Jakub Kicinski
2020-06-29 6:34 ` [PATCH net-next 3/8] bnxt_en: Add helper function to return the number of RSS contexts Michael Chan
2020-06-29 6:34 ` [PATCH net-next 4/8] bnxt_en: Fill HW RSS table from the RSS logical indirection table Michael Chan
2020-06-29 23:58 ` Jakub Kicinski
2020-06-30 0:42 ` Michael Chan
2020-06-29 6:34 ` [PATCH net-next 5/8] bnxt_en: Return correct RSS indirection table entries to ethtool -x Michael Chan
2020-06-29 6:34 ` [PATCH net-next 6/8] bnxt_en: Implement ethtool -X to set indirection table Michael Chan
2020-06-30 0:06 ` Jakub Kicinski
2020-06-30 0:38 ` Michael Chan
2020-06-30 19:05 ` Jakub Kicinski [this message]
2020-06-30 19:42 ` Michael Chan
2020-06-29 6:34 ` [PATCH net-next 7/8] bnxt_en: clean up VLAN feature bit handling Michael Chan
2020-06-29 6:34 ` [PATCH net-next 8/8] bnxt_en: allow firmware to disable VLAN offloads Michael Chan
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=20200630120517.2237bb87@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.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).