src/dpdk/drivers/net/bnxt/bnxt_ring.c
static void bnxt_init_all_rings(struct bnxt *bp)
{
	unsigned int i = 0;
	struct bnxt_rx_queue *rxq;
	struct bnxt_ring *cp_ring;
	struct bnxt_ring *ring;
	struct bnxt_rx_ring_info *rxr;
	struct bnxt_tx_queue *txq;

	for (i = 0; i < bp->rx_cp_nr_rings; i++) {
		rxq = bp->rx_queues[i];
		/* Rx-compl */
		cp_ring = rxq->cp_ring->cp_ring_struct;
		cp_ring->fw_ring_id = INVALID_HW_RING_ID;
		/* Rx-Reg */
		rxr = rxq->rx_ring;
		ring = rxr->rx_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
		/* Rx-AGG */
		ring = rxr->ag_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
	}
	for (i = 0; i < bp->tx_cp_nr_rings; i++) {
		txq = bp->tx_queues[i];
		/* Tx cmpl */
		cp_ring = txq->cp_ring->cp_ring_struct;
		cp_ring->fw_ring_id = INVALID_HW_RING_ID;
		/*Tx Ring */
		ring = txq->tx_ring->tx_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
	}
}
/* Initialise all rings to -1, its used to free rings later if allocation
 * of few rings fails.
 */
Initialise all rings to -1, its used to free rings later if allocation
of few rings fails.
Initialise all rings to - 1 its used to free rings later if allocation of few rings fails .
static void bnxt_init_all_rings(struct bnxt *bp)
{
	unsigned int i = 0;
	struct bnxt_rx_queue *rxq;
	struct bnxt_ring *cp_ring;
	struct bnxt_ring *ring;
	struct bnxt_rx_ring_info *rxr;
	struct bnxt_tx_queue *txq;
	for (i = 0; i < bp->rx_cp_nr_rings; i++) {
		rxq = bp->rx_queues[i];
		cp_ring = rxq->cp_ring->cp_ring_struct;
		cp_ring->fw_ring_id = INVALID_HW_RING_ID;
		rxr = rxq->rx_ring;
		ring = rxr->rx_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
		ring = rxr->ag_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
	}
	for (i = 0; i < bp->tx_cp_nr_rings; i++) {
		txq = bp->tx_queues[i];
		cp_ring = txq->cp_ring->cp_ring_struct;
		cp_ring->fw_ring_id = INVALID_HW_RING_ID;
		ring = txq->tx_ring->tx_ring_struct;
		ring->fw_ring_id = INVALID_HW_RING_ID;
	}
}
static void bnxt_init_all_rings ( struct bnxt * bp ) { unsigned int i = 0 ; struct bnxt_rx_queue * rxq ; struct bnxt_ring * cp_ring ; struct bnxt_ring * ring ; struct bnxt_rx_ring_info * rxr ; struct bnxt_tx_queue * txq ; for ( i = 0 ; i < bp -> rx_cp_nr_rings ; i ++ ) { rxq = bp -> rx_queues [ i ] ; cp_ring = rxq -> cp_ring -> cp_ring_struct ; cp_ring -> fw_ring_id = INVALID_HW_RING_ID ; rxr = rxq -> rx_ring ; ring = rxr -> rx_ring_struct ; ring -> fw_ring_id = INVALID_HW_RING_ID ; ring = rxr -> ag_ring_struct ; ring -> fw_ring_id = INVALID_HW_RING_ID ; } for ( i = 0 ; i < bp -> tx_cp_nr_rings ; i ++ ) { txq = bp -> tx_queues [ i ] ; cp_ring = txq -> cp_ring -> cp_ring_struct ; cp_ring -> fw_ring_id = INVALID_HW_RING_ID ; ring = txq -> tx_ring -> tx_ring_struct ; ring -> fw_ring_id = INVALID_HW_RING_ID ; } }
Initialise all rings to -1, its used to free rings later if allocation
 of few rings fails.
Initialise all rings to - 1 its used to free rings later if allocation of few rings fails .
/* Rx-compl */ /* Rx-Reg */ /* Rx-AGG */ /* Tx cmpl */ /*Tx Ring */