]> 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)
commit50ea2886f59f6c242a8944eb9274e2430d84023c
tree8e2d2c734af2150de04d3c45d7785caf688b15fa
parentd86f08fd0f9fb1ce66c54b066b8bd8baba45d1df
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