[v2,2/2] net/mlx5: support new RSS symmetric hash function

Message ID 20230827081745.31906-2-xuemingl@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series ethdev: add new symmetric hash function |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Xueming Li Aug. 27, 2023, 8:17 a.m. UTC
  This patch supports the new RSS symmetric hash function:
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT

The new hash function makes symmetric hash result by swapping
the source and destination IP and L4 port automatically.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Ori Kam Oct. 29, 2023, 3:53 p.m. UTC | #1
> -----Original Message-----
> From: Xueming(Steven) Li <xuemingl@nvidia.com>
> Sent: Sunday, August 27, 2023 11:18 AM
> 
> This patch supports the new RSS symmetric hash function:
> RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT
> 
> The new hash function makes symmetric hash result by swapping
> the source and destination IP and L4 port automatically.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> ---


Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
  
Raslan Darawsheh Oct. 30, 2023, 5:08 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: Xueming Li <xuemingl@nvidia.com>
> Sent: Sunday, August 27, 2023 11:18 AM
> To: Ori Kam <orika@nvidia.com>
> Cc: Xueming(Steven) Li <xuemingl@nvidia.com>; dev@dpdk.org;
> fengchengwen@huawei.com; Ivan Malov <ivan.malov@arknetworks.am>
> Subject: [PATCH v2 2/2] net/mlx5: support new RSS symmetric hash function
> 
> This patch supports the new RSS symmetric hash function:
> RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT
> 
> The new hash function makes symmetric hash result by swapping the source
> and destination IP and L4 port automatically.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 3a97975d69..e162baa7da 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1456,8 +1456,8 @@  struct rte_flow_template_table {
 #define MLX5_RSS_HASH_NONE 0ULL
 
 #define MLX5_RSS_IS_SYMM(func) \
-		((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)
-
+		(((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) || \
+		 ((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT))
 
 /* extract next protocol type from Ethernet & VLAN headers */
 #define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \