Re: [v4, net-next 5/9] bng_en: Allocate packet buffers

From: ALOK TIWARI
Date: Tue Aug 26 2025 - 11:22:02 EST




On 8/26/2025 10:14 PM, Bhargava Marreddy wrote:
+static void bnge_alloc_one_rx_ring_netmem(struct bnge_net *bn,
+ struct bnge_rx_ring_info *rxr,
+ int ring_nr)
+{
+ u32 prod;
+ int i;
+
+ prod = rxr->rx_agg_prod;
+ for (i = 0; i < bn->rx_agg_ring_size; i++) {
+ if (bnge_alloc_rx_netmem(bn, rxr, prod, GFP_KERNEL)) {
+ netdev_warn(bn->netdev, "init'ed rx ring %d with %d/%d pages only\n",
+ ring_nr, i, bn->rx_ring_size);

Looks good, but would bn->rx_agg_ring_size be more accurate here instead of bn->rx_ring_size? since this loop is allocating the AGG ring.

+ break;
+ }
+ prod = NEXT_RX_AGG(prod);
+ }
+ rxr->rx_agg_prod = prod;
+}


Thanks,
Alok