src/dpdk/drivers/net/txgbe/txgbe_rxtx.c
static void
txgbe_dcb_tx_hw_config(struct rte_eth_dev *dev,
		       struct txgbe_dcb_config *dcb_config)
{
	uint32_t reg;
	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);

	PMD_INIT_FUNC_TRACE();

	/* Disable the Tx desc arbiter */
	reg = rd32(hw, TXGBE_ARBTXCTL);
	reg |= TXGBE_ARBTXCTL_DIA;
	wr32(hw, TXGBE_ARBTXCTL, reg);

	/* Enable DCB for Tx with 8 TCs */
	reg = rd32(hw, TXGBE_PORTCTL);
	reg &= TXGBE_PORTCTL_NUMTC_MASK;
	reg |= TXGBE_PORTCTL_DCB;
	if (dcb_config->num_tcs.pg_tcs == 8)
		reg |= TXGBE_PORTCTL_NUMTC_8;
	else
		reg |= TXGBE_PORTCTL_NUMTC_4;

	wr32(hw, TXGBE_PORTCTL, reg);

	/* Enable the Tx desc arbiter */
	reg = rd32(hw, TXGBE_ARBTXCTL);
	reg &= ~TXGBE_ARBTXCTL_DIA;
	wr32(hw, TXGBE_ARBTXCTL, reg);
}
/**
 * txgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters
 * @dev: pointer to eth_dev structure
 * @dcb_config: pointer to txgbe_dcb_config structure
 */
Configure general DCB TX parameters
@dev: pointer to eth_dev structure
@dcb_config: pointer to txgbe_dcb_config structure
Configure general DCB TX parameters @dev : pointer to eth_dev structure @dcb_config : pointer to txgbe_dcb_config structure
static void
txgbe_dcb_tx_hw_config(struct rte_eth_dev *dev,
		       struct txgbe_dcb_config *dcb_config)
{
	uint32_t reg;
	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
	PMD_INIT_FUNC_TRACE();
	reg = rd32(hw, TXGBE_ARBTXCTL);
	reg |= TXGBE_ARBTXCTL_DIA;
	wr32(hw, TXGBE_ARBTXCTL, reg);
	reg = rd32(hw, TXGBE_PORTCTL);
	reg &= TXGBE_PORTCTL_NUMTC_MASK;
	reg |= TXGBE_PORTCTL_DCB;
	if (dcb_config->num_tcs.pg_tcs == 8)
		reg |= TXGBE_PORTCTL_NUMTC_8;
	else
		reg |= TXGBE_PORTCTL_NUMTC_4;
	wr32(hw, TXGBE_PORTCTL, reg);
	reg = rd32(hw, TXGBE_ARBTXCTL);
	reg &= ~TXGBE_ARBTXCTL_DIA;
	wr32(hw, TXGBE_ARBTXCTL, reg);
}
static void txgbe_dcb_tx_hw_config ( struct rte_eth_dev * dev , struct txgbe_dcb_config * dcb_config ) { uint32_t reg ; struct txgbe_hw * hw = TXGBE_DEV_HW ( dev ) ; PMD_INIT_FUNC_TRACE ( ) ; reg = rd32 ( hw , TXGBE_ARBTXCTL ) ; reg |= TXGBE_ARBTXCTL_DIA ; wr32 ( hw , TXGBE_ARBTXCTL , reg ) ; reg = rd32 ( hw , TXGBE_PORTCTL ) ; reg &= TXGBE_PORTCTL_NUMTC_MASK ; reg |= TXGBE_PORTCTL_DCB ; if ( dcb_config -> num_tcs . pg_tcs == 8 ) reg |= TXGBE_PORTCTL_NUMTC_8 ; else reg |= TXGBE_PORTCTL_NUMTC_4 ; wr32 ( hw , TXGBE_PORTCTL , reg ) ; reg = rd32 ( hw , TXGBE_ARBTXCTL ) ; reg &= ~ TXGBE_ARBTXCTL_DIA ; wr32 ( hw , TXGBE_ARBTXCTL , reg ) ; }
txgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters
 @dev: pointer to eth_dev structure
 @dcb_config: pointer to txgbe_dcb_config structure
txgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters @dev : pointer to eth_dev structure @dcb_config : pointer to txgbe_dcb_config structure
/* Disable the Tx desc arbiter */ /* Enable DCB for Tx with 8 TCs */ /* Enable the Tx desc arbiter */