[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251213090407.3de8dd86@kernel.org>
Date: Sat, 13 Dec 2025 09:04:07 +0900
From: Jakub Kicinski <kuba@...nel.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Jonathan
Corbet <corbet@....net>, Michael Chan <michael.chan@...adcom.com>, Pavan
Chebbi <pavan.chebbi@...adcom.com>, Andrew Lunn <andrew+netdev@...n.ch>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John
Fastabend <john.fastabend@...il.com>, Ilias Apalodimas
<ilias.apalodimas@...aro.org>, Shuah Khan <shuah@...nel.org>, Mina Almasry
<almasrymina@...gle.com>, Stanislav Fomichev <sdf@...ichev.me>, Yue Haibing
<yuehaibing@...wei.com>, David Wei <dw@...idwei.uk>, Haiyue Wang
<haiyuewa@....com>, Jens Axboe <axboe@...nel.dk>, Joe Damato
<jdamato@...tly.com>, Simon Horman <horms@...nel.org>, Vishwanath Seshagiri
<vishs@...com>, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-kselftest@...r.kernel.org,
io-uring@...r.kernel.org, dtatulea@...dia.com
Subject: Re: [PATCH net-next v7 7/9] eth: bnxt: allow providers to set rx
buf size
On Thu, 11 Dec 2025 01:39:25 +0000 Pavel Begunkov wrote:
> On 12/2/25 18:58, Jakub Kicinski wrote:
> > On Sun, 30 Nov 2025 23:35:22 +0000 Pavel Begunkov wrote:
> >> +static ssize_t bnxt_get_rx_buf_size(struct bnxt *bp, int rxq_idx)
> >> +{
> >> + struct netdev_rx_queue *rxq = __netif_get_rx_queue(bp->dev, rxq_idx);
> >> + size_t rx_buf_size;
> >> +
> >> + rx_buf_size = rxq->mp_params.rx_buf_len;
> >> + if (!rx_buf_size)
> >> + return BNXT_RX_PAGE_SIZE;
> >
> > I'd like to retain my cfg objects in the queue API, if you don't mind.
> > I guess we just need the way for drivers to fill in the defaults and
> > then plumb them into the ops.
>
> It was problematic, I wanted to split it into more digestible chunks.
> My main problem is that it was not really optional and could break
> drivers that don't even care about this qcfg len option but allow
> setting it device-wise via ethtool, and I won't even have a way to
> test them.
>
> Maybe there is a way to strip down qcfg and only apply it to marked
> queue api enabled drivers for now, and then extend the idea it in
> the future. E.g.
Yes, I mean a stripped down version, since we're not shadowing the
ethtool knob any more the full set of changes I had will be too much.
Off the top of my head I think we'd need to retain:
- the qcfg struct passed as an argument to the queue callbacks
(drivers other than bnxt won't use it which is okay since they don't
set .supported_params)
- the ability to conjure the qcfg struct for any given queue by the
driver at any time (netdev_queue_config())
- probably the callback to fill in the defaults so that the driver
doesn't have to check "is the value set by the user" explicitly
Powered by blists - more mailing lists