OSDN Git Service

net/mlx5e: Refactor reg_c1 usage
authorVlad Buslov <vladbu@nvidia.com>
Mon, 31 Aug 2020 13:18:19 +0000 (16:18 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 6 Feb 2021 04:53:37 +0000 (20:53 -0800)
commit48d216e5596a58e3cfa6d4548343f982c5921b79
tree891f6a7f9954b5478bd0b99b081755268efc1aad
parenta508728a4c8bfaf15839d5b23c19bf6b9908d43d
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>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h
include/linux/mlx5/eswitch.h