[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250425155159.1c82f280@kernel.org>
Date: Fri, 25 Apr 2025 15:51:59 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Mina Almasry <almasrymina@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
donald.hunter@...il.com, sdf@...ichev.me, dw@...idwei.uk,
asml.silence@...il.com, ap420073@...il.com, jdamato@...tly.com,
dtatulea@...dia.com, michael.chan@...adcom.com
Subject: Re: [RFC net-next 06/22] eth: bnxt: read the page size from the
adapter struct
On Wed, 23 Apr 2025 13:35:00 -0700 Mina Almasry wrote:
> On Mon, Apr 21, 2025 at 3:28 PM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > Switch from using a constant to storing the BNXT_RX_PAGE_SIZE
> > inside struct bnxt. This will allow configuring the page size
> > at runtime in subsequent patches.
> >
> > The MSS size calculation for older chip continues to use the constant.
> > I'm intending to support the configuration only on more recent HW,
> > looks like on older chips setting this per queue won't work,
> > and that's the ultimate goal.
> >
> > This patch should not change the current behavior as value
> > read from the struct will always be BNXT_RX_PAGE_SIZE at this stage.
> >
> > Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> > ---
> > drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
> > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++++++---------
> > drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 +--
> > 3 files changed, 17 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> > index 868a2e5a5b02..158b8f96f50c 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> > @@ -2358,6 +2358,7 @@ struct bnxt {
> > u16 max_tpa;
> > u32 rx_buf_size;
> > u32 rx_buf_use_size; /* useable size */
> > + u16 rx_page_size;
> I think you want a hunk that sets:
>
> rx_page_size = BNXT_RX_PAGE_SIZE;
>
> In this patch? I could not find it, I don't know if I missed it. I
> know in latery patches you're going to set this variable differently,
> but for bisects and what not you may want to retain the current
> behavior.
Hm, it's here, last chunk for drivers/net/ethernet/broadcom/bnxt/bnxt.c:
@@ -16486,6 +16486,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
bp = netdev_priv(dev);
bp->board_idx = ent->driver_data;
bp->msg_enable = BNXT_DEF_MSG_ENABLE;
+ bp->rx_page_size = BNXT_RX_PAGE_SIZE;
bnxt_set_max_func_irqs(bp, max_irqs);
if (bnxt_vf_pciid(bp->board_idx))
Powered by blists - more mailing lists