-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5e: Move management of indir traffic types to rx_res
This commit moves the responsibility of keeping the RSS configuration for different traffic types to en/rx_res.{c,h}, hiding the implementation details behind the new getters, and abandons all usage of struct mlx5e_tirc_config, which is no longer useful and superseded by struct mlx5e_rss_params_traffic_type. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
- Loading branch information
Maxim Mikityanskiy
authored and
Saeed Mahameed
committed
Jul 26, 2021
1 parent
a669673
commit 65d6b6e
Showing
7 changed files
with
87 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB | ||
/* Copyright (c) 2021, Mellanox Technologies inc. All rights reserved. */ | ||
|
||
#include "rx_res.h" | ||
|
||
static const struct mlx5e_rss_params_traffic_type rss_default_config[MLX5E_NUM_INDIR_TIRS] = { | ||
[MLX5E_TT_IPV4_TCP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV4, | ||
.l4_prot_type = MLX5_L4_PROT_TYPE_TCP, | ||
.rx_hash_fields = MLX5_HASH_IP_L4PORTS, | ||
}, | ||
[MLX5E_TT_IPV6_TCP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV6, | ||
.l4_prot_type = MLX5_L4_PROT_TYPE_TCP, | ||
.rx_hash_fields = MLX5_HASH_IP_L4PORTS, | ||
}, | ||
[MLX5E_TT_IPV4_UDP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV4, | ||
.l4_prot_type = MLX5_L4_PROT_TYPE_UDP, | ||
.rx_hash_fields = MLX5_HASH_IP_L4PORTS, | ||
}, | ||
[MLX5E_TT_IPV6_UDP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV6, | ||
.l4_prot_type = MLX5_L4_PROT_TYPE_UDP, | ||
.rx_hash_fields = MLX5_HASH_IP_L4PORTS, | ||
}, | ||
[MLX5E_TT_IPV4_IPSEC_AH] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV4, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP_IPSEC_SPI, | ||
}, | ||
[MLX5E_TT_IPV6_IPSEC_AH] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV6, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP_IPSEC_SPI, | ||
}, | ||
[MLX5E_TT_IPV4_IPSEC_ESP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV4, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP_IPSEC_SPI, | ||
}, | ||
[MLX5E_TT_IPV6_IPSEC_ESP] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV6, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP_IPSEC_SPI, | ||
}, | ||
[MLX5E_TT_IPV4] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV4, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP, | ||
}, | ||
[MLX5E_TT_IPV6] = { | ||
.l3_prot_type = MLX5_L3_PROT_TYPE_IPV6, | ||
.l4_prot_type = 0, | ||
.rx_hash_fields = MLX5_HASH_IP, | ||
}, | ||
}; | ||
|
||
struct mlx5e_rss_params_traffic_type | ||
mlx5e_rss_get_default_tt_config(enum mlx5e_traffic_types tt) | ||
{ | ||
return rss_default_config[tt]; | ||
} | ||
|
||
struct mlx5e_rss_params_traffic_type | ||
mlx5e_rx_res_rss_get_current_tt_config(struct mlx5e_rx_res *res, enum mlx5e_traffic_types tt) | ||
{ | ||
struct mlx5e_rss_params_traffic_type rss_tt; | ||
|
||
rss_tt = mlx5e_rss_get_default_tt_config(tt); | ||
rss_tt.rx_hash_fields = res->rss_params.rx_hash_fields[tt]; | ||
return rss_tt; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters