net/ixgbe: fix l3fwd start failed on VF
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 net/ixgbe: fix l3fwd start failed on VF
VF can't run in multi queue mode, if nb_q_per_pool was set as 1. The value of nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF. So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q can't be more than 1 and VF multi queue mode will fail.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -2222,8 +2222,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */
Signature · 1 line
2.11.0
PATCH v3 1/1 net/ixgbe: fix l3fwd start failed on VF
VF can't run in multi queue mode, if nb_q_per_pool was set as 1. Nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF. So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q can't be more than 1 and VF multi queue mode will fail.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -2222,8 +2222,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */
Signature · 1 line
2.11.0
Hi Yanglong,
You should write something after SoB, which makes reviewer easier to know What changes are since last version.
Thanks
Zhiyong
Quoted 12 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Monday, November 20, 2017 10:26 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v3] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.
Quoted 4 lines
Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>---
Changes in V3:
PATCH v4 1/1 net/ixgbe: fix l3fwd start failed on VF
In reply to Yanglong WuVF can't run in multi queue mode, if nb_q_per_pool was set as 1. Nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF. So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q can't be more than 1 and VF multi queue mode will fail.
---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */
Signature · 1 line
2.11.0
According to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can be ETH_MQ_RX_VMDQ_RSS or ETH_MQ_RX_VMDQ_DCB. So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your patch.
Thanks
Quoted 43 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-2@@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/
/* SRIOV only works in VMDq enable mode */
--
2.11.0
Yes, this problem is caused by PF passing a wrong number of queue to VF. So basically, I removed model check of "case ETH_MQ_RX_NONE". It seem right after I do that but I'am also not very sure the changing is really right. So thank to your comments, I will redebug this problem.
-----Original Message-----
From: Dai, Wei
Sent: Thursday, January 11, 2018 5:48 PM
To: Wu, Yanglong <[email protected]>; [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
According to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can be ETH_MQ_RX_VMDQ_RSS or ETH_MQ_RX_VMDQ_DCB. So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your patch.
Thanks
Quoted 41 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-3@@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */ --2.11.0
Hi daiwei:
After I double checked with this bug, the problem can be described as follow:
When we start PF using testpmd like this: testpmd -c 0x3 -n 4 --socket-mem=1024,1024 --file-prefix=pf -w 0000:05:00.0 -w 0000:05:00.1 -- -i. The number of queue signed to each port would be 1 and the rxmode.mq_mode of ixgbe eth_dev would be set as ETH_MQ_RX_NONE. And this config info is make sense, so until now there is no problem, right? And according to the code:
case ETH_MQ_RX_NONE:
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2243
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;
The nb_q_per_pool of (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool would be set as 1, that means for VF the number of max queue can be used would be only 1.
And next we start VF using l3fwd:
l3fwd/build/l3fwd -c 0xc0000 -n 4 -w 0000:05:10.0 -w 0000:05:10.1 -- -p 0x3 --config '(0,0,18),(1,0,19)' --parse-ptype
The number of rx_q equal to 1 and there is no problem. But, in l3fwd, the number of tx_q would equal to the number of core used in l3fwd, so here number of tx_q equal to 2 but as described above, the max number of queue can be used in VF is just only 1. So there is problem and l3fwd will check failed.
So there is two ways to fix this bug, the first is using this patch, don't assign RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool as 1 when mq_mode = ETH_MQ_RX_VMDQ_ONLY. And the second is that the number of tx_q would not assigned as the number of cores used in l3fwd.
Which one do you think is make sense?
Yanglong
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wu, Yanglong
Sent: Thursday, January 11, 2018 6:30 PM
To: Dai, Wei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
Yes, this problem is caused by PF passing a wrong number of queue to VF. So basically, I removed model check of "case ETH_MQ_RX_NONE". It seem right after I do that but I'am also not very sure the changing is really right. So thank to your comments, I will redebug this problem.
-----Original Message-----
From: Dai, Wei
Sent: Thursday, January 11, 2018 5:48 PM
To: Wu, Yanglong <[email protected]>; [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
According to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can be ETH_MQ_RX_VMDQ_RSS or ETH_MQ_RX_VMDQ_DCB. So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your patch.
Thanks
Quoted 41 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-3@@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */ --2.11.0
Hi
After confirm with Daiwei and according to the data sheet, RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue can be used in VF, that would be assigned as IXGBE_MAX_RX_QUEUE_NUM / RTE_ETH_DEV_SRIOV(dev).active, so that assigning nb_q_per_pool as 1 when PF is in ETH_MQ_RX_NONE, which will make VF can just use only 1 queue, is not right. So this patch is right.
Yanglong
-----Original Message-----
From: Wu, Yanglong
Sent: Thursday, January 11, 2018 11:29 PM
To: Wu, Yanglong <[email protected]>; Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
Hi daiwei:
After I double checked with this bug, the problem can be described as follow:
When we start PF using testpmd like this: testpmd -c 0x3 -n 4 --socket-mem=1024,1024 --file-prefix=pf -w 0000:05:00.0 -w 0000:05:00.1 -- -i. The number of queue signed to each port would be 1 and the rxmode.mq_mode of ixgbe eth_dev would be set as ETH_MQ_RX_NONE. And this config info is make sense, so until now there is no problem, right? And according to the code:
case ETH_MQ_RX_NONE:
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2243
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;
The nb_q_per_pool of (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool would be set as 1, that means for VF the number of max queue can be used would be only 1.
And next we start VF using l3fwd:
l3fwd/build/l3fwd -c 0xc0000 -n 4 -w 0000:05:10.0 -w 0000:05:10.1 -- -p 0x3 --config '(0,0,18),(1,0,19)' --parse-ptype The number of rx_q equal to 1 and there is no problem. But, in l3fwd, the number of tx_q would equal to the number of core used in l3fwd, so here number of tx_q equal to 2 but as described above, the max number of queue can be used in VF is just only 1. So there is problem and l3fwd will check failed.
So there is two ways to fix this bug, the first is using this patch, don't assign RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool as 1 when mq_mode = ETH_MQ_RX_VMDQ_ONLY. And the second is that the number of tx_q would not assigned as the number of cores used in l3fwd.
Which one do you think is make sense?
Yanglong
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wu, Yanglong
Sent: Thursday, January 11, 2018 6:30 PM
To: Dai, Wei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
Yes, this problem is caused by PF passing a wrong number of queue to VF. So basically, I removed model check of "case ETH_MQ_RX_NONE". It seem right after I do that but I'am also not very sure the changing is really right. So thank to your comments, I will redebug this problem.
-----Original Message-----
From: Dai, Wei
Sent: Thursday, January 11, 2018 5:48 PM
To: Wu, Yanglong <[email protected]>; [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VF
According to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can be ETH_MQ_RX_VMDQ_RSS or ETH_MQ_RX_VMDQ_DCB. So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your patch.
Thanks
Quoted 41 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-3@@ -2240,8 +2240,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =ETH_MQ_RX_VMDQ_ONLY ; -if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/ /* SRIOV only works in VMDq enable mode */ --2.11.0
Dai, Wei
Acked-byQuoted 92 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Friday, January 12, 2018 10:38 AM
To: Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFHi
After confirm with Daiwei and according to the data sheet, RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue can be used in VF, that would be assigned asIXGBE_MAX_RX_QUEUE_NUM/ RTE_ETH_DEV_SRIOV(dev).active, so that assigningnb_q_per_poolas 1 when PF is inETH_MQ_RX_NONE, which will make VF can just use only 1 queue, is not right. So this patch is right.Yanglong
-----Original Message-----
From: Wu, Yanglong
Sent: Thursday, January 11, 2018 11:29 PM
To: Wu, Yanglong <[email protected]>; Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFHi daiwei:
After I double checked with this bug, the problem can be described as follow:
When we start PF using testpmd like this: testpmd -c0x3-n 4 --socket-mem=1024,1024 --file-prefix=pf -w 0000:05:00.0 -w 0000:05:00.1 -- -i. The number of queue signed to each port would be 1 and the rxmode.mq_mode of ixgbeeth_devwould be set asETH_MQ_RX_NONE. And this config info is make sense, so until now there is no problem, right? And according to the code:
caseETH_MQ_RX_NONE:Review
Quoted 2 lines
(quoted diff) +0
-0/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =
ETH_MQ_RX_VMDQ_ONLY;drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2243
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2-if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;The
nb_q_per_poolof (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool would be set as 1, that means for VF the number of max queue can be used would be only 1.And next we start VF using l3fwd:
l3fwd/build/l3fwd -c0xc0000-n 4 -w 0000:05:10.0 -w 0000:05:10.1 -- -p0x3--config '(0,0,18),(1,0,19)' --parse-ptype The number ofrx_qequal to 1 and there is no problem. But, in l3fwd, the number oftx_qwould equal to the number of core used in l3fwd, so here number oftx_qequal to 2 but as described above, the max number of queue can be used in VF is just only 1. So there is problem and l3fwd will check failed.So there is two ways to fix this bug, the first is using this patch, don't assign RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool as 1 when
mq_mode=ETH_MQ_RX_VMDQ_ONLY.
And the second is that the number oftx_qwould not assigned as the number of cores used in l3fwd.Which one do you think is make sense?
Yanglong
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wu, Yanglong
Sent: Thursday, January 11, 2018 6:30 PM
To: Dai, Wei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFYes, this problem is caused by PF passing a wrong number of queue to VF. So basically, I removed model check of "case
ETH_MQ_RX_NONE". It seem right after I do that but I'am also not very sure the changing is really right. So thank to your comments, I will redebug this problem.-----Original Message-----
From: Dai, Wei
Sent: Thursday, January 11, 2018 5:48 PM
To: Wu, Yanglong <[email protected]>; [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFAccording to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can beETH_MQ_RX_VMDQ_RSSorETH_MQ_RX_VMDQ_DCB.
So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
Quoted 20 lines
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your patch.
Thanks
Quoted 15 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>
Quoted 29 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev
Quoted 16 lines
---
v1~v3:
coding style issue fix
---
v4:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2240,8 +2240,6 @@ 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 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0case ETH_MQ_RX_NONE :/* if nothing mq mode configure, use default scheme */ dev->data->dev_conf.rxmode.mq_mode =
ETH_MQ_RX_VMDQ_ONLY;drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev)
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2-if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;default :/* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-1/* SRIOV only works in VMDq enable mode */ --2.11.0
Zhang, Helin
AppliedQuoted 128 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Dai, Wei
Sent: Friday, January 12, 2018 11:04 AM
To: Wu, Yanglong; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFQuoted 10 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Friday, January 12, 2018 10:38 AM
To: Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFHi
After confirm with Daiwei and according to the data sheet, RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue canbe
Quoted 17 lines
used in VF, that would be assigned as
IXGBE_MAX_RX_QUEUE_NUM/ RTE_ETH_DEV_SRIOV(dev).active, so that assigningnb_q_per_poolas 1 when PF is inETH_MQ_RX_NONE, which will make VF can just use only 1 queue, is not right. So this patch is right.Yanglong
-----Original Message-----
From: Wu, Yanglong
Sent: Thursday, January 11, 2018 11:29 PM
To: Wu, Yanglong <[email protected]>; Dai, Wei <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFHi daiwei:
Quoted 10 lines
After I double checked with this bug, the problem can be described as follow:
When we start PF using testpmd like this: testpmd -c0x3-n 4 --socket-mem=1024,1024 --file-prefix=pf -w 0000:05:00.0 -w 0000:05:00.1
-- -i. The number of queue signed to each port would be 1 and the rxmode.mq_mode of ixgbeeth_devwould be set asETH_MQ_RX_NONE. And this config info is make sense, so until now there is no problem, right? And according to the code:
caseETH_MQ_RX_NONE:Quoted 1 line
/* if nothing mq mode configure, use default scheme
*/
Quoted 9 lines
Quoted 1 line
dev->data->dev_conf.rxmode.mq_mode=
ETH_MQ_RX_VMDQ_ONLY;drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_mq_mode(struct rte_eth_dev *dev) · line 2243
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2-if (RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool >1 ) -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =1 ;break ;The
nb_q_per_poolof (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool would be set as 1, that means for VF the number of max queue can be used would be only 1.Quoted 6 lines
And next we start VF using l3fwd:
l3fwd/build/l3fwd -c0xc0000-n 4 -w 0000:05:10.0 -w 0000:05:10.1 -- -p0x3--config '(0,0,18),(1,0,19)' --parse-ptype The number ofrx_qequal to 1 and there is no problem. But, in l3fwd, the number oftx_qwould equal to the number of core used in l3fwd, so here number oftx_qequal to 2 but as described above, the max number of queue can beused in VF is just only 1.
Quoted 5 lines
So there is problem and l3fwd will check failed.
So there is two ways to fix this bug, the first is using this patch, don't assign RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool as 1 when
mq_mode=
Quoted 33 lines
ETH_MQ_RX_VMDQ_ONLY.
And the second is that the number oftx_qwould not assigned as the number of cores used in l3fwd.Which one do you think is make sense?
Yanglong
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Wu, Yanglong
Sent: Thursday, January 11, 2018 6:30 PM
To: Dai, Wei <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFYes, this problem is caused by PF passing a wrong number of queue to VF. So basically, I removed model check of "case
ETH_MQ_RX_NONE". It seem right after I do that but I'am also not very sure the changing is really right. So thank to your comments, I will redebug this problem.-----Original Message-----
From: Dai, Wei
Sent: Thursday, January 11, 2018 5:48 PM
To: Wu, Yanglong <[email protected]>; [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFQuoted 4 lines
According to 82599 datasheet, VF working mode is controlled by its host PF. If VF is working in RSS or DCB mode, it can use more than 1 queues. That also means its host PF should enable RSS or DCB.
The PF Rx mode can beETH_MQ_RX_VMDQ_RSSor
ETH_MQ_RX_VMDQ_DCB.Quoted 4 lines
So I think that DPDK app with PF cause this issue, not ixgbe PMD itself.
By the way, you can reply your patch mail to provide more info about how You reproduce this issue to easy others' reviewing and testing your
patch.
Quoted 16 lines
Thanks
Quoted 13 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 9, 2018 2:32 PM
To: [email protected]; Yang, Zhiyong <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on VFVF can't run in multi queue mode, if
nb_q_per_poolwas set as 1.Nb_q_per_poolis passed through tomax_rx_qandmax_tx_qin VF. So ifnb_q_per_poolis equal to 1,max_rx_qandmax_tx_qcan't be more than 1 and VF multi queue mode will fail.
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check)Signed-off-by Yanglong Wu <[email protected]>Acked-by Wei Dai <[email protected]>
Applied to dpdk-next-net-intel, with minor commit log changes. Thanks!
/Helin