net/ixgbe: fix all queues drop setting of DCB
DCB is split to RX and TX mode. All-queues-drop is set for TX mode. It's not appropriate because all-queue-drop is a RX feature. Move this setting from TX to RX. Fixes: f3f9b17bb8a5 ("net/ixgbe: support multiqueue mode VMDq DCB with SRIOV") Cc: stable@dpdk.org Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit is contained in:
parent
4b2e6df261
commit
8552304c86
@ -3427,7 +3427,6 @@ ixgbe_dcb_tx_hw_config(struct rte_eth_dev *dev,
|
||||
struct ixgbe_dcb_config *dcb_config)
|
||||
{
|
||||
uint32_t reg;
|
||||
uint32_t q;
|
||||
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
|
||||
|
||||
PMD_INIT_FUNC_TRACE();
|
||||
@ -3447,18 +3446,6 @@ ixgbe_dcb_tx_hw_config(struct rte_eth_dev *dev,
|
||||
reg |= IXGBE_MTQC_VT_ENA;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_MTQC, reg);
|
||||
|
||||
if (RTE_ETH_DEV_SRIOV(dev).active == 0) {
|
||||
/* Disable drop for all queues in VMDQ mode*/
|
||||
for (q = 0; q < 128; q++)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_QDE,
|
||||
(IXGBE_QDE_WRITE | (q << IXGBE_QDE_IDX_SHIFT)));
|
||||
} else {
|
||||
/* Enable drop for all queues in SRIOV mode */
|
||||
for (q = 0; q < 128; q++)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_QDE,
|
||||
(IXGBE_QDE_WRITE | (q << IXGBE_QDE_IDX_SHIFT) | IXGBE_QDE_ENABLE));
|
||||
}
|
||||
|
||||
/* Enable the Tx desc arbiter */
|
||||
reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS);
|
||||
reg &= ~IXGBE_RTTDCS_ARBDIS;
|
||||
@ -3592,16 +3579,18 @@ ixgbe_dcb_tx_config(struct rte_eth_dev *dev,
|
||||
|
||||
/**
|
||||
* ixgbe_dcb_rx_hw_config - Configure general DCB RX HW parameters
|
||||
* @hw: pointer to hardware structure
|
||||
* @dev: pointer to eth_dev structure
|
||||
* @dcb_config: pointer to ixgbe_dcb_config structure
|
||||
*/
|
||||
static void
|
||||
ixgbe_dcb_rx_hw_config(struct ixgbe_hw *hw,
|
||||
struct ixgbe_dcb_config *dcb_config)
|
||||
ixgbe_dcb_rx_hw_config(struct rte_eth_dev *dev,
|
||||
struct ixgbe_dcb_config *dcb_config)
|
||||
{
|
||||
uint32_t reg;
|
||||
uint32_t vlanctrl;
|
||||
uint8_t i;
|
||||
uint32_t q;
|
||||
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
|
||||
|
||||
PMD_INIT_FUNC_TRACE();
|
||||
/*
|
||||
@ -3639,6 +3628,21 @@ ixgbe_dcb_rx_hw_config(struct ixgbe_hw *hw,
|
||||
}
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_MRQC, reg);
|
||||
|
||||
if (RTE_ETH_DEV_SRIOV(dev).active == 0) {
|
||||
/* Disable drop for all queues in VMDQ mode*/
|
||||
for (q = 0; q < IXGBE_MAX_RX_QUEUE_NUM; q++)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_QDE,
|
||||
(IXGBE_QDE_WRITE |
|
||||
(q << IXGBE_QDE_IDX_SHIFT)));
|
||||
} else {
|
||||
/* Enable drop for all queues in SRIOV mode */
|
||||
for (q = 0; q < IXGBE_MAX_RX_QUEUE_NUM; q++)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_QDE,
|
||||
(IXGBE_QDE_WRITE |
|
||||
(q << IXGBE_QDE_IDX_SHIFT) |
|
||||
IXGBE_QDE_ENABLE));
|
||||
}
|
||||
}
|
||||
|
||||
/* VLNCTRL: enable vlan filtering and allow all vlan tags through */
|
||||
@ -3751,7 +3755,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
|
||||
/* Get dcb TX configuration parameters from rte_eth_conf */
|
||||
ixgbe_dcb_rx_config(dev, dcb_config);
|
||||
/*Configure general DCB RX parameters*/
|
||||
ixgbe_dcb_rx_hw_config(hw, dcb_config);
|
||||
ixgbe_dcb_rx_hw_config(dev, dcb_config);
|
||||
break;
|
||||
default:
|
||||
PMD_INIT_LOG(ERR, "Incorrect DCB RX mode configuration");
|
||||
|
Loading…
x
Reference in New Issue
Block a user