src/dpdk/drivers/net/bnxt/bnxt_rxr.c
static int bnxt_prod_ag_mbuf(struct bnxt_rx_queue *rxq)
{
	struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
	uint16_t raw_next = RING_NEXT(rxr->ag_raw_prod);
	uint16_t bmap_next = RING_IDX(rxr->ag_ring_struct, raw_next);

	/* TODO batch allocation for better performance */
	while (rte_bitmap_get(rxr->ag_bitmap, bmap_next)) {
		if (unlikely(bnxt_alloc_ag_data(rxq, rxr, raw_next))) {
			PMD_DRV_LOG(ERR, "agg mbuf alloc failed: prod=0x%x\n",
				    raw_next);
			break;
		}
		rte_bitmap_clear(rxr->ag_bitmap, bmap_next);
		rxr->ag_raw_prod = raw_next;
		raw_next = RING_NEXT(raw_next);
		bmap_next = RING_IDX(rxr->ag_ring_struct, raw_next);
	}

	return 0;
}
/* TPA consume agg buffer out of order, allocate connected data only */
TPA consume agg buffer out of order, allocate connected data only
TPA consume agg buffer out of order allocate connected data only
static int bnxt_prod_ag_mbuf(struct bnxt_rx_queue *rxq)
{
	struct bnxt_rx_ring_info *rxr = rxq->rx_ring;
	uint16_t raw_next = RING_NEXT(rxr->ag_raw_prod);
	uint16_t bmap_next = RING_IDX(rxr->ag_ring_struct, raw_next);
	while (rte_bitmap_get(rxr->ag_bitmap, bmap_next)) {
		if (unlikely(bnxt_alloc_ag_data(rxq, rxr, raw_next))) {
			PMD_DRV_LOG(ERR, "agg mbuf alloc failed: prod=0x%x\n",
				    raw_next);
			break;
		}
		rte_bitmap_clear(rxr->ag_bitmap, bmap_next);
		rxr->ag_raw_prod = raw_next;
		raw_next = RING_NEXT(raw_next);
		bmap_next = RING_IDX(rxr->ag_ring_struct, raw_next);
	}
	return 0;
}
static int bnxt_prod_ag_mbuf ( struct bnxt_rx_queue * rxq ) { struct bnxt_rx_ring_info * rxr = rxq -> rx_ring ; uint16_t raw_next = RING_NEXT ( rxr -> ag_raw_prod ) ; uint16_t bmap_next = RING_IDX ( rxr -> ag_ring_struct , raw_next ) ; while ( rte_bitmap_get ( rxr -> ag_bitmap , bmap_next ) ) { if ( unlikely ( bnxt_alloc_ag_data ( rxq , rxr , raw_next ) ) ) { PMD_DRV_LOG ( ERR , " \n " , raw_next ) ; break ; } rte_bitmap_clear ( rxr -> ag_bitmap , bmap_next ) ; rxr -> ag_raw_prod = raw_next ; raw_next = RING_NEXT ( raw_next ) ; bmap_next = RING_IDX ( rxr -> ag_ring_struct , raw_next ) ; } return 0 ; }
TPA consume agg buffer out of order, allocate connected data only
TPA consume agg buffer out of order allocate connected data only
/* TODO batch allocation for better performance */