[dpdk-dev,v6,2/2] app/test_pmd: fix DCB configuration
Commit Message
Data Centre Bridge (DCB) configuration fails when SRIOV is
enabled if nb_rxq and nb_txq are not set to 1.
When dcb_mode is DCB_VT_ENABLED set nb_rxq and nb_txq to 1.
The failure occurs during configuration of the ixgbe PMD when
it is started, in the ixgbe_check_mq_mode function, if nb_rxq
and nb_txq are not set to 1.
Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Wenzhuo Lu <Wenzhuo.lu@intel.com>
---
app/test-pmd/testpmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> if (dcb_mode == DCB_VT_ENABLED) {
> - nb_rxq = rte_port->dev_info.max_rx_queues;
> - nb_txq = rte_port->dev_info.max_tx_queues;
> + nb_rxq = 1;
> + nb_txq = 1;
Before, the 'vt' argument in dcb command is used to distinguish whether the VMDQ is involved, but does mean if SRIOV is enabled.
I guess you want to use mode= ETH_MQ_RX_VMDQ_DCB to cover both VMDQ+DCB and SRIOV+DCB cases.
But if set nb_rxq=1, VMDQ + DCB case will not work in testpmd. And even doesn't care about the VMDQ +DCB case,
setting num of queue to 1 makes no sense to DCB (queue based on TC) cases.
Thanks
Jingjing
On Wed, Oct 26, 2016 at 04:28:40PM +0100, Bernard Iremonger wrote:
> The folowing changes have been made to allow Data Centre Bridge
> (DCB) configuration when SRIOV is enabled.
>
> Modify ixgbe_check_mq_mode function,
> when SRIOV is enabled, enable mq_mode
> ETH_MQ_RX_VMDQ_DCB and ETH_MQ_TX_VMDQ_DCB.
>
> Modify ixgbe_dcb_tx_hw_config function,
> replace the struct ixgbe_hw parameter with a
> struct rte_eth_dev parameter and handle SRIOV enabled.
>
> Modify ixgbe_dev_mq_rx_configure function,
> when SRIOV is enabled, enable mq_mode ETH_MQ_RX_VMDQ_DCB.
>
> Modify ixgbe_configure_dcb function,
> revise check on dev->data->nb_rx_queues.
>
> Signed-off-by: Rahul R Shah <rahul.r.shah@intel.com>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> Acked-by: Wenzhuo Lu <Wenzhuo.lu@intel.com>
Applied to dpdk-next-net/rel_16_11 with commit message cut down to just
the high-level functional change.
/Bruce
@@ -2002,8 +2002,8 @@ init_port_dcb_config(portid_t pid,
* and has the same number of rxq and txq in dcb mode
*/
if (dcb_mode == DCB_VT_ENABLED) {
- nb_rxq = rte_port->dev_info.max_rx_queues;
- nb_txq = rte_port->dev_info.max_tx_queues;
+ nb_rxq = 1;
+ nb_txq = 1;
} else {
/*if vt is disabled, use all pf queues */
if (rte_port->dev_info.vmdq_pool_base == 0) {