summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@nvidia.com>2021-07-04 15:16:21 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-10-18 20:18:07 -0700
commit4c71ce50d2fe7f1b142113ffa412c9ed6677d52c (patch)
tree967c7c7d18c50c042c7e7ef5bf7b194f683b9a52 /drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
parent939a6567f976efb8b3e6d601ce35eb56b17babd0 (diff)
downloadlinux-4c71ce50d2fe7f1b142113ffa412c9ed6677d52c.tar.gz
linux-4c71ce50d2fe7f1b142113ffa412c9ed6677d52c.tar.bz2
linux-4c71ce50d2fe7f1b142113ffa412c9ed6677d52c.zip
net/mlx5: Support partial TTC rules
Add bitmasks to ttc_params to indicate if rule is valid or not. It will allow to create TTC table with support only in part of the traffic types. In later patches which introduce the steering based LAG port selection, TTC will be created with only part of the rules according to the hash type. Signed-off-by: Maor Gottlieb <maorg@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
index 749d17c0057d..b63dec24747a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
@@ -247,6 +247,8 @@ static int mlx5_generate_ttc_table_rules(struct mlx5_core_dev *dev,
for (tt = 0; tt < MLX5_NUM_TT; tt++) {
struct mlx5_ttc_rule *rule = &rules[tt];
+ if (test_bit(tt, params->ignore_dests))
+ continue;
rule->rule = mlx5_generate_ttc_rule(dev, ft, &params->dests[tt],
ttc_rules[tt].etype,
ttc_rules[tt].proto);
@@ -266,6 +268,8 @@ static int mlx5_generate_ttc_table_rules(struct mlx5_core_dev *dev,
if (!mlx5_tunnel_proto_supported_rx(dev,
ttc_tunnel_rules[tt].proto))
continue;
+ if (test_bit(tt, params->ignore_tunnel_dests))
+ continue;
trules[tt] = mlx5_generate_ttc_rule(dev, ft,
&params->tunnel_dests[tt],
ttc_tunnel_rules[tt].etype,