net/ixgbe: fix l3fwd start failed on PF
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 PF
L3fwd start failed on PF, for tx_q check failed.
That occured when the SRIOV is active and tx_q > rx_q. The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should equeal to max number of queues supported by HW not nb_rx_q.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 /RTE_ETH_DEV_SRIOV (dev).active;RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q;return 0 ;
Signature · 1 line
2.11.0
PATCH v3 1/1 net/ixgbe: fix l3fwd start failed on PF
L3fwd start failed on PF, for tx_q check failed.
That occurred when the SRIOV is active and tx_q > rx_q. The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should equeal to max number of queues supported by HW not nb_rx_q.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 /RTE_ETH_DEV_SRIOV (dev).active;RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q;return 0 ;
Signature · 1 line
2.11.0
PATCH v4 1/1 net/ixgbe: fix l3fwd start failed on PF
L3fwd start failed on PF, for tx_q check failed.
That occurred when the SRIOV is active and tx_q > rx_q. The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should equeal to max number of queues supported by HW not nb_rx_q.
--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_ethdev.c +1 -1
@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 /RTE_ETH_DEV_SRIOV (dev).active;RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q;return 0 ;
Signature · 1 line
2.11.0
Quoted 26 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Monday, November 20, 2017 2:40 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PFL3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q. Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check to specific drivers)Signed-off-by Yanglong Wu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q) · line 2183
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +1
-1@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 /RTE_ETH_DEV_SRIOV (dev).active;
Please use appropriate macros instead of constants (s/128/IXGBE_MAX_RX_QUEUE_NUM).
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q) · line 2184
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q;
Shouldn't we also change that line to:
RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = pci_dev->max_vfs * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; ?
Konstantin
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-1return 0 ; --2.11.0
Hi,
Yes, I think so, we can change it. nb_rx_q just means the number of queue used for a port and RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool means max queue can be used.
-----Original Message-----
From: Ananyev, Konstantin
Sent: Monday, November 20, 2017 6:44 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
Quoted 26 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Monday, November 20, 2017 2:40 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PFL3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q.
Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q) · line 2184
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-1@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 / +RTE_ETH_DEV_SRIOV (dev).active;
Please use appropriate macros instead of constants (s/128/IXGBE_MAX_RX_QUEUE_NUM).
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q) · line 2184
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q;
Shouldn't we also change that line to:
RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = pci_dev->max_vfs * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool; ?
Konstantin
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-1return 0 ; --2.11.0
Hi Yanglong
Please follow the comments, and get all of them well addressed. My comments is you need to use in-reply-to when you send any updated versions of a patch.
Regards,
Helin
Quoted 63 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ananyev, Konstantin
Sent: Monday, November 20, 2017 6:44 PM
To: Wu, Yanglong; [email protected]
Cc: Wu, Yanglong
Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PFdrivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev
Quoted 26 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Monday, November 20, 2017 2:40 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PFL3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q.
Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>--- drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2180,7 +2180,7 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev*dev,
uint16_tnb_rx_q)drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-1return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool =128 / +RTE_ETH_DEV_SRIOV (dev).active;Please use appropriate macros instead of constants (s/128/IXGBE_MAX_RX_QUEUE_NUM).
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev · line 2185
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = pci_dev->max_vfs *
nb_rx_q;Shouldn't we also change that line to:
RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx =pci_dev->max_vfs* RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;
?Konstantin
Quoted 4 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-1return 0 ; --2.11.0
PATCH v5 1/1 net/ixgbe: fix l3fwd start failed on
In reply to Yanglong WuL3fwd start failed on PF, for tx_q check failed.
That occurred when the SRIOV is active and tx_q > rx_q. The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should equeal to max number of queues supported by HW not nb_rx_q.
specific drivers)
---
v5:
Rework according to comments
--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +7 -3
@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE 0x680 +/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */
@@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; -RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; }
Signature · 1 line
2.11.0
Re: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Quoted 9 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Monday, January 8, 2018 3:06 AM
To: [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Quoted 4 lines
L3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q. Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.
But then 2 (or more cores) could try to TX packets through the same TX queue? Why not just fil to start gracefully (call rte_exit() or so) if such situation occurred? Konstantin
Quoted 42 lines
Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>---
v5:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +7
-4@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE 0x680 +/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */ @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; -RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; } --2.11.0
Re: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Hi, Konstantin
Thanks for your comments!
Do you means that tx_q is must less than rx_q when the SRIOV is active and if not, the application case will not be supported?
Do you think my patch will cause to 2 (or more cores) could try to TX packets through the same TX queue? And as far as I know, the way of core using tx_q queue is depend on the application (e.g. in l3fwd tx_q equal to number of core) and multi core use same tx_q is not suggested for locker is needed in this situation. So why do you think my patch will lead to multi core using same queue?
Yanglong Wu
-----Original Message-----
From: Ananyev, Konstantin
Sent: Monday, January 8, 2018 7:55 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Subject: RE: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Quoted 8 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Monday, January 8, 2018 3:06 AM
To: [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Quoted 4 lines
L3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q.
Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.
But then 2 (or more cores) could try to TX packets through the same TX queue? Why not just fil to start gracefully (call rte_exit() or so) if such situation occurred? Konstantin
Quoted 43 lines
Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>---
v5:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE
0x680drivers/net/ixgbe/ixgbe_ethdev.c +7
-4+/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */ @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; -RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; } --2.11.0
Re: [PATCH v5] net/ixgbe: fix l3fwd start failed on
Hi Yanglong,
Sorry, I was just confused by the description of the patch. The code itself seems ok... probably need to rephrase the description (remove mentioning l3fwd?).
Konstantin
Quoted 79 lines
Hi, Konstantin
Thanks for your comments!
Do you means thattx_qis must less thanrx_qwhen the SRIOV is active and if not, the application case will not be supported? Do you think my patch will cause to 2 (or more cores) could try to TX packets through the same TX queue? And as far as I know, the way of core usingtx_qqueue is depend on the application (e.g. in l3fwdtx_qequal to number of core) and multi core use sametx_qis not suggested for locker is needed in this situation. So why do you think my patch will lead to multi core using same queue?Yanglong Wu
-----Original Message-----
From: Ananyev, Konstantin
Sent: Monday, January 8, 2018 7:55 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Subject: RE: [PATCH v5] net/ixgbe: fix l3fwd start failed onQuoted 8 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Monday, January 8, 2018 3:06 AM
To: [email protected]
Cc: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed onQuoted 4 lines
L3fwd start failed on PF, for
tx_qcheck failed.
That occurred when the SRIOV is active andtx_q>rx_q.
Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.But then 2 (or more cores) could try to TX packets through the same TX queue? Why not just fil to start gracefully (call
rte_exit()or so) if such situation occurred? KonstantinQuoted 43 lines
Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>---
v5:
Rework according to comments--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE
0x680drivers/net/ixgbe/ixgbe_ethdev.c +7
-4+/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */ @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; -RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; } --2.11.0
PATCH v6 1/1 net/ixgbe: fix tx_q check failed on PF
In reply to Yanglong WuTx_q check failed on PF that occurred when the SRIOV is active and tx_q > rx_q. The tx_q is equal to nb_q_per_pool. The number of nb_q_per_pool should equeal to max number of queues supported by HW not nb_rx_q.
specific drivers)
---
v5:
Rework according to comments
---
v6:
rework commit log
--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +7 -3
@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE 0x680 +/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */
@@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; -RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; }
Signature · 1 line
2.11.0
Re: [PATCH v6] net/ixgbe: fix tx_q check failed on PF
Quoted 47 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Wednesday, January 10, 2018 1:52 AM
To: [email protected]; Ananyev, Konstantin <[email protected]>; Zhang, Helin <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [PATCH v6] net/ixgbe: fixtx_qcheck failed on PF
Tx_qcheck failed on PF that occurred when the SRIOV is active andtx_q>rx_q. Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>---
v5:
Rework according to comments
---
v6:
rework commit log--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +3
-1@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE 0x680 +/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */ @@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q;
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
Quoted 10 lines
drivers/net/ixgbe/ixgbe_ethdev.c +4
-3-RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = pci_dev->max_vfs * nb_rx_q; - +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = +IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV (dev).active; +RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; } --
Quoted 1 line
2.11.0
Zhang, Helin
AppliedRe: [PATCH v6] net/ixgbe: fix tx_q check failed on PF
Quoted 65 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Wednesday, January 10, 2018 9:57 AM
To: Wu, Yanglong; [email protected]; Zhang, Helin
Subject: RE: [PATCH v6] net/ixgbe: fixtx_qcheck failed on PFQuoted 36 lines
-----Original Message-----
From: Wu, Yanglong
Sent: Wednesday, January 10, 2018 1:52 AM
To: [email protected]; Ananyev, Konstantin <[email protected]>; Zhang, Helin <[email protected]>
Cc: Wu, Yanglong <[email protected]>
Subject: [PATCH v6] net/ixgbe: fixtx_qcheck failed on PF
Tx_qcheck failed on PF that occurred when the SRIOV is active andtx_q>rx_q. Thetx_qis equal tonb_q_per_pool. The number ofnb_q_per_poolshould equeal to max number of queues supported by HW notnb_rx_q.Fixes 27b609cbd1c6 (ethdev: move the multi-queue mode check tospecific drivers)
Signed-off-by Yanglong Wu <[email protected]>---
v5:
Rework according to comments
---
v6:
rework commit log--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -95,6 +95,9 @@/* Timer value included in XOFF frames. */ #define IXGBE_FC_PAUSE
0x680drivers/net/ixgbe/ixgbe_ethdev.c
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +3
-0+/*Default value of Max Rx Queue*/ +#define IXGBE_MAX_RX_QUEUE_NUM 128 +#define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000/* ms */ #define IXGBE_LINK_UP_CHECK_TIMEOUT 1000/* ms */ #define IXGBE_VMDQ_NUM_UC_MAC 4096/* Maximum nb. of UC MAC addr. */
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev
Quoted 1 line
drivers/net/ixgbe/ixgbe_ethdev.c +0
-0@@ -2194,9 +2197,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev*dev,
uint16_tnb_rx_q)drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
Quoted 5 lines
drivers/net/ixgbe/ixgbe_ethdev.c +0
-2return -EINVAL ; } -RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = nb_rx_q; - RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = pci_dev->max_vfs *
nb_rx_q;drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
Quoted 3 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-1- +RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool = + IXGBE_MAX_RX_QUEUE_NUM /RTE_ETH_DEV_SRIOV(dev).active;
Quoted 8 lines
drivers/net/ixgbe/ixgbe_ethdev.c ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
Quoted 6 lines
drivers/net/ixgbe/ixgbe_ethdev.c +2
-1+RTE_ETH_DEV_SRIOV (dev).def_pool_q_idx = + pci_dev->max_vfs *RTE_ETH_DEV_SRIOV (dev).nb_q_per_pool;return 0 ; } --
Applied to dpdk-next-net-intel, with commit log changes. Thanks!
/Helin
Quoted 2 lines
Quoted 2 lines
2.11.0