DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS
@ 2013-11-19 13:03 Maxime Leroy
  2013-11-19 13:03 ` [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue Maxime Leroy
  2013-11-20  9:49 ` [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Ivan Boule
  0 siblings, 2 replies; 8+ messages in thread
From: Maxime Leroy @ 2013-11-19 13:03 UTC (permalink / raw)
  To: dev

As explained in rte_ethdev.h, ETH_MQ_RX_NONE allows to not choose RSS, DCB
or VMDQ mode to select the rx queues.

But the igb/ixgbe code always select RSS mode with ETH_MQ_RX_NONE. This patch
fixes this incoherence between the api and the source code.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
---
 lib/librte_pmd_e1000/igb_rxtx.c   |    4 ++--
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c
index f785d9f..641ceea 100644
--- a/lib/librte_pmd_e1000/igb_rxtx.c
+++ b/lib/librte_pmd_e1000/igb_rxtx.c
@@ -1745,8 +1745,6 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
 	 	*/
 		if (dev->data->nb_rx_queues > 1)
 			switch (dev->data->dev_conf.rxmode.mq_mode) {
-			case ETH_MQ_RX_NONE:
-				/* if mq_mode not assign, we use rss mode.*/
 			case ETH_MQ_RX_RSS:
 				igb_rss_configure(dev);
 				break;
@@ -1754,6 +1752,8 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
 				/*Configure general VMDQ only RX parameters*/
 				igb_vmdq_rx_hw_configure(dev); 
 				break;
+			case ETH_MQ_RX_NONE:
+				/* if mq_mode is none, disable rss mode.*/
 			default: 
 				igb_rss_disable(dev);
 				break;
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 0f7be95..e1b90f9 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -3217,8 +3217,6 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
 		 */
 		if (dev->data->nb_rx_queues > 1)
 			switch (dev->data->dev_conf.rxmode.mq_mode) {
-			case ETH_MQ_RX_NONE:
-				/* if mq_mode not assign, we use rss mode.*/
 			case ETH_MQ_RX_RSS:
 				ixgbe_rss_configure(dev);
 				break;
@@ -3231,6 +3229,8 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
 				ixgbe_vmdq_rx_hw_configure(dev);
 				break;
 			
+			case ETH_MQ_RX_NONE:
+				/* if mq_mode is none, disable rss mode.*/
 			default: ixgbe_rss_disable(dev);
 			}
 		else
-- 
1.7.10.4

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

* [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue
  2013-11-19 13:03 [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Maxime Leroy
@ 2013-11-19 13:03 ` Maxime Leroy
  2013-11-20  9:37   ` Ivan Boule
  2013-11-20  9:49 ` [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Ivan Boule
  1 sibling, 1 reply; 8+ messages in thread
From: Maxime Leroy @ 2013-11-19 13:03 UTC (permalink / raw)
  To: dev

We should be able to enable RSS with one Rx queue.
RSS hash can be useful independently of the number of queues.
Applications can use RSS hash to identify different flows.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
---
 lib/librte_pmd_e1000/igb_rxtx.c   |    7 ++-----
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c
index 641ceea..8c1e2cc 100644
--- a/lib/librte_pmd_e1000/igb_rxtx.c
+++ b/lib/librte_pmd_e1000/igb_rxtx.c
@@ -1743,8 +1743,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
 		/*
 	 	* SRIOV inactive scheme
 	 	*/
-		if (dev->data->nb_rx_queues > 1)
-			switch (dev->data->dev_conf.rxmode.mq_mode) {
+		switch (dev->data->dev_conf.rxmode.mq_mode) {
 			case ETH_MQ_RX_RSS:
 				igb_rss_configure(dev);
 				break;
@@ -1757,9 +1756,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
 			default: 
 				igb_rss_disable(dev);
 				break;
-			}
-		else
-			igb_rss_disable(dev);
+		}
 	}
  
 	return 0;
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index e1b90f9..ae9eda8 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -3215,8 +3215,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
 	 	 * SRIOV inactive scheme
 		 * any DCB/RSS w/o VMDq multi-queue setting
 		 */
-		if (dev->data->nb_rx_queues > 1)
-			switch (dev->data->dev_conf.rxmode.mq_mode) {
+		switch (dev->data->dev_conf.rxmode.mq_mode) {
 			case ETH_MQ_RX_RSS:
 				ixgbe_rss_configure(dev);
 				break;
@@ -3232,9 +3231,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
 			case ETH_MQ_RX_NONE:
 				/* if mq_mode is none, disable rss mode.*/
 			default: ixgbe_rss_disable(dev);
-			}
-		else
-			ixgbe_rss_disable(dev);
+		}
 	} else {
 		switch (RTE_ETH_DEV_SRIOV(dev).active) {
 		/*
-- 
1.7.10.4

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

* Re: [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue
  2013-11-19 13:03 ` [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue Maxime Leroy
@ 2013-11-20  9:37   ` Ivan Boule
  2013-11-20  9:57     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Ivan Boule @ 2013-11-20  9:37 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: dev

On 11/19/2013 02:03 PM, Maxime Leroy wrote:
> It should be possible to enable RSS with a single Rx queue.
> The RSS hash can be useful independently of the number of RX queues.
> Hence, DPDK applications can use the hardware-computed RSS hash to 
> manage in software different IP packet flows.
>
> Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> ---
>   lib/librte_pmd_e1000/igb_rxtx.c   |    7 ++-----
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    7 ++-----
>   2 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/lib/librte_pmd_e1000/igb_rxtx.c 
> b/lib/librte_pmd_e1000/igb_rxtx.c
> index 641ceea..8c1e2cc 100644
> --- a/lib/librte_pmd_e1000/igb_rxtx.c
> +++ b/lib/librte_pmd_e1000/igb_rxtx.c
> @@ -1743,8 +1743,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>           /*
>            * SRIOV inactive scheme
>            */
> -        if (dev->data->nb_rx_queues > 1)
> -            switch (dev->data->dev_conf.rxmode.mq_mode) {
> +        switch (dev->data->dev_conf.rxmode.mq_mode) {
>               case ETH_MQ_RX_RSS:
>                   igb_rss_configure(dev);
>                   break;
> @@ -1757,9 +1756,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>               default:
>                   igb_rss_disable(dev);
>                   break;
> -            }
> -        else
> -            igb_rss_disable(dev);
> +        }
>       }
>          return 0;
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c 
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index e1b90f9..ae9eda8 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -3215,8 +3215,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>             * SRIOV inactive scheme
>            * any DCB/RSS w/o VMDq multi-queue setting
>            */
> -        if (dev->data->nb_rx_queues > 1)
> -            switch (dev->data->dev_conf.rxmode.mq_mode) {
> +        switch (dev->data->dev_conf.rxmode.mq_mode) {
>               case ETH_MQ_RX_RSS:
>                   ixgbe_rss_configure(dev);
>                   break;
> @@ -3232,9 +3231,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>               case ETH_MQ_RX_NONE:
>                   /* if mq_mode is none, disable rss mode.*/
>               default: ixgbe_rss_disable(dev);
> -            }
> -        else
> -            ixgbe_rss_disable(dev);
> +        }
>       } else {
>           switch (RTE_ETH_DEV_SRIOV(dev).active) {
>           /*

Acked by Ivan Boule <ivan.boule@6wind.com>

-- 
Ivan Boule
6WIND Development Engineer

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

* Re: [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS
  2013-11-19 13:03 [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Maxime Leroy
  2013-11-19 13:03 ` [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue Maxime Leroy
@ 2013-11-20  9:49 ` Ivan Boule
  2013-11-20  9:56   ` Thomas Monjalon
  2013-11-20 10:06   ` Prashant Upadhyaya
  1 sibling, 2 replies; 8+ messages in thread
From: Ivan Boule @ 2013-11-20  9:49 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: dev

On 11/19/2013 02:03 PM, Maxime Leroy wrote:
> As explained in rte_ethdev.h, ETH_MQ_RX_NONE allows to not choose 
> between RSS, DCB
> or VMDQ modes for the selection of a rx queue.
>
> But the igb/ixgbe code always silently selects the RSS mode with 
> ETH_MQ_RX_NONE. This patch
> fixes this incoherence between the API and the implementation.
>
> Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> ---
>   lib/librte_pmd_e1000/igb_rxtx.c   |    4 ++--
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_pmd_e1000/igb_rxtx.c 
> b/lib/librte_pmd_e1000/igb_rxtx.c
> index f785d9f..641ceea 100644
> --- a/lib/librte_pmd_e1000/igb_rxtx.c
> +++ b/lib/librte_pmd_e1000/igb_rxtx.c
> @@ -1745,8 +1745,6 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>            */
>           if (dev->data->nb_rx_queues > 1)
>               switch (dev->data->dev_conf.rxmode.mq_mode) {
> -            case ETH_MQ_RX_NONE:
> -                /* if mq_mode not assign, we use rss mode.*/
>               case ETH_MQ_RX_RSS:
>                   igb_rss_configure(dev);
>                   break;
> @@ -1754,6 +1752,8 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>                   /*Configure general VMDQ only RX parameters*/
>                   igb_vmdq_rx_hw_configure(dev);
>                   break;
> +            case ETH_MQ_RX_NONE:
> +                /* if mq_mode is none, disable rss mode.*/
>               default:
>                   igb_rss_disable(dev);
>                   break;
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c 
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index 0f7be95..e1b90f9 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -3217,8 +3217,6 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>            */
>           if (dev->data->nb_rx_queues > 1)
>               switch (dev->data->dev_conf.rxmode.mq_mode) {
> -            case ETH_MQ_RX_NONE:
> -                /* if mq_mode not assign, we use rss mode.*/
>               case ETH_MQ_RX_RSS:
>                   ixgbe_rss_configure(dev);
>                   break;
> @@ -3231,6 +3229,8 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>                   ixgbe_vmdq_rx_hw_configure(dev);
>                   break;
>
> +            case ETH_MQ_RX_NONE:
> +                /* if mq_mode is none, disable rss mode.*/
>               default: ixgbe_rss_disable(dev);
>               }
>           else

Acked by Ivan Boule <ivan.boule@6wind.com>

-- 
Ivan Boule
6WIND Development Engineer

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

* Re: [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS
  2013-11-20  9:49 ` [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Ivan Boule
@ 2013-11-20  9:56   ` Thomas Monjalon
  2013-11-20 10:06   ` Prashant Upadhyaya
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-20  9:56 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: dev

20/11/2013 10:49, Ivan Boule :
> On 11/19/2013 02:03 PM, Maxime Leroy wrote:
> > As explained in rte_ethdev.h, ETH_MQ_RX_NONE allows to not choose
> > between RSS, DCB
> > or VMDQ modes for the selection of a rx queue.
> > 
> > But the igb/ixgbe code always silently selects the RSS mode with
> > ETH_MQ_RX_NONE. This patch
> > fixes this incoherence between the API and the implementation.
> > 
> > Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> 
> Acked by Ivan Boule <ivan.boule@6wind.com>

Applied

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue
  2013-11-20  9:37   ` Ivan Boule
@ 2013-11-20  9:57     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-20  9:57 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: dev

20/11/2013 10:37, Ivan Boule :
> On 11/19/2013 02:03 PM, Maxime Leroy wrote:
> > It should be possible to enable RSS with a single Rx queue.
> > The RSS hash can be useful independently of the number of RX queues.
> > Hence, DPDK applications can use the hardware-computed RSS hash to
> > manage in software different IP packet flows.
> > 
> > Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> 
> Acked by Ivan Boule <ivan.boule@6wind.com>

Applied

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS
  2013-11-20  9:49 ` [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Ivan Boule
  2013-11-20  9:56   ` Thomas Monjalon
@ 2013-11-20 10:06   ` Prashant Upadhyaya
  2013-11-20 10:14     ` Thomas Monjalon
  1 sibling, 1 reply; 8+ messages in thread
From: Prashant Upadhyaya @ 2013-11-20 10:06 UTC (permalink / raw)
  To: Ivan Boule, Maxime Leroy; +Cc: dev

Hi,

So if I have multiple queues and was using ETH_MQ_RX_NONE (and therefore utilizing RSS), it will stop working for me now after this patch ?

Regards
-Prashant


-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ivan Boule
Sent: Wednesday, November 20, 2013 3:20 PM
To: Maxime Leroy
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS

On 11/19/2013 02:03 PM, Maxime Leroy wrote:
> As explained in rte_ethdev.h, ETH_MQ_RX_NONE allows to not choose
> between RSS, DCB or VMDQ modes for the selection of a rx queue.
>
> But the igb/ixgbe code always silently selects the RSS mode with
> ETH_MQ_RX_NONE. This patch fixes this incoherence between the API and
> the implementation.
>
> Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
> ---
>   lib/librte_pmd_e1000/igb_rxtx.c   |    4 ++--
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c |    4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_pmd_e1000/igb_rxtx.c
> b/lib/librte_pmd_e1000/igb_rxtx.c index f785d9f..641ceea 100644
> --- a/lib/librte_pmd_e1000/igb_rxtx.c
> +++ b/lib/librte_pmd_e1000/igb_rxtx.c
> @@ -1745,8 +1745,6 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>            */
>           if (dev->data->nb_rx_queues > 1)
>               switch (dev->data->dev_conf.rxmode.mq_mode) {
> -            case ETH_MQ_RX_NONE:
> -                /* if mq_mode not assign, we use rss mode.*/
>               case ETH_MQ_RX_RSS:
>                   igb_rss_configure(dev);
>                   break;
> @@ -1754,6 +1752,8 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
>                   /*Configure general VMDQ only RX parameters*/
>                   igb_vmdq_rx_hw_configure(dev);
>                   break;
> +            case ETH_MQ_RX_NONE:
> +                /* if mq_mode is none, disable rss mode.*/
>               default:
>                   igb_rss_disable(dev);
>                   break;
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index 0f7be95..e1b90f9 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -3217,8 +3217,6 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>            */
>           if (dev->data->nb_rx_queues > 1)
>               switch (dev->data->dev_conf.rxmode.mq_mode) {
> -            case ETH_MQ_RX_NONE:
> -                /* if mq_mode not assign, we use rss mode.*/
>               case ETH_MQ_RX_RSS:
>                   ixgbe_rss_configure(dev);
>                   break;
> @@ -3231,6 +3229,8 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
>                   ixgbe_vmdq_rx_hw_configure(dev);
>                   break;
>
> +            case ETH_MQ_RX_NONE:
> +                /* if mq_mode is none, disable rss mode.*/
>               default: ixgbe_rss_disable(dev);
>               }
>           else

Acked by Ivan Boule <ivan.boule@6wind.com>

--
Ivan Boule
6WIND Development Engineer





===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================

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

* Re: [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS
  2013-11-20 10:06   ` Prashant Upadhyaya
@ 2013-11-20 10:14     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2013-11-20 10:14 UTC (permalink / raw)
  To: Prashant Upadhyaya; +Cc: dev

20/11/2013 11:06, Prashant Upadhyaya :
> So if I have multiple queues and was using ETH_MQ_RX_NONE (and therefore
> utilizing RSS), it will stop working for me now after this patch ?

Yes, you should use ETH_MQ_RX_RSS to explicitly enable RSS.

> ======================================================================
> Please refer to http://www.aricent.com/legal/email_disclaimer.html
> for important disclosures regarding this electronic communication.
> ======================================================================

Please do not use this type of disclaimer on a public mailing list.

-- 
Thomas

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

end of thread, other threads:[~2013-11-20 10:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19 13:03 [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Maxime Leroy
2013-11-19 13:03 ` [dpdk-dev] [PATCH 2/2] igb/ixgbe: allow RSS with only one Rx queue Maxime Leroy
2013-11-20  9:37   ` Ivan Boule
2013-11-20  9:57     ` Thomas Monjalon
2013-11-20  9:49 ` [dpdk-dev] [PATCH 1/2] igb/ixgbe: ETH_MQ_RX_NONE should disable RSS Ivan Boule
2013-11-20  9:56   ` Thomas Monjalon
2013-11-20 10:06   ` Prashant Upadhyaya
2013-11-20 10:14     ` Thomas Monjalon

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