[dpdk-dev,v9] app/testpmd: fix DCB configuration
diff mbox

Message ID 1478194538-19337-1-git-send-email-bernard.iremonger@intel.com
State Accepted, archived
Headers show

Commit Message

Bernard Iremonger Nov. 3, 2016, 5:35 p.m. UTC
Data Centre Bridge (DCB) configuration fails when SRIOV is
enabled if nb_rxq or nb_txq are greater than nb_q_per_pool.

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@intel.com>
---
 Changes in v9:
 when max_vfs is greater then 0, set nb_rxq and nb_txq to
 dev_info.nb_rx_queues and dev_info.nb_tx_queues.

 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(-)

Comments

Wu, Jingjing Nov. 4, 2016, 5:40 a.m. UTC | #1
> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Friday, November 4, 2016 1:36 AM
> To: dev@dpdk.org; Shah, Rahul R <rahul.r.shah@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: Iremonger, Bernard <bernard.iremonger@intel.com>
> Subject: [PATCH v9] app/testpmd: fix DCB configuration
> 
> Data Centre Bridge (DCB) configuration fails when SRIOV is enabled if nb_rxq
> or nb_txq are greater than nb_q_per_pool.
> 
> 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@intel.com>

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

Thanks
Jingjing
Thomas Monjalon Nov. 7, 2016, 3:56 p.m. UTC | #2
> > Data Centre Bridge (DCB) configuration fails when SRIOV is enabled if nb_rxq
> > or nb_txq are greater than nb_q_per_pool.
> > 
> > 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@intel.com>
> 
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>

Applied, thanks

Patch
diff mbox

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6185be6..a0332c2 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 = rte_port->dev_info.nb_rx_queues;
+			nb_txq = rte_port->dev_info.nb_tx_queues;
+		} 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) {