net/mlx5e: Refactor mlx5e_rss_init() and mlx5e_rss_free() API's
authorAdham Faris <afaris@nvidia.com>
Thu, 12 Oct 2023 19:27:47 +0000 (12:27 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 14 Oct 2023 17:16:32 +0000 (10:16 -0700)
commit0d806cf9c007469e38594322bc39f25da8c5f7d7
treedc669dbadd633c273643d36531b6ab787b8ef2f7
parentcae8e6dea279230387d00ccb8c682e6a80ea1989
net/mlx5e: Refactor mlx5e_rss_init() and mlx5e_rss_free() API's

Introduce code refactoring below:
1) Introduce single API for creating and destroying rss object,
   mlx5e_rss_create() and mlx5e_rss_destroy() respectively.
2) mlx5e_rss_create() constructs and initializes RSS object depends
   on a function new param enum mlx5e_rss_create_type. Callers (like
   rx_res.c) will no longer need to allocate RSS object via
   mlx5e_rss_alloc() and initialize it immediately via
   mlx5e_rss_init_no_tirs() or mlx5e_rss_init(), this will be done by
   a single call to mlx5e_rss_create(). Hence, mlx5e_rss_alloc() and
   mlx5e_rss_init_no_tirs() have been removed from rss.h file and became
   static functions.

Signed-off-by: Adham Faris <afaris@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rss.c
drivers/net/ethernet/mellanox/mlx5/core/en/rss.h
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c