aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@nvidia.com>2020-08-31 16:18:19 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-02-05 20:53:37 -0800
commit48d216e5596a58e3cfa6d4548343f982c5921b79 (patch)
tree891f6a7f9954b5478bd0b99b081755268efc1aad /drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
parentnet/mlx5e: VF tunnel RX traffic offloading (diff)
downloadlinux-dev-48d216e5596a58e3cfa6d4548343f982c5921b79.tar.xz
linux-dev-48d216e5596a58e3cfa6d4548343f982c5921b79.zip
net/mlx5e: Refactor reg_c1 usage
Following patch in series uses reg_c1 in eswitch code. To use reg_c1 helpers in both TC and eswitch code, refactor existing helpers according to similar use case of reg_c0 and move the functionality into eswitch.h. Calculate reg mappings length from new defines to ensure that they are always in sync and only need to be changed in single place. Signed-off-by: Vlad Buslov <vladbu@nvidia.com> Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_tc.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
index ee0029192504..1e4ee02bfb1c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
@@ -302,7 +302,7 @@ static inline bool mlx5e_cqe_regb_chain(struct mlx5_cqe64 *cqe)
reg_b = be32_to_cpu(cqe->ft_metadata);
- if (reg_b >> (MLX5E_TC_TABLE_CHAIN_TAG_BITS + ZONE_RESTORE_BITS))
+ if (reg_b >> (MLX5E_TC_TABLE_CHAIN_TAG_BITS + ESW_ZONE_ID_BITS))
return false;
chain = reg_b & MLX5E_TC_TABLE_CHAIN_TAG_MASK;