DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update
@ 2018-06-01 17:16 Rasesh Mody
  2018-06-05 13:39 ` Kevin Traynor
  2018-06-05 23:03 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
  0 siblings, 2 replies; 8+ messages in thread
From: Rasesh Mody @ 2018-06-01 17:16 UTC (permalink / raw)
  To: dev; +Cc: Rasesh Mody, ferruh.yigit, Dept-EngDPDKDev, stable

Fix fast path array index which is used for passing L2 handles to RSS
indirection table. Currently, it is using the local copy of indirection
table. When the RX queue configuration changes the local copy becomes
invalid.

Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3206cc6..6e9e76d 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	vport_update_params.vport_id = 0;
 	/* pass the L2 handles instead of qids */
 	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
-		idx = qdev->rss_ind_table[i];
+		idx = ECORE_RSS_IND_TABLE_SIZE % QEDE_RSS_COUNT(qdev);
 		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;
 	}
 	vport_update_params.rss_params = &rss_params;
-- 
1.7.10.3

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

* Re: [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update
  2018-06-01 17:16 [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update Rasesh Mody
@ 2018-06-05 13:39 ` Kevin Traynor
  2018-06-05 16:16   ` Mody, Rasesh
  2018-06-05 23:03 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Traynor @ 2018-06-05 13:39 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: ferruh.yigit, Dept-EngDPDKDev, stable

On 06/01/2018 06:16 PM, Rasesh Mody wrote:
> Fix fast path array index which is used for passing L2 handles to RSS
> indirection table. Currently, it is using the local copy of indirection
> table. When the RX queue configuration changes the local copy becomes
> invalid.
> 
> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> ---
>  drivers/net/qede/qede_ethdev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index 3206cc6..6e9e76d 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
>  	vport_update_params.vport_id = 0;
>  	/* pass the L2 handles instead of qids */
>  	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
> -		idx = qdev->rss_ind_table[i];
> +		idx = ECORE_RSS_IND_TABLE_SIZE % QEDE_RSS_COUNT(qdev);
>  		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;

hi, idx never changes in the loop, so the same rxq handle is in every
rss_ind_table entry - is it right?

>  	}
>  	vport_update_params.rss_params = &rss_params;
> 

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

* Re: [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update
  2018-06-05 13:39 ` Kevin Traynor
@ 2018-06-05 16:16   ` Mody, Rasesh
  2018-06-05 16:41     ` Kevin Traynor
  0 siblings, 1 reply; 8+ messages in thread
From: Mody, Rasesh @ 2018-06-05 16:16 UTC (permalink / raw)
  To: Kevin Traynor, dev; +Cc: ferruh.yigit, Dept-Eng DPDK Dev, stable

> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Tuesday, June 05, 2018 6:40 AM
> 
> On 06/01/2018 06:16 PM, Rasesh Mody wrote:
> > Fix fast path array index which is used for passing L2 handles to RSS
> > indirection table. Currently, it is using the local copy of
> > indirection table. When the RX queue configuration changes the local
> > copy becomes invalid.
> >
> > Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS
> > configuration")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> > ---
> >  drivers/net/qede/qede_ethdev.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/qede/qede_ethdev.c
> > b/drivers/net/qede/qede_ethdev.c index 3206cc6..6e9e76d 100644
> > --- a/drivers/net/qede/qede_ethdev.c
> > +++ b/drivers/net/qede/qede_ethdev.c
> > @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev
> *eth_dev,
> >  	vport_update_params.vport_id = 0;
> >  	/* pass the L2 handles instead of qids */
> >  	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
> > -		idx = qdev->rss_ind_table[i];
> > +		idx = ECORE_RSS_IND_TABLE_SIZE %
> QEDE_RSS_COUNT(qdev);
> >  		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq-
> >handle;
> 
> hi, idx never changes in the loop, so the same rxq handle is in every
> rss_ind_table entry - is it right?

The idx depends on number of RXQs. If a single RXQ is configured then idx does not change in the loop,  in which case same RXQ handle is in every entry.

Thanks!
-Rasesh
> 
> >  	}
> >  	vport_update_params.rss_params = &rss_params;
> >


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

* Re: [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update
  2018-06-05 16:16   ` Mody, Rasesh
@ 2018-06-05 16:41     ` Kevin Traynor
  2018-06-05 17:14       ` Mody, Rasesh
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Traynor @ 2018-06-05 16:41 UTC (permalink / raw)
  To: Mody, Rasesh, dev; +Cc: ferruh.yigit, Dept-Eng DPDK Dev, stable

On 06/05/2018 05:16 PM, Mody, Rasesh wrote:
>> From: Kevin Traynor [mailto:ktraynor@redhat.com]
>> Sent: Tuesday, June 05, 2018 6:40 AM
>>
>> On 06/01/2018 06:16 PM, Rasesh Mody wrote:
>>> Fix fast path array index which is used for passing L2 handles to RSS
>>> indirection table. Currently, it is using the local copy of
>>> indirection table. When the RX queue configuration changes the local
>>> copy becomes invalid.
>>>
>>> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS
>>> configuration")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
>>> ---
>>>  drivers/net/qede/qede_ethdev.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/qede/qede_ethdev.c
>>> b/drivers/net/qede/qede_ethdev.c index 3206cc6..6e9e76d 100644
>>> --- a/drivers/net/qede/qede_ethdev.c
>>> +++ b/drivers/net/qede/qede_ethdev.c
>>> @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev
>> *eth_dev,
>>>  	vport_update_params.vport_id = 0;
>>>  	/* pass the L2 handles instead of qids */
>>>  	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
>>> -		idx = qdev->rss_ind_table[i];
>>> +		idx = ECORE_RSS_IND_TABLE_SIZE %
>> QEDE_RSS_COUNT(qdev);
>>>  		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq-
>>> handle;
>>
>> hi, idx never changes in the loop, so the same rxq handle is in every
>> rss_ind_table entry - is it right?
> 
> The idx depends on number of RXQs. If a single RXQ is configured then idx does not change in the loop,  in which case same RXQ handle is in every entry.

The value depends on number of Rxqs, but that value will not change for
each of 128 iterations *regardless* of the number of Rxq's configured
(assuming that will be static during the loop). Perhaps that's what you
want, but it looks odd to be calculating the idx in each loop iteration
when it won't change.

idx = ECORE_RSS_IND_TABLE_SIZE % QEDE_RSS_COUNT(qdev)

=>

idx = 128 % qdev->num_rx_queues

> 
> Thanks!
> -Rasesh
>>
>>>  	}
>>>  	vport_update_params.rss_params = &rss_params;
>>>
> 

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

* Re: [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update
  2018-06-05 16:41     ` Kevin Traynor
@ 2018-06-05 17:14       ` Mody, Rasesh
  0 siblings, 0 replies; 8+ messages in thread
From: Mody, Rasesh @ 2018-06-05 17:14 UTC (permalink / raw)
  To: Kevin Traynor, dev; +Cc: ferruh.yigit, Dept-Eng DPDK Dev, stable

> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> Sent: Tuesday, June 05, 2018 9:42 AM
> 
> On 06/05/2018 05:16 PM, Mody, Rasesh wrote:
> >> From: Kevin Traynor [mailto:ktraynor@redhat.com]
> >> Sent: Tuesday, June 05, 2018 6:40 AM
> >>
> >> On 06/01/2018 06:16 PM, Rasesh Mody wrote:
> >>> Fix fast path array index which is used for passing L2 handles to
> >>> RSS indirection table. Currently, it is using the local copy of
> >>> indirection table. When the RX queue configuration changes the local
> >>> copy becomes invalid.
> >>>
> >>> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS
> >>> configuration")
> >>> Cc: stable@dpdk.org
> >>>
> >>> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> >>> ---
> >>>  drivers/net/qede/qede_ethdev.c |    2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/net/qede/qede_ethdev.c
> >>> b/drivers/net/qede/qede_ethdev.c index 3206cc6..6e9e76d 100644
> >>> --- a/drivers/net/qede/qede_ethdev.c
> >>> +++ b/drivers/net/qede/qede_ethdev.c
> >>> @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev
> >> *eth_dev,
> >>>  	vport_update_params.vport_id = 0;
> >>>  	/* pass the L2 handles instead of qids */
> >>>  	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
> >>> -		idx = qdev->rss_ind_table[i];
> >>> +		idx = ECORE_RSS_IND_TABLE_SIZE %
> >> QEDE_RSS_COUNT(qdev);
> >>>  		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq-
> handle;
> >>
> >> hi, idx never changes in the loop, so the same rxq handle is in every
> >> rss_ind_table entry - is it right?
> >
> > The idx depends on number of RXQs. If a single RXQ is configured then idx
> does not change in the loop,  in which case same RXQ handle is in every
> entry.
> 
> The value depends on number of Rxqs, but that value will not change for
> each of 128 iterations *regardless* of the number of Rxq's configured
> (assuming that will be static during the loop). Perhaps that's what you want,
> but it looks odd to be calculating the idx in each loop iteration when it won't
> change.

I see what you are saying, will send a revised patch, thanks.

> 
> idx = ECORE_RSS_IND_TABLE_SIZE % QEDE_RSS_COUNT(qdev)
> 
> =>
> 
> idx = 128 % qdev->num_rx_queues
> 
> >
> > Thanks!
> > -Rasesh
> >>
> >>>  	}
> >>>  	vport_update_params.rss_params = &rss_params;
> >>>
> >


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

* [dpdk-dev] [PATCH v2] net/qede: fix L2-handles used for RSS hash update
  2018-06-01 17:16 [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update Rasesh Mody
  2018-06-05 13:39 ` Kevin Traynor
@ 2018-06-05 23:03 ` Rasesh Mody
  2018-06-06 11:11   ` Kevin Traynor
  2018-06-06 18:40   ` Ferruh Yigit
  1 sibling, 2 replies; 8+ messages in thread
From: Rasesh Mody @ 2018-06-05 23:03 UTC (permalink / raw)
  To: dev; +Cc: Rasesh Mody, ktraynor, ferruh.yigit, Dept-EngDPDKDev, stable

Fix fast path array index which is used for passing L2 handles to RSS
indirection table, properly distribute rxq handles for indirection table.
Currently, it is using the local copy of indirection table. When the RX
queue configuration changes the local copy becomes invalid.

Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/qede/qede_ethdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3206cc6..5a4071b 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	vport_update_params.vport_id = 0;
 	/* pass the L2 handles instead of qids */
 	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
-		idx = qdev->rss_ind_table[i];
+		idx = i % QEDE_RSS_COUNT(qdev);
 		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;
 	}
 	vport_update_params.rss_params = &rss_params;
-- 
1.7.10.3

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

* Re: [dpdk-dev] [PATCH v2] net/qede: fix L2-handles used for RSS hash update
  2018-06-05 23:03 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
@ 2018-06-06 11:11   ` Kevin Traynor
  2018-06-06 18:40   ` Ferruh Yigit
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Traynor @ 2018-06-06 11:11 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: ferruh.yigit, Dept-EngDPDKDev, stable

On 06/06/2018 12:03 AM, Rasesh Mody wrote:
> Fix fast path array index which is used for passing L2 handles to RSS
> indirection table, properly distribute rxq handles for indirection table.
> Currently, it is using the local copy of indirection table. When the RX
> queue configuration changes the local copy becomes invalid.
> 
> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> Reviewed-by: Kevin Traynor <ktraynor@redhat.com>

LGTM

> ---
>  drivers/net/qede/qede_ethdev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index 3206cc6..5a4071b 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -2210,7 +2210,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
>  	vport_update_params.vport_id = 0;
>  	/* pass the L2 handles instead of qids */
>  	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
> -		idx = qdev->rss_ind_table[i];
> +		idx = i % QEDE_RSS_COUNT(qdev);
>  		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;
>  	}
>  	vport_update_params.rss_params = &rss_params;
> 

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

* Re: [dpdk-dev] [PATCH v2] net/qede: fix L2-handles used for RSS hash update
  2018-06-05 23:03 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
  2018-06-06 11:11   ` Kevin Traynor
@ 2018-06-06 18:40   ` Ferruh Yigit
  1 sibling, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2018-06-06 18:40 UTC (permalink / raw)
  To: Rasesh Mody, dev; +Cc: ktraynor, Dept-EngDPDKDev, stable

On 6/6/2018 12:03 AM, Rasesh Mody wrote:
> Fix fast path array index which is used for passing L2 handles to RSS
> indirection table, properly distribute rxq handles for indirection table.
> Currently, it is using the local copy of indirection table. When the RX
> queue configuration changes the local copy becomes invalid.
> 
> Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
> Reviewed-by: Kevin Traynor <ktraynor@redhat.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2018-06-06 18:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01 17:16 [dpdk-dev] [PATCH] net/qede: fix L2-handles used for RSS hash update Rasesh Mody
2018-06-05 13:39 ` Kevin Traynor
2018-06-05 16:16   ` Mody, Rasesh
2018-06-05 16:41     ` Kevin Traynor
2018-06-05 17:14       ` Mody, Rasesh
2018-06-05 23:03 ` [dpdk-dev] [PATCH v2] " Rasesh Mody
2018-06-06 11:11   ` Kevin Traynor
2018-06-06 18:40   ` Ferruh Yigit

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