DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] net/ixgbe: fix l3fwd start failed on PF
       [not found] <20171102161031.167892-2-yanglong.wu@intel.com>
@ 2017-11-20  1:53 ` Yanglong Wu
  2017-11-20  2:29   ` [dpdk-dev] [PATCH v3] " Yanglong Wu
  0 siblings, 1 reply; 13+ messages in thread
From: Yanglong Wu @ 2017-11-20  1:53 UTC (permalink / raw)
  To: dev; +Cc: Yanglong Wu

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.

Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to specific drivers)

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ae9c44421..0f0641da1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v3] net/ixgbe: fix l3fwd start failed on PF
  2017-11-20  1:53 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix l3fwd start failed on PF Yanglong Wu
@ 2017-11-20  2:29   ` Yanglong Wu
  2017-11-20  2:40     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
  0 siblings, 1 reply; 13+ messages in thread
From: Yanglong Wu @ 2017-11-20  2:29 UTC (permalink / raw)
  To: dev; +Cc: Yanglong Wu

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.

Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to specific drivers)

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ae9c44421..0f0641da1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
  2017-11-20  2:29   ` [dpdk-dev] [PATCH v3] " Yanglong Wu
@ 2017-11-20  2:40     ` Yanglong Wu
  2017-11-20 10:43       ` Ananyev, Konstantin
  2018-01-08  3:06       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on Yanglong Wu
  0 siblings, 2 replies; 13+ messages in thread
From: Yanglong Wu @ 2017-11-20  2:40 UTC (permalink / raw)
  To: dev; +Cc: Yanglong Wu

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.

Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to specific drivers)

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ae9c44421..0f0641da1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
  2017-11-20  2:40     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
@ 2017-11-20 10:43       ` Ananyev, Konstantin
  2017-11-21  2:17         ` Wu, Yanglong
  2018-01-07 15:34         ` Zhang, Helin
  2018-01-08  3:06       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on Yanglong Wu
  1 sibling, 2 replies; 13+ messages in thread
From: Ananyev, Konstantin @ 2017-11-20 10:43 UTC (permalink / raw)
  To: Wu, Yanglong, dev; +Cc: Wu, Yanglong



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu
> Sent: Monday, November 20, 2017 2:40 AM
> To: dev@dpdk.org
> Cc: Wu, Yanglong <yanglong.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v4] 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.
> 
> Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to specific drivers)
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ae9c44421..0f0641da1 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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).


>  	RTE_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

> 
>  	return 0;
> --
> 2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
  2017-11-20 10:43       ` Ananyev, Konstantin
@ 2017-11-21  2:17         ` Wu, Yanglong
  2018-01-07 15:34         ` Zhang, Helin
  1 sibling, 0 replies; 13+ messages in thread
From: Wu, Yanglong @ 2017-11-21  2:17 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev

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 <yanglong.wu@intel.com>; dev@dpdk.org
Cc: Wu, Yanglong <yanglong.wu@intel.com>
Subject: RE: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu
> Sent: Monday, November 20, 2017 2:40 AM
> To: dev@dpdk.org
> Cc: Wu, Yanglong <yanglong.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v4] 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.
> 
> Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to 
> specific drivers)
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c 
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ae9c44421..0f0641da1 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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).


>  	RTE_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

> 
>  	return 0;
> --
> 2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
  2017-11-20 10:43       ` Ananyev, Konstantin
  2017-11-21  2:17         ` Wu, Yanglong
@ 2018-01-07 15:34         ` Zhang, Helin
  1 sibling, 0 replies; 13+ messages in thread
From: Zhang, Helin @ 2018-01-07 15:34 UTC (permalink / raw)
  To: Wu, Yanglong; +Cc: Wu, Yanglong, Ananyev, Konstantin, dev

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

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev,
> Konstantin
> Sent: Monday, November 20, 2017 6:44 PM
> To: Wu, Yanglong; dev@dpdk.org
> Cc: Wu, Yanglong
> Subject: Re: [dpdk-dev] [PATCH v4] net/ixgbe: fix l3fwd start failed on PF
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu
> > Sent: Monday, November 20, 2017 2:40 AM
> > To: dev@dpdk.org
> > Cc: Wu, Yanglong <yanglong.wu@intel.com>
> > Subject: [dpdk-dev] [PATCH v4] 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.
> >
> > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
> > specific drivers)
> >
> > Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index ae9c44421..0f0641da1 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -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).
> 
> 
> >  	RTE_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
> 
> >
> >  	return 0;
> > --
> > 2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on
  2017-11-20  2:40     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
  2017-11-20 10:43       ` Ananyev, Konstantin
@ 2018-01-08  3:06       ` Yanglong Wu
  2018-01-08 11:54         ` Ananyev, Konstantin
  2018-01-10  1:51         ` [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF Yanglong Wu
  1 sibling, 2 replies; 13+ messages in thread
From: Yanglong Wu @ 2018-01-08  3:06 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, Yanglong Wu

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.

Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
specific drivers)

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
v5:
Rework according to comments
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff19a564a..baaeee5d9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on
  2018-01-08  3:06       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on Yanglong Wu
@ 2018-01-08 11:54         ` Ananyev, Konstantin
  2018-01-09  2:29           ` Wu, Yanglong
  2018-01-10  1:51         ` [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF Yanglong Wu
  1 sibling, 1 reply; 13+ messages in thread
From: Ananyev, Konstantin @ 2018-01-08 11:54 UTC (permalink / raw)
  To: Wu, Yanglong, dev



> -----Original Message-----
> From: Wu, Yanglong
> Sent: Monday, January 8, 2018 3:06 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Yanglong <yanglong.wu@intel.com>
> Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on
> 
> 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.

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

> 
> Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
> specific drivers)
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
> v5:
> Rework according to comments
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ff19a564a..baaeee5d9 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on
  2018-01-08 11:54         ` Ananyev, Konstantin
@ 2018-01-09  2:29           ` Wu, Yanglong
  2018-01-09 12:39             ` Ananyev, Konstantin
  0 siblings, 1 reply; 13+ messages in thread
From: Wu, Yanglong @ 2018-01-09  2:29 UTC (permalink / raw)
  To: Ananyev, Konstantin, Lu, Wenzhuo; +Cc: dev

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 <yanglong.wu@intel.com>; dev@dpdk.org
Subject: RE: [PATCH v5] net/ixgbe: fix l3fwd start failed on



> -----Original Message-----
> From: Wu, Yanglong
> Sent: Monday, January 8, 2018 3:06 AM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Yanglong 
> <yanglong.wu@intel.com>
> Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on
> 
> 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.

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

> 
> Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to 
> specific drivers)
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
> v5:
> Rework according to comments
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c 
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ff19a564a..baaeee5d9 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on
  2018-01-09  2:29           ` Wu, Yanglong
@ 2018-01-09 12:39             ` Ananyev, Konstantin
  0 siblings, 0 replies; 13+ messages in thread
From: Ananyev, Konstantin @ 2018-01-09 12:39 UTC (permalink / raw)
  To: Wu, Yanglong, Lu, Wenzhuo; +Cc: dev


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  

> 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 <yanglong.wu@intel.com>; dev@dpdk.org
> Subject: RE: [PATCH v5] net/ixgbe: fix l3fwd start failed on
> 
> 
> 
> > -----Original Message-----
> > From: Wu, Yanglong
> > Sent: Monday, January 8, 2018 3:06 AM
> > To: dev@dpdk.org
> > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Yanglong
> > <yanglong.wu@intel.com>
> > Subject: [PATCH v5] net/ixgbe: fix l3fwd start failed on
> >
> > 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.
> 
> 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
> 
> >
> > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
> > specific drivers)
> >
> > Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> > ---
> > v5:
> > Rework according to comments
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index ff19a564a..baaeee5d9 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF
  2018-01-08  3:06       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on Yanglong Wu
  2018-01-08 11:54         ` Ananyev, Konstantin
@ 2018-01-10  1:51         ` Yanglong Wu
  2018-01-10  1:57           ` Ananyev, Konstantin
  1 sibling, 1 reply; 13+ messages in thread
From: Yanglong Wu @ 2018-01-10  1:51 UTC (permalink / raw)
  To: dev, konstantin.ananyev, helin.zhang; +Cc: Yanglong Wu

Tx_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.

Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
specific drivers)

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
v5:
Rework according to comments
---
v6:
rework commit log
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff19a564a..baaeee5d9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF
  2018-01-10  1:51         ` [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF Yanglong Wu
@ 2018-01-10  1:57           ` Ananyev, Konstantin
  2018-01-10  2:23             ` Zhang, Helin
  0 siblings, 1 reply; 13+ messages in thread
From: Ananyev, Konstantin @ 2018-01-10  1:57 UTC (permalink / raw)
  To: Wu, Yanglong, dev, Zhang, Helin



> -----Original Message-----
> From: Wu, Yanglong
> Sent: Wednesday, January 10, 2018 1:52 AM
> To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin <helin.zhang@intel.com>
> Cc: Wu, Yanglong <yanglong.wu@intel.com>
> Subject: [PATCH v6] net/ixgbe: fix tx_q check failed on PF
> 
> Tx_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.
> 
> Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
> specific drivers)
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
> v5:
> Rework according to comments
> ---
> v6:
> rework commit log
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index ff19a564a..baaeee5d9 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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;
>  }
> 
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF
  2018-01-10  1:57           ` Ananyev, Konstantin
@ 2018-01-10  2:23             ` Zhang, Helin
  0 siblings, 0 replies; 13+ messages in thread
From: Zhang, Helin @ 2018-01-10  2:23 UTC (permalink / raw)
  To: Ananyev, Konstantin, Wu, Yanglong, dev



> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Wednesday, January 10, 2018 9:57 AM
> To: Wu, Yanglong; dev@dpdk.org; Zhang, Helin
> Subject: RE: [PATCH v6] net/ixgbe: fix tx_q check failed on PF
> 
> 
> 
> > -----Original Message-----
> > From: Wu, Yanglong
> > Sent: Wednesday, January 10, 2018 1:52 AM
> > To: dev@dpdk.org; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> > Zhang, Helin <helin.zhang@intel.com>
> > Cc: Wu, Yanglong <yanglong.wu@intel.com>
> > Subject: [PATCH v6] net/ixgbe: fix tx_q check failed on PF
> >
> > Tx_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.
> >
> > Fixes: 27b609cbd1c6 (ethdev: move the multi-queue mode check to
> > specific drivers)
> >
> > Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> > ---
> > v5:
> > Rework according to comments
> > ---
> > v6:
> > rework commit log
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index ff19a564a..baaeee5d9 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -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;
> >  }
> >
> > --
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied to dpdk-next-net-intel, with commit log changes. Thanks!

/Helin
> 
> > 2.11.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-01-10  2:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20171102161031.167892-2-yanglong.wu@intel.com>
2017-11-20  1:53 ` [dpdk-dev] [PATCH v2] net/ixgbe: fix l3fwd start failed on PF Yanglong Wu
2017-11-20  2:29   ` [dpdk-dev] [PATCH v3] " Yanglong Wu
2017-11-20  2:40     ` [dpdk-dev] [PATCH v4] " Yanglong Wu
2017-11-20 10:43       ` Ananyev, Konstantin
2017-11-21  2:17         ` Wu, Yanglong
2018-01-07 15:34         ` Zhang, Helin
2018-01-08  3:06       ` [dpdk-dev] [PATCH v5] net/ixgbe: fix l3fwd start failed on Yanglong Wu
2018-01-08 11:54         ` Ananyev, Konstantin
2018-01-09  2:29           ` Wu, Yanglong
2018-01-09 12:39             ` Ananyev, Konstantin
2018-01-10  1:51         ` [dpdk-dev] [PATCH v6] net/ixgbe: fix tx_q check failed on PF Yanglong Wu
2018-01-10  1:57           ` Ananyev, Konstantin
2018-01-10  2:23             ` Zhang, Helin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).