src/dpdk/drivers/net/bnx2x/bnx2x.c
static void
bnx2x_pf_q_prep_init(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
		   struct ecore_queue_init_params *init_params)
{
	uint8_t cos;
	int cxt_index, cxt_offset;

	rte_bit_relaxed_set32(ECORE_Q_FLG_HC, &init_params->rx.flags);
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC, &init_params->tx.flags);

	rte_bit_relaxed_set32(ECORE_Q_FLG_HC_EN, &init_params->rx.flags);
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC_EN, &init_params->tx.flags);

	/* HC rate */
	init_params->rx.hc_rate =
	    sc->hc_rx_ticks ? (1000000 / sc->hc_rx_ticks) : 0;
	init_params->tx.hc_rate =
	    sc->hc_tx_ticks ? (1000000 / sc->hc_tx_ticks) : 0;

	/* FW SB ID */
	init_params->rx.fw_sb_id = init_params->tx.fw_sb_id = fp->fw_sb_id;

	/* CQ index among the SB indices */
	init_params->rx.sb_cq_index = HC_INDEX_ETH_RX_CQ_CONS;
	init_params->tx.sb_cq_index = HC_INDEX_ETH_FIRST_TX_CQ_CONS;

	/* set maximum number of COSs supported by this queue */
	init_params->max_cos = sc->max_cos;

	/* set the context pointers queue object */
	for (cos = FIRST_TX_COS_INDEX; cos < init_params->max_cos; cos++) {
		cxt_index = fp->index / ILT_PAGE_CIDS;
		cxt_offset = fp->index - (cxt_index * ILT_PAGE_CIDS);
		init_params->cxts[cos] =
		    &sc->context[cxt_index].vcxt[cxt_offset].eth;
	}
}
/*
 * prepare INIT transition, parameters configured:
 *   - HC configuration
 *   - Queue's CDU context
 */
prepare INIT transition, parameters configured:
- HC configuration
- Queue's CDU context
prepare INIT transition parameters configured : - HC configuration - Queue ' s CDU context
static void
bnx2x_pf_q_prep_init(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
		   struct ecore_queue_init_params *init_params)
{
	uint8_t cos;
	int cxt_index, cxt_offset;
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC, &init_params->rx.flags);
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC, &init_params->tx.flags);
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC_EN, &init_params->rx.flags);
	rte_bit_relaxed_set32(ECORE_Q_FLG_HC_EN, &init_params->tx.flags);
	init_params->rx.hc_rate =
	    sc->hc_rx_ticks ? (1000000 / sc->hc_rx_ticks) : 0;
	init_params->tx.hc_rate =
	    sc->hc_tx_ticks ? (1000000 / sc->hc_tx_ticks) : 0;
	init_params->rx.fw_sb_id = init_params->tx.fw_sb_id = fp->fw_sb_id;
	init_params->rx.sb_cq_index = HC_INDEX_ETH_RX_CQ_CONS;
	init_params->tx.sb_cq_index = HC_INDEX_ETH_FIRST_TX_CQ_CONS;
	init_params->max_cos = sc->max_cos;
	for (cos = FIRST_TX_COS_INDEX; cos < init_params->max_cos; cos++) {
		cxt_index = fp->index / ILT_PAGE_CIDS;
		cxt_offset = fp->index - (cxt_index * ILT_PAGE_CIDS);
		init_params->cxts[cos] =
		    &sc->context[cxt_index].vcxt[cxt_offset].eth;
	}
}
static void bnx2x_pf_q_prep_init ( struct bnx2x_softc * sc , struct bnx2x_fastpath * fp , struct ecore_queue_init_params * init_params ) { uint8_t cos ; int cxt_index , cxt_offset ; rte_bit_relaxed_set32 ( ECORE_Q_FLG_HC , & init_params -> rx . flags ) ; rte_bit_relaxed_set32 ( ECORE_Q_FLG_HC , & init_params -> tx . flags ) ; rte_bit_relaxed_set32 ( ECORE_Q_FLG_HC_EN , & init_params -> rx . flags ) ; rte_bit_relaxed_set32 ( ECORE_Q_FLG_HC_EN , & init_params -> tx . flags ) ; init_params -> rx . hc_rate = sc -> hc_rx_ticks ? ( 1000000 / sc -> hc_rx_ticks ) : 0 ; init_params -> tx . hc_rate = sc -> hc_tx_ticks ? ( 1000000 / sc -> hc_tx_ticks ) : 0 ; init_params -> rx . fw_sb_id = init_params -> tx . fw_sb_id = fp -> fw_sb_id ; init_params -> rx . sb_cq_index = HC_INDEX_ETH_RX_CQ_CONS ; init_params -> tx . sb_cq_index = HC_INDEX_ETH_FIRST_TX_CQ_CONS ; init_params -> max_cos = sc -> max_cos ; for ( cos = FIRST_TX_COS_INDEX ; cos < init_params -> max_cos ; cos ++ ) { cxt_index = fp -> index / ILT_PAGE_CIDS ; cxt_offset = fp -> index - ( cxt_index * ILT_PAGE_CIDS ) ; init_params -> cxts [ cos ] = & sc -> context [ cxt_index ] . vcxt [ cxt_offset ] . eth ; } }
prepare INIT transition, parameters configured:
   - HC configuration
   - Queue's CDU context
prepare INIT transition parameters configured : - HC configuration - Queue ' s CDU context
/* HC rate */ /* FW SB ID */ /* CQ index among the SB indices */ /* set maximum number of COSs supported by this queue */ /* set the context pointers queue object */