[dpdk-dev,v2] net/qede: fix L2-handles used for RSS hash update

Message ID 1528239837-6424-1-git-send-email-rasesh.mody@cavium.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Mody, Rasesh June 5, 2018, 11:03 p.m. UTC
  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(-)
  

Comments

Kevin Traynor June 6, 2018, 11:11 a.m. UTC | #1
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;
>
  
Ferruh Yigit June 6, 2018, 6:40 p.m. UTC | #2
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.
  

Patch

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;