]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add post meter table for flow metering
authorJianbo Liu <jianbol@nvidia.com>
Fri, 18 Jun 2021 06:47:15 +0000 (06:47 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Jul 2022 18:58:29 +0000 (11:58 -0700)
commit91aa025df4df331a4eae841b8f8e8081a8cd8261
tree8e2d2c734af2150de04d3c45d7785caf688b15fa
parent0eeb69c1241241f0b6d6a7dedb6413c004057900
net/mlx5e: Add post meter table for flow metering

Flow meter object monitors the packets rate for the flows it is
attached to, and color packets with GREEN or RED. The post meter table
is used to check the color. Packet is dropped if it's RED, or
forwarded to post_act table if GREEN.

Packet color will be set to 8 LSB of the register C5, so they are
reserved for metering, which are previously used for matching fte id.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en/tc/meter.c
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.h [new file with mode: 0644]
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