net/mlx5e: meter, add mtu post meter tables
authorOz Shlomo <ozsh@nvidia.com>
Wed, 24 Aug 2022 12:45:43 +0000 (12:45 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 9 Dec 2022 00:10:55 +0000 (16:10 -0800)
commitd56713250a59aba48428345f80e1bff9dde897e1
treea2d9f42708884e87ec29d103bf92c6a17e680af3
parentfd6fa761466cef5279a399ca6f21d8f84d5b2332
net/mlx5e: meter, add mtu post meter tables

TC police action may configure the maximum packet size to be handled by
the policer, in addition to byte/packet rate.
MTU check is realized in hardware using the range destination, specifying
a hit ft, if packet len is in the range, or miss ft otherwise.

Instantiate mtu green/red flow tables with a single match-all rule.
Add the green/red actions to the hit/miss table accordingly.

Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
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