net/mlx5e: Add red and green counters for metering
authorRoi Dayan <roid@nvidia.com>
Tue, 19 Jul 2022 13:09:41 +0000 (16:09 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 28 Jul 2022 20:55:26 +0000 (13:55 -0700)
commitb50ce4350c107c96a6a3e481b5e07208f0d058bb
tree89e3c3ea4f224ad80b2cad2041e3f85e0f437f80
parente5b1db27410e5d625a49b57db133f0551e01dd56
net/mlx5e: Add red and green counters for metering

Add red and green counters per meter instance.
TC police action is implemented as a meter instance.
The meter counters represent the police action
notexceed/exceed counters.
TC rules using the same meter instance will use
the same counters.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.h
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c