[1/5] net/mlx5: fix unused calculation in RSS expansion

Message ID 1605080208-12165-1-git-send-email-michaelba@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series [1/5] net/mlx5: fix unused calculation in RSS expansion |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michael Baum Nov. 11, 2020, 7:36 a.m. UTC
  The RSS flow expansion get a memory buffer to fill the new patterns of
the expanded flows.
This memory management saves the next address to write into the buffer
in a dedicated variable.

The calculation for the next address was wrongly also done when all the
patterns were ready.

Remove it.

Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Thomas Monjalon Nov. 13, 2020, 10:26 p.m. UTC | #1
11/11/2020 08:36, Michael Baum:
> The RSS flow expansion get a memory buffer to fill the new patterns of
> the expanded flows.
> This memory management saves the next address to write into the buffer
> in a dedicated variable.
> 
> The calculation for the next address was wrongly also done when all the
> patterns were ready.
> 
> Remove it.
> 
> Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Series applied in next-net-mlx, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 92adfca..ebd79c6 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -377,8 +377,6 @@  struct mlx5_flow_expand_rss {
 				   user_pattern_size);
 			addr = (void *)(((uintptr_t)addr) + user_pattern_size);
 			rte_memcpy(addr, flow_items, elt * sizeof(*item));
-			addr = (void *)(((uintptr_t)addr) +
-					elt * sizeof(*item));
 		}
 	}
 	return lsize;