net/cnxk: update RSS RETA table

Message ID 20220224083528.3000787-1-rkudurumalla@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series net/cnxk: update RSS RETA table |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Rakesh Kudurumalla Feb. 24, 2022, 8:35 a.m. UTC
  rss reta table is corrupted during
rte_eth_dev_rss_reta_update.This fix restores
previous table entries before updating.

Fixes: 00242a687de ("net/cnxk: support RETA and RSS hash")
Cc: stable@dpdk.org

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Jerin Jacob Feb. 24, 2022, 1:42 p.m. UTC | #1
On Thu, Feb 24, 2022 at 2:05 PM Rakesh Kudurumalla
<rkudurumalla@marvell.com> wrote:
>
> rss reta table is corrupted during
> rte_eth_dev_rss_reta_update.This fix restores
> previous table entries before updating.
>
> Fixes: 00242a687de ("net/cnxk: support RETA and RSS hash")
> Cc: stable@dpdk.org
>
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks

    net/cnxk: fix RSS RETA table update

    RSS reta table is corrupted during rte_eth_dev_rss_reta_update().
    Fix it by restoring previous table entries before updating.

    Fixes: 00242a687de ("net/cnxk: support RETA and RSS hash")
    Cc: stable@dpdk.org

    Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
    Acked-by: Jerin Jacob <jerinj@marvell.com>

> ---
>  drivers/net/cnxk/cnxk_ethdev_ops.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
> index b0a16f3c56..f4a0562475 100644
> --- a/drivers/net/cnxk/cnxk_ethdev_ops.c
> +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
> @@ -857,6 +857,8 @@ cnxk_nix_reta_update(struct rte_eth_dev *eth_dev,
>                 goto fail;
>         }
>
> +       roc_nix_rss_reta_get(nix, 0, reta);
> +
>         /* Copy RETA table */
>         for (i = 0; i < (int)(dev->nix.reta_sz / RTE_ETH_RETA_GROUP_SIZE); i++) {
>                 for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
> --
> 2.25.1
>
  

Patch

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index b0a16f3c56..f4a0562475 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -857,6 +857,8 @@  cnxk_nix_reta_update(struct rte_eth_dev *eth_dev,
 		goto fail;
 	}
 
+	roc_nix_rss_reta_get(nix, 0, reta);
+
 	/* Copy RETA table */
 	for (i = 0; i < (int)(dev->nix.reta_sz / RTE_ETH_RETA_GROUP_SIZE); i++) {
 		for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {