net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
PATCH 1/1 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
modify ixgbe_dcb_tx_hw_config function.
modify ixgbe_dev_mq_rx_configure function.
modify ixgbe_configure_dcb function.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 21 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +4 -5
@@ -1997,6 +1997,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2032,11 +2034,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +21 -16
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3312,15 +3312,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3338,11 +3339,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 ) |IXGBE_QDE_ENABLE )); + }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 ))); + }/* Enable the Tx desc arbiter */ reg =IXGBE_READ_REG (hw,IXGBE_RTTDCS );
@@ -3377,7 +3384,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3660,7 +3667,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3809,9 +3816,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ; -/** Configure DCB hardware **/ ixgbe_dcb_hw_configure (dev, dcb_cfg); }
@@ -4081,12 +4085,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.9.0
Quoted 10 lines · Bernard Iremonger
modify
ixgbe_dcb_tx_hw_configfunction.
modifyixgbe_dev_mq_rx_configurefunction.
modifyixgbe_configure_dcbfunction.Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 21 deletions(-)
PATCH v2 1/1 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard Iremongermodify ixgbe_dcb_tx_hw_config function.
modify ixgbe_dev_mq_rx_configure function.
modify ixgbe_configure_dcb function.
Changes in v2:
Rebased to DPDK v16.11-rc1
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 21 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +4 -5
@@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2014,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +21 -16
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3339,11 +3340,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 ) |IXGBE_QDE_ENABLE )); + }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 ))); + }/* Enable the Tx desc arbiter */ reg =IXGBE_READ_REG (hw,IXGBE_RTTDCS );
@@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ; -/** Configure DCB hardware **/ ixgbe_dcb_hw_configure (dev, dcb_cfg); }
@@ -4082,12 +4086,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.10.1
Hi Bernard, Rahul,
Quoted 10 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Friday, October 14, 2016 9:29 PM
To: [email protected]; Shah, Rahul R; Lu, Wenzhuo
Cc: Iremonger, Bernard
Subject: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVmodify
ixgbe_dcb_tx_hw_configfunction.
modifyixgbe_dev_mq_rx_configurefunction.
modifyixgbe_configure_dcbfunction.
Would you like to add more details about why we need to modify these functions and what has been done? Thanks.
Quoted 16 lines
Changes in v2:
Rebased to DPDK v16.11-rc1Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 21 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 1979
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB :
Should we store the mq mode here?
Quoted 80 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0+ PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV"); + break; case ETH_MQ_RX_VMDQ_DCB_RSS: /* DCB/RSS VMDQ in SRIOV mode, not implement yet*/
drivers/net/ixgbe/ixgbe_ethdev.c +2
-5PMD_INIT_LOG(ERR, "SRIOV active,"@@ -2012,11 +2014,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," - " unsupported VMDQ mq_mode tx %d.", - dev_conf->txmode.mq_mode); -return -EINVAL ; + PMD_INIT_LOG(INFO, "ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV"); + break;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */
dev->data->dev_conf.txmode.mq_mode=ETH_MQ_TX_VMDQ_ONLY;drivers/net/ixgbe/ixgbe_ethdev.c +0
-0break ;drivers/net/ixgbe/ixgbe_rxtx.c index renamed from drivers/net/ixgbe/ixgbe_rxtx.c +0
-02ce8234..bb13889 100644
drivers/net/ixgbe/ixgbe_rxtx.c +4
-3@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. * @@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (
hw->mac.type!=ixgbe_mac_82598EB) { @@ -3339,11 +3340,17 @@
ixgbe_dcb_tx_hw_config(structixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-5if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+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) |IXGBE_QDE_ENABLE));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+ }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)));
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 1 line
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }
I think it has nothing to do with mq mode. Do I miss something?
Quoted 23 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ?
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +2
-2/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-2@@ -3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;
I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
Quoted 25 lines
drivers/net/ixgbe/ixgbe_rxtx.c +4
-4-/** Configure DCB hardware **/ ixgbe_dcb_hw_configure (dev, dcb_cfg); }@@ -4082,12 +4086,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV");return -1 ;drivers/net/ixgbe/ixgbe_rxtx.c +0
-1default :ixgbe_config_vf_default (dev); --2.10.1
v3 cover net/ixgbe: VMDq DCB with SRIOV
In reply to Bernard IremongerChanges in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.
Changes in v2:
rebase to latest master.
Bernard Iremonger (2):
net/ixgbe: support multiqueue mode VMDq DCB with SRIOV app/test_pmd: fix DCB configuration
app/test-pmd/testpmd.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 3 files changed, 27 insertions(+), 23 deletions(-)
Signature · 1 line
2.10.1
PATCH v3 1/2 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard IremongerModify ixgbe_check_mq_mode function,
when SRIOV is enabled, enable mq_modeETH_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,
drop check on dev->data->nb_rx_queues.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 21 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +4 -5
@@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2014,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +21 -16
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3339,11 +3340,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 ) |IXGBE_QDE_ENABLE )); + }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 ))); + }/* Enable the Tx desc arbiter */ reg =IXGBE_READ_REG (hw,IXGBE_RTTDCS );
@@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ; -/** Configure DCB hardware **/ ixgbe_dcb_hw_configure (dev, dcb_cfg); }
@@ -4082,12 +4086,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.10.1
PATCH v3 2/2 app/test_pmd: fix DCB configuration
In reply to Bernard Iremongerwhen dcb mode is DCB_VT_ENABLED set nb_rxq and nb_txq to 1.
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -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 ) {
Signature · 1 line
2.10.1
Hi Wenzhuo,
<snip>
Quoted 8 lines
Quoted 6 lines
Subject: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
modify
ixgbe_dcb_tx_hw_configfunction.
modifyixgbe_dev_mq_rx_configurefunction.
modifyixgbe_configure_dcbfunction.Would you like to add more details about why we need to modify these functions and what has been done? Thanks.
I have updated the commit message for this patch with more information. I have also added a testpmd patch and sent a v3 patchset.
Quoted 18 lines
Quoted 8 lines
Changes in v2:
Rebased to DPDK v16.11-rc1Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 9 ++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 37 +++++++++++++++++++++----------------
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 8 lines
2 files changed, 25 insertions(+), 21 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev*dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 1979
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB :Should we store the mq mode here?
Yes, it probably should be stored here.
Quoted 80 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 1984
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0+ PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV"); + break; case ETH_MQ_RX_VMDQ_DCB_RSS: /* DCB/RSS VMDQ in SRIOV mode, not implementyet */
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 2 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0PMD_INIT_LOG(ERR, "SRIOV active,"@@ -2012,11 +2014,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev*dev)
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)
Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-5switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," - " unsupported VMDQ mq_mode tx %d.", - dev_conf->txmode.mq_mode); -return -EINVAL ; + PMD_INIT_LOG(INFO, "ETH_MQ_TX_VMDQ_DCBmode
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 2020
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0supported in SRIOV"); + break;default :/* ETH_MQ_TX_VMDQ_ONLY or
ETH_MQ_TX_NONE*/drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 2021
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0dev->data->dev_conf.txmode.mq_mode =
ETH_MQ_TX_VMDQ_ONLY;drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_vmdq_dcb_configure(struct
Quoted 16 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0break ;(quoted diff) +0
-0
b/drivers/net/ixgbe/ixgbe_rxtx.cindex
2ce8234..bb13889 100644drivers/net/ixgbe/ixgbe_rxtx.c +1
-1@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. * @@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct
rte_eth_devQuoted 18 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-0*dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters
- * @hw: pointer to hardware structure
+ * @dev: pointer toeth_devstructure
* @dcb_config: pointer toixgbe_dcb_configstructure */
static voiddrivers/net/ixgbe/ixgbe_rxtx.c +2
-1-ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, +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-Quoted 1 line
dev_private);drivers/net/ixgbe/ixgbe_rxtx.c
Quoted 2 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-0PMD_INIT_FUNC_TRACE (); if (hw->mac.type != ixgbe_mac_82598EB) { @@ -3339,11 +3340,17@@
Quoted 16 lines
ixgbe_dcb_tx_hw_config(struct
ixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-5if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+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) |IXGBE_QDE_ENABLE));
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+ }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)));drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }I think it has nothing to do with mq mode. Do I miss something?
Behavior is different when SRIOV is enabled.
Quoted 26 lines
drivers/net/ixgbe/ixgbe_rxtx.c
Quoted 6 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS?
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev
Quoted 9 lines
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev*dev,
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default : PMD_INIT_LOG(ERR, "Incorrect DCB TX modeconfiguration"); @@
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 6 lines
-3810,9 +3817,6 @@ void
ixgbe_configure_dcb(struct rte_eth_dev *dev)drivers/net/ixgbe/ixgbe_rxtx.c +0
-2(dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
ETH_DCB_NUM_QUEUES is 128, nb_rx_queues may not be 128.
Quoted 20 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-1-/** Configure DCB hardware **/ ixgbe_dcb_hw_configure(dev, dcb_cfg); } @@ -4082,12 +4086,13@@
Quoted 4 lines
ixgbe_dev_mq_rx_configure(struct
rte_eth_dev
*dev)drivers/net/ixgbe/ixgbe_rxtx.c +0
-0case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
Quoted 10 lines
drivers/net/ixgbe/ixgbe_rxtx.c +3
-3break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS : PMD_INIT_LOG(ERR, - "Could not support DCB with VMDq &SRIOV");
Quoted 7 lines
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ "Could not support DCB/RSS with VMDq &SRIOV");
drivers/net/ixgbe/ixgbe_rxtx.c +0
-1return -1 ;default :ixgbe_config_vf_default (dev); --2.10.1
Regards,
Bernard.
v4 cover net/ixgbe: VMDq DCB with SRIOV
In reply to Bernard IremongerChanges in v4:
changes to ixgbe patch following comments.
Changes in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.
Changes in v2:
rebase to latest master.
Bernard Iremonger (2):
net/ixgbe: support multiqueue mode VMDq DCB with SRIOV app/test_pmd: fix DCB configuration
app/test-pmd/testpmd.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 36 ++++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 21 deletions(-)
Signature · 1 line
2.10.1
PATCH v4 1/2 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard IremongerModify ixgbe_check_mq_mode function,
when SRIOV is enabled, enable mq_modeETH_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,
drop check on dev->data->nb_rx_queues.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 36 ++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 19 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -5
@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_DCB ; +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2015,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_DCB ; +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +22 -14
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3339,11 +3340,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 ) |IXGBE_QDE_ENABLE )); + }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 ))); + }/* Enable the Tx desc arbiter */ reg =IXGBE_READ_REG (hw,IXGBE_RTTDCS );
@@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,7 +3817,7 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) +if (dev->data->nb_rx_queues >ETH_DCB_NUM_QUEUES )return ;/** Configure DCB hardware **/
@@ -4082,12 +4089,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.10.1
PATCH v4 2/2 app/test_pmd: fix DCB configuration
In reply to Bernard Iremongerwhen dcb mode is DCB_VT_ENABLED set nb_rxq and nb_txq to 1.
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -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 ) {
Signature · 1 line
2.10.1
Hi Bernard,
Quoted 36 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Tuesday, October 18, 2016 12:27 AM
To: Lu, Wenzhuo; [email protected]; Shah, Rahul R
Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVHi Wenzhuo,
Quoted 18 lines
Quoted 1 line
if (
hw->mac.type!=ixgbe_mac_82598EB) { @@ -3339,11 +3340,17@@
Quoted 16 lines
ixgbe_dcb_tx_hw_config(struct
ixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-5if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+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) |IXGBE_QDE_ENABLE));Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+ }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)));drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }I think it has nothing to do with mq mode. Do I miss something?
Quoted 1 line
Behavior is different when SRIOV is enabled.
I don't understand why the behavior is different. To my opinion, the drop has nothing to do with the mode. We can enable or disable it. The old behavior is disabling it by default. Now you change it to disabling it by default in NO-SRIOV mode, but enabling it in SRIOV mode. What I don't get is the reason.
Quoted 31 lines
Quoted 31 lines
Review
Quoted 7 lines
(quoted diff) +1
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS?
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev
Quoted 9 lines
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev*dev,
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default : PMD_INIT_LOG(ERR, "Incorrect DCB TX modeconfiguration"); @@
Quoted 4 lines
-3810,9 +3817,6 @@ void
ixgbe_configure_dcb(struct rte_eth_dev *dev)drivers/net/ixgbe/ixgbe_rxtx.c +0
-0(dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return;
Quoted 6 lines
Quoted 4 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 2 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-2-if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
ETH_DCB_NUM_QUEUESis 128,nb_rx_queuesmay not be 128.
I think it's a limitation to force the queue number to be ETH_DCB_NUM_QUEUES.
Just to confirm it, have you try to set rx queue number to something different from 128, like 64, 32...
Hi Wenzhuo,
<snip>
Quoted 32 lines
Quoted 32 lines
Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
Hi Wenzhuo,
Quoted 26 lines
Quoted 1 line
if (
hw->mac.type!=ixgbe_mac_82598EB) { @@ -3339,11 +3340,17@@
Quoted 22 lines
ixgbe_dcb_tx_hw_config(struct
ixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-5if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+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) |IXGBE_QDE_ENABLE));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+ }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)));drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 1 line
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }I think it has nothing to do with mq mode. Do I miss something?
Quoted 6 lines
Quoted 1 line
Behavior is different when SRIOV is enabled.
I don't understand why the behavior is different. To my opinion, the drop has nothing to do with the mode. We can enable or disable it.
The old behavior is disabling it by default. Now you change it to disabling it by default in NO-SRIOV mode, but enabling it in SRIOV mode.
What I don't get is the reason.
Please refer to section 4.6.11.3.1 page 180 of the 82599-10-gbe-controller-datasheet.pdf The last paragraph on page 180 states:
"Queue Drop Enable (PFQDE) - In SR-IO the QDE bit should be set to 1b in the PFQDE register for all queues. In VMDq mode, the QDE bit should be set to 0b for all queues."
Quoted 34 lines
Quoted 24 lines
Quoted 24 lines
Review
Quoted 4 lines
(quoted diff) +1
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS?
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev
Quoted 9 lines
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev*dev,
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default : PMD_INIT_LOG(ERR, "Incorrect DCB TX modeconfiguration"); @@
Quoted 1 line
Quoted 1 line
Quoted 1 line
-3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct
rte_eth_dev*dev)
Quoted 8 lines
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-2(dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
Quoted 5 lines
Quoted 1 line
ETH_DCB_NUM_QUEUESis 128,nb_rx_queuesmay not be 128.I think it's a limitation to force the queue number to be
ETH_DCB_NUM_QUEUES.
Just to confirm it, have you try to set rx queue number to something different from 128, like 64, 32...
In my test scenario the nb_rx_queues is 1.
Regards,
Bernard
Hi Bernard,
Quoted 18 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Tuesday, October 18, 2016 4:58 PM
To: Lu, Wenzhuo; [email protected]; Shah, Rahul R
Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVHi Wenzhuo,
<snip>
Quoted 7 lines
Quoted 7 lines
Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
Hi Wenzhuo,
Quoted 2 lines
Quoted 1 line
if (
hw->mac.type!=ixgbe_mac_82598EB) { @@ -3339,11 +3340,17@@
Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
ixgbe_dcb_tx_hw_config(struct
ixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-3if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); - -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++)Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
Quoted 8 lines
(quoted diff) +0
-2- IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+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 <<
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
IXGBE_QDE_IDX_SHIFT) |IXGBE_QDE_ENABLE));
This code is used to enable drop, but the comments say 'disable drop'.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +5
-0+ }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 <<
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
IXGBE_QDE_IDX_SHIFT)));
This code is used to disable drop, but the comments say 'enable drop'. I've checked the V4, the same problem too. I think the problem is the comments, right?
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 1 line
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }I think it has nothing to do with mq mode. Do I miss something?
Behavior is different when SRIOV is enabled.
I don't understand why the behavior is different. To my opinion, the drop has nothing to do with the mode. We can enable or disable it. The old behavior is disabling it by default. Now you change it to disabling it by default in NO-SRIOV mode, but enabling it in SRIOV mode. What I don't get is the reason.
Quoted 7 lines
Please refer to section 4.6.11.3.1 page 180 of the 82599-10-gbe-controller- datasheet.pdf
The last paragraph on page 180 states:"Queue Drop Enable (PFQDE) - In SR-IO the QDE bit should be set to 1b in the PFQDE register for all queues.
In VMDq mode, the QDE bit should be set to 0b for all queues."
Got it, thanks a lot :)
Quoted 36 lines
Quoted 36 lines
Quoted 26 lines
Quoted 26 lines
Review
Quoted 6 lines
(quoted diff) +1
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7 +3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS?
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev
Quoted 9 lines
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev*dev,
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default : PMD_INIT_LOG(ERR, "Incorrect DCB TX modeconfiguration"); @@
Quoted 1 line
Quoted 1 line
Quoted 1 line
-3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct
rte_eth_dev*dev)
Quoted 8 lines
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-2(dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
ETH_DCB_NUM_QUEUESis 128,nb_rx_queuesmay not be 128.I think it's a limitation to force the queue number to be
ETH_DCB_NUM_QUEUES.
Just to confirm it, have you try to set rx queue number to something different from 128, like 64, 32...In my test scenario the
nb_rx_queuesis 1.
Glad to know that, thanks :)
Quoted 4 lines
Regards,
Bernard
Hi Wenzhuo,
<snip>
Quoted 21 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Subject: RE: [PATCH v2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
Hi Wenzhuo,
Quoted 3 lines
Quoted 2 lines
if (
hw->mac.type!=ixgbe_mac_82598EB) { @@ -3339,11
+3340,17@@
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
ixgbe_dcb_tx_hw_config(struct
ixgbe_hw*hw,drivers/net/ixgbe/ixgbe_rxtx.c +0
-0if (dcb_config->vt_mode) reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Review
Quoted 8 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-5- -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) - IXGBE_WRITE_REG(hw, IXGBE_QDE, - (IXGBE_QDE_WRITE | (q <<
IXGBE_QDE_IDX_SHIFT)));(quoted diff) +2
-0+ if (RTE_ETH_DEV_SRIOV(dev).active == 0) { + /* Disable drop for all queues in VMDQmode*/
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
Quoted 3 lines
drivers/net/ixgbe/ixgbe_rxtx.c +3
-0+for (q =0 ; q <128 ; q++) + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE |(q <<
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
IXGBE_QDE_IDX_SHIFT) |IXGBE_QDE_ENABLE));This code is used to enable drop, but the comments say 'disable drop'.
The comment is correct but the code is not.
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ } else { + /* Enable drop for all queues in SRIOV mode*/
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw,
Quoted 3 lines
drivers/net/ixgbe/ixgbe_rxtx.c +3
-0+for (q =0 ; q <128 ; q++) + IXGBE_WRITE_REG(hw, IXGBE_QDE, + (IXGBE_QDE_WRITE |(q <<
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
IXGBE_QDE_IDX_SHIFT)));This code is used to disable drop, but the comments say 'enable drop'.
The comment is correct but the code is not.
Quoted 2 lines
I've checked the V4, the same problem too. I think the problem is the comments, right?
No, the comments are correct but the code is reversed. I will send a v5.
Quoted 60 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, · line 3353
Quoted 1 line
drivers/net/ixgbe/ixgbe_rxtx.c +1
-0+ }I think it has nothing to do with mq mode. Do I miss something?
Behavior is different when SRIOV is enabled.
I don't understand why the behavior is different. To my opinion, the drop has nothing to do with the mode. We can enable or disable it. The old behavior is disabling it by default. Now you change it to disabling it by default in NO-SRIOV mode, but enabling it in SRIOV mode. What I don't get is the reason.
Quoted 7 lines
Please refer to section 4.6.11.3.1 page 180 of the 82599-10-gbe-controller- datasheet.pdf The last paragraph on page 180 states:
"Queue Drop Enable (PFQDE) - In SR-IO the QDE bit should be set to 1b in the PFQDE register for all queues.
In VMDq mode, the QDE bit should be set to 0b for all queues."Got it, thanks a lot :)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 4 lines
(quoted diff) +0
-0/* Enable the Tx desc arbiter */ reg = IXGBE_READ_REG(hw, IXGBE_RTTDCS); @@ -3378,7
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
+3385,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct
rte_eth_dev(quoted diff) +1
-0+*dev, vmdq_tx_conf->nb_queue_pools ==
ETH_16_POOLSQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
?
Quoted 7 lines
0xFFFF:0xFFFFFFFF);drivers/net/ixgbe/ixgbe_rxtx.c +1
-1/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); }Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
static void
(quoted diff) +0
-0@@ -3661,7 +3668,7 @@ ixgbe_dcb_hw_configure(struct
rte_eth_dev*dev,
Quoted 1 line
/*get DCB TX configuration parameters from
rte_eth_conf*/
Quoted 18 lines
Quoted 18 lines
Quoted 9 lines
Quoted 9 lines
drivers/net/ixgbe/ixgbe_rxtx.c ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c +1
-1ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default : PMD_INIT_LOG(ERR, "Incorrect DCB TX modeconfiguration"); @@
Quoted 1 line
-3810,9 +3817,6 @@ void ixgbe_configure_dcb(struct
rte_eth_dev*dev)
Quoted 8 lines
Quoted 7 lines
drivers/net/ixgbe/ixgbe_rxtx.c void ixgbe_configure_dcb(struct rte_eth_dev *dev) · line 3814
Quoted 5 lines
drivers/net/ixgbe/ixgbe_rxtx.c +0
-2(dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) -return ;I remember it's a limitation of implementation. The reason is the resource allocation. Why could we remove it now?
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
ETH_DCB_NUM_QUEUESis 128,nb_rx_queuesmay not be 128.I think it's a limitation to force the queue number to be
ETH_DCB_NUM_QUEUES.
Just to confirm it, have you try to set rx queue number to something different from 128, like 64, 32...In my test scenario the
nb_rx_queuesis 1.Glad to know that, thanks :)
Regards,
Bernard
v5 cover net/ixgbe: VMDq DCB with SRIOV
In reply to Bernard IremongerChanges in v5:
fix enable/disable of the QDE bit in the PFQDE register.
Changes in v4:
changes to ixgbe patch following comments.
Changes in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.
Changes in v2:
rebase to latest master.
Bernard Iremonger (2):
net/ixgbe: support multiqueue mode VMDq DCB with SRIOV app/test_pmd: fix DCB configuration
app/test-pmd/testpmd.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 20 deletions(-)
Signature · 1 line
2.10.1
PATCH v5 1/2 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard IremongerModify ixgbe_check_mq_mode function,
when SRIOV is enabled, enable mq_modeETH_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,
drop check on dev->data->nb_rx_queues.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 18 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -5
@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_DCB ; +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2015,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_DCB ; +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +22 -13
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3340,10 +3341,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 );
@@ -3378,7 +3386,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3669,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,7 +3818,7 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) +if (dev->data->nb_rx_queues >ETH_DCB_NUM_QUEUES )return ;/** Configure DCB hardware **/
@@ -4082,12 +4090,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.10.1
PATCH v5 2/2 app/test_pmd: fix DCB configuration
In reply to Bernard Iremongerwhen dcb mode is DCB_VT_ENABLED set nb_rxq and nb_txq to 1.
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -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 ) {
Signature · 1 line
2.10.1
Hi,
Quoted 16 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Wednesday, October 19, 2016 6:21 PM
To: [email protected]; Shah, Rahul R; Lu, Wenzhuo
Cc: Iremonger, Bernard
Subject: [PATCH v5 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVModify
ixgbe_check_mq_modefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction,
replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.
Quoted 8 lines
Modify
ixgbe_dev_mq_rx_configurefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.Modify
ixgbe_configure_dcbfunction,
drop check ondev->data->nb_rx_queues.Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>
Re: [PATCH v5 0/2] net/ixgbe: VMDq DCB with SRIOV
In reply to Bernard IremongerHi,
Quoted 25 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Wednesday, October 19, 2016 6:21 PM
To: [email protected]; Shah, Rahul R; Lu, Wenzhuo
Cc: Iremonger, Bernard
Subject: [PATCH v5 0/2] net/ixgbe: VMDq DCB with SRIOVChanges in v5:
fix enable/disable of the QDE bit in the PFQDE register.Changes in v4:
changes to ixgbe patch following comments.Changes in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.Changes in v2:
rebase to latest master.Bernard Iremonger (2):
net/ixgbe: support multiqueue mode VMDq DCB with SRIOV app/test_pmd: fix DCB configuration
Quoted 7 lines
app/test-pmd/testpmd.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 20 deletions(-)--
2.10.1
v6 cover net/ixgbe: VMDq DCB with SRIOV
In reply to Bernard IremongerChanges in v6:
rebase to latest master.
revise commit messages.
Changes in v5:
fix enable/disable of the QDE bit in the PFQDE register.
Changes in v4:
changes to ixgbe patch following comments.
Changes in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.
Changes in v2:
rebase to latest master.
Bernard Iremonger (2):
net/ixgbe: support multiqueue mode VMDq DCB with SRIOV app/test_pmd: fix DCB configuration
app/test-pmd/testpmd.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 20 deletions(-)
Signature · 1 line
2.10.1
PATCH v6 1/2 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard IremongerThe 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_modeETH_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.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 18 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +6 -5
@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_DCB ; +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2015,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_DCB ; +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +22 -13
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3340,10 +3341,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 );
@@ -3378,7 +3386,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3669,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,7 +3818,7 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) +if (dev->data->nb_rx_queues >ETH_DCB_NUM_QUEUES )return ;/** Configure DCB hardware **/
@@ -4082,12 +4090,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.10.1
PATCH v6 2/2 app/test_pmd: fix DCB configuration
In reply to Bernard IremongerData 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.
--- app/test-pmd/testpmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/testpmd.c +2 -2
@@ -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 ) {
Signature · 1 line
2.10.1
Re: [PATCH v6 2/2] app/test_pmd: fix DCB configuration
app/test-pmd/testpmd.c init_port_dcb_config(portid_t pid, · line 2006
Quoted 6 lines
app/test-pmd/testpmd.c +2
-2if (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
Quoted 41 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Wednesday, October 26, 2016 12:51 AM
To: [email protected]; Shah, Rahul R <[email protected]>; Lu, Wenzhuo <[email protected]>; Dumitrescu, Cristian <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Iremonger, Bernard <[email protected]>
Subject: [PATCH v6 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVThe folowing changes have been made to allow Data Centre Bridge (DCB) configuration when SRIOV is enabled.
Modify
ixgbe_check_mq_modefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction, replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.Modify
ixgbe_dev_mq_rx_configurefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.Modify
ixgbe_configure_dcbfunction,
revise check ondev->data->nb_rx_queues.Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>Acked-by Wenzhuo Lu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 18 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 1981
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-0@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_DCB ;
This line is duplicated, mq_mode is ETH_MQ_RX_VMDQ_DCB already. And it's better to check if the nb_queue is valid.
Hi Jingjing,
<snip>
Quoted 36 lines
Quoted 20 lines
Subject: [PATCH v6 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
The folowing changes have been made to allow Data Centre Bridge (DCB) configuration when SRIOV is enabled.
Modify
ixgbe_check_mq_modefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction, replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.Modify
ixgbe_dev_mq_rx_configurefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.Modify
ixgbe_configure_dcbfunction,
revise check ondev->data->nb_rx_queues.Quoted 6 lines
Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>Acked-by Wenzhuo Lu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++-------------
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 8 lines
2 files changed, 28 insertions(+), 18 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev*dev)
Quoted 8 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : + PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCBmode supported in SRIOV");
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 1981
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ dev->data->dev_conf.rxmode.mq_mode =
ETH_MQ_RX_VMDQ_DCB;
This line is duplicated,mq_modeisETH_MQ_RX_VMDQ_DCBalready.
The mq_mode is assigned at this point in the other cases. This case is coded in line with the other cases.
Quoted 1 line
and it's better to check if the
nb_queueis valid.
What value is expected for nb_queue at this point?
Regards,
Bernard.
Quoted 1 line
PATCH v7 1/1 net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
In reply to Bernard IremongerThe 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_modeETH_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.
---
Changes in v7:
Removed unnecessary assignment.
Removed testpmd fix from patchset. Will submit separately.
Changes in v6:
rebase to latest master.
revise commit messages.
Changes in v5:
fix enable/disable of the QDE bit in the PFQDE register.
Changes in v4:
changes to ixgbe patch following comments.
Changes in v3:
rebase to latest master.
update commit message for ixgbe patch
add testpmd patch.
Changes in v2:
rebase to latest master.
drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++-----
drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 18 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +5 -5
@@ -1977,6 +1977,8 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : +PMD_INIT_LOG (INFO ,"ETH_MQ_RX_VMDQ_DCB mode supported in SRIOV" ); +break ;case ETH_MQ_RX_VMDQ_DCB_RSS :/* DCB/RSS VMDQ in SRIOV mode, not implement yet */ PMD_INIT_LOG(ERR, "SRIOV active,"
@@ -2012,11 +2014,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)switch (dev_conf->txmode.mq_mode) {case ETH_MQ_TX_VMDQ_DCB : -/* DCB VMDQ in SRIOV mode, not implement yet */ -PMD_INIT_LOG (ERR ,"SRIOV is active," -" unsupported VMDQ mq_mode tx %d." , - dev_conf->txmode.mq_mode); -return -EINVAL ; +PMD_INIT_LOG (INFO ,"ETH_MQ_TX_VMDQ_DCB mode supported in SRIOV" ); + dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_DCB ; +break ;default :/* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ dev->data->dev_conf.txmode.mq_mode =ETH_MQ_TX_VMDQ_ONLY ;break ;
drivers/net/ixgbe/ixgbe_rxtx.c +22 -13
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * Copyright 2014 6WIND S.A. * All rights reserved. *
@@ -3313,15 +3313,16 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)/** * ixgbe_dcb_config_tx_hw_config - Configure general DCB TX parameters -* @hw: pointer to hardware structure +* @dev: pointer to eth_dev structure * @dcb_config: pointer to ixgbe_dcb_config structure */ static void -ixgbe_dcb_tx_hw_config (struct ixgbe_hw *hw, +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 ();if (hw->mac.type != ixgbe_mac_82598EB) {
@@ -3340,10 +3341,17 @@ ixgbe_dcb_tx_hw_config(struct ixgbe_hw *hw, reg |=IXGBE_MTQC_VT_ENA ;IXGBE_WRITE_REG (hw,IXGBE_MTQC , reg); -/* Disable drop for all queues */ -for (q =0 ; q <128 ; q++) -IXGBE_WRITE_REG (hw,IXGBE_QDE , - (IXGBE_QDE_WRITE | (q <<IXGBE_QDE_IDX_SHIFT ))); +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 );
@@ -3378,7 +3386,7 @@ ixgbe_vmdq_dcb_hw_tx_config(struct rte_eth_dev *dev, vmdq_tx_conf->nb_queue_pools == ETH_16_POOLS ? 0xFFFF : 0xFFFFFFFF);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config); } static void
@@ -3661,7 +3669,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,/*get DCB TX configuration parameters from rte_eth_conf*/ ixgbe_dcb_tx_config (dev, dcb_config);/*Configure general DCB TX parameters*/ -ixgbe_dcb_tx_hw_config (hw, dcb_config); +ixgbe_dcb_tx_hw_config (dev, dcb_config);break ;default :PMD_INIT_LOG (ERR ,"Incorrect DCB TX mode configuration" );
@@ -3810,7 +3818,7 @@ void ixgbe_configure_dcb(struct rte_eth_dev *dev) (dev_conf->rxmode.mq_mode != ETH_MQ_RX_DCB_RSS)) return; -if (dev->data->nb_rx_queues !=ETH_DCB_NUM_QUEUES ) +if (dev->data->nb_rx_queues >ETH_DCB_NUM_QUEUES )return ;/** Configure DCB hardware **/
@@ -4082,12 +4090,13 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)case ETH_MQ_RX_VMDQ_RSS :ixgbe_config_vf_rss (dev);break ; - -/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB : +ixgbe_vmdq_dcb_configure (dev); +break ; +/* FIXME if support DCB/RSS together with VMDq & SRIOV */ case ETH_MQ_RX_VMDQ_DCB_RSS :PMD_INIT_LOG (ERR , -"Could not support DCB with VMDq & SRIOV" ); +"Could not support DCB/RSS with VMDq & SRIOV" );return -1 ;default :ixgbe_config_vf_default (dev);
Signature · 1 line
2.7.4
Bruce Richardson
AppliedQuoted 14 lines · Bernard Iremonger
The folowing changes have been made to allow Data Centre Bridge (DCB) configuration when SRIOV is enabled.
Modify
ixgbe_check_mq_modefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction, replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.Modify
ixgbe_dev_mq_rx_configurefunction,
when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.
Quoted 6 lines
Modify
ixgbe_configure_dcbfunction,
revise check ondev->data->nb_rx_queues.Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Applied to dpdk-next-net/rel_16_11 with commit message cut down to just the high-level functional change.
/Bruce
Hi Jingling,
<snip>
Quoted 41 lines
Quoted 19 lines
Quoted 19 lines
Subject: [PATCH v6 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
The folowing changes have been made to allow Data Centre Bridge (DCB) configuration when SRIOV is enabled.
Modify
ixgbe_check_mq_modefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction, replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.Modify
ixgbe_dev_mq_rx_configurefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.Modify
ixgbe_configure_dcbfunction, revise check ondev->data->nb_rx_queues.Quoted 6 lines
Quoted 6 lines
Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>Acked-by Wenzhuo Lu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++-----------
Quoted 15 lines
--
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 8 lines
2 files changed, 28 insertions(+), 18 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev*dev)
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : + PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCBmode supported in SRIOV");
Quoted 9 lines
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 1981
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ dev->data->dev_conf.rxmode.mq_mode =
ETH_MQ_RX_VMDQ_DCB;
This line is duplicated,mq_modeisETH_MQ_RX_VMDQ_DCBalready.The
mq_modeis assigned at this point in the other cases. This case is coded in line with the other cases.Quoted 1 line
and it's better to check if the
nb_queueis valid.
The nb_rx_q and nb_tx_q are checked after the switch statements at line 2027 with the v6 patch applied.
Regards,
Bernard.
Quoted 59 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Thursday, October 27, 2016 12:10 AM
To: Wu, Jingjing <[email protected]>; [email protected]; Shah, Rahul R <[email protected]>; Lu, Wenzhuo <[email protected]>; Dumitrescu, Cristian <[email protected]>
Subject: RE: [PATCH v6 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOVHi Jingling,
<snip>
Quoted 45 lines
Quoted 19 lines
Quoted 19 lines
Subject: [PATCH v6 1/2] net/ixgbe: support multiqueue mode VMDq DCB with SRIOV
The folowing changes have been made to allow Data Centre Bridge (DCB) configuration when SRIOV is enabled.
Modify
ixgbe_check_mq_modefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCBandETH_MQ_TX_VMDQ_DCB.Modify
ixgbe_dcb_tx_hw_configfunction, replace the structixgbe_hwparameter with a structrte_eth_devparameter and handle SRIOV enabled.Modify
ixgbe_dev_mq_rx_configurefunction, when SRIOV is enabled, enablemq_modeETH_MQ_RX_VMDQ_DCB.Modify
ixgbe_configure_dcbfunction, revise check ondev->data->nb_rx_queues.Quoted 6 lines
Quoted 6 lines
Signed-off-by Rahul R Shah <[email protected]>Signed-off-by Bernard Iremonger <[email protected]>Acked-by Wenzhuo Lu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 11 ++++++----- drivers/net/ixgbe/ixgbe_rxtx.c | 35 ++++++++++++++++++++++-----------
Quoted 18 lines
--
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 8 lines
2 files changed, 28 insertions(+), 18 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -1977,6 +1977,9 @@ ixgbe_check_mq_mode(struct rte_eth_dev*dev)
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0/* check multi-queue mode */ switch (dev_conf->rxmode.mq_mode) {case ETH_MQ_RX_VMDQ_DCB : + PMD_INIT_LOG(INFO, "ETH_MQ_RX_VMDQ_DCBmode supported in SRIOV");
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev · line 1981
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +1
-0+ dev->data->dev_conf.rxmode.mq_mode =
ETH_MQ_RX_VMDQ_DCB;
This line is duplicated,mq_modeisETH_MQ_RX_VMDQ_DCBalready.
Quoted 7 lines
Quoted 5 lines
The
mq_modeis assigned at this point in the other cases. This case is coded in line with the other cases.Quoted 1 line
and it's better to check if the
nb_queueis valid.The
nb_rx_qandnb_tx_qare checked after the switch statements at line 2027 with the v6 patch applied.
Thanks, it's fine then. :)
Quoted 3 lines
Regards,
Bernard.
PATCH v7 1/1 app/testpmd: fix DCB configuration
In reply to Bernard IremongerData 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 and max_vfs is greater than zero, 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.
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(-)
app/test-pmd/testpmd.c +7 -2
@@ -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 ) {
Signature · 1 line
2.4.3
PATCH v8 1/1 app/testpmd: fix DCB configuration
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.
---
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(-)
app/test-pmd/testpmd.c +7 -2
@@ -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 ) {
Signature · 1 line
2.4.3
PATCH v9 1/1 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.
---
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(-)
app/test-pmd/testpmd.c +7 -2
@@ -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 ) {
Signature · 1 line
2.10.1
Re: [PATCH v9] app/testpmd: fix DCB configuration
Quoted 13 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Friday, November 4, 2016 1:36 AM
To: [email protected]; Shah, Rahul R <[email protected]>; Wu, Jingjing <[email protected]>; Lu, Wenzhuo <[email protected]>
Cc: Iremonger, Bernard <[email protected]>
Subject: [PATCH v9] app/testpmd: fix DCB configurationData Centre Bridge (DCB) configuration fails when SRIOV is enabled if
nb_rxqornb_txqare greater thannb_q_per_pool.
Quoted 6 lines
The failure occurs during configuration of the ixgbe PMD when it is started, in the
ixgbe_check_mq_modefunction.Fixes 2a977b891f99 ("app/testpmd: fix DCB configuration")Signed-off-by Bernard Iremonger <[email protected]>
Thanks
Jingjing
Thomas Monjalon
AppliedRe: [PATCH v9] app/testpmd: fix DCB configuration
Quoted 11 lines
Quoted 9 lines
Data Centre Bridge (DCB) configuration fails when SRIOV is enabled if
nb_rxqornb_txqare greater thannb_q_per_pool.The failure occurs during configuration of the ixgbe PMD when it is started, in the
ixgbe_check_mq_modefunction.Fixes 2a977b891f99 ("app/testpmd: fix DCB configuration")Signed-off-by Bernard Iremonger <[email protected]>Acked-by Jingjing Wu <[email protected]>
Applied, thanks