[dpdk-dev] [PATCH v8] app/testpmd: fix DCB configuration

Bernard Iremonger bernard.iremonger at intel.com
Tue Nov 1 11:36:49 CET 2016


Data Centre Bridge (DCB) configuration fails when SRIOV is
enabled if nb_rxq and nb_txq are not set to 1.

The failure occurs during configuration of the ixgbe PMD when
it is started, in the ixgbe_check_mq_mode function.

Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")

Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 Changes in v8:
 revise commit message.

 Changes in v7:
 restore nb_rxq and nb_txq setting when max_vfs is 0

 app/test-pmd/testpmd.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6185be6..96f5011 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2002,8 +2002,13 @@ 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;
+		if (rte_port->dev_info.max_vfs > 0) {
+			nb_rxq = 1;
+			nb_txq = 1;
+		} else {
+			nb_rxq = rte_port->dev_info.max_rx_queues;
+			nb_txq = rte_port->dev_info.max_tx_queues;
+		}
 	} else {
 		/*if vt is disabled, use all pf queues */
 		if (rte_port->dev_info.vmdq_pool_base == 0) {
-- 
2.4.3



More information about the dev mailing list