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.
set 1) optional and for qapi drivers only set 2) patch up all qapi drivers and make it mandatory set 3) convert all other drivers that set the length.
I can take a look at implementing 1) in this series. It should help to keep complexity manageable.
...
static int bnxt_queue_mem_alloc(struct net_device *dev, void *qmem, int idx) { struct bnxt_rx_ring_info *rxr, *clone; struct bnxt *bp = netdev_priv(dev); struct bnxt_ring_struct *ring;
- ssize_t rx_buf_size; int rc;
if (!bp->rx_ring) return -ENETDOWN;
- rx_buf_size = bnxt_get_rx_buf_size(bp, idx);
- if (rx_buf_size < 0)
return rx_buf_size;Does this survive full ring reconfig? IIRC the large changes to the NIC config (like changing ring sizes) free and reallocate all rings in bnxt, but due to "historic reasons?" they don't go thru the queue ops.
I'll check when I'm back from lpc, but I was coming from an assumption that the qcfg series was doing it right, and I believe only the restart path was looking up the set len value. I'll double check.