diff options
author | Oz Shlomo <ozsh@nvidia.com> | 2022-11-02 17:36:51 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-12-09 03:10:55 +0300 |
commit | 6fda078d5f7521cf02f493b62d9d87abda3cb890 (patch) | |
tree | a8a9d73121a66f5553d037235fabbd309c4022c4 /drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c | |
parent | d56713250a59aba48428345f80e1bff9dde897e1 (diff) | |
download | linux-6fda078d5f7521cf02f493b62d9d87abda3cb890.tar.xz |
net/mlx5e: TC, add support for meter mtu offload
Initialize the meter object with the TC police mtu parameter.
Use the hardware range destination to compare the pkt len to the mtu setting.
Assign the range destination hit/miss ft to the police conform/exceed
attributes.
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c index ffed3af7d01e..8d7d761482d2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_meter.c @@ -43,6 +43,18 @@ mlx5e_post_meter_get_ft(struct mlx5e_post_meter_priv *post_meter) return post_meter->rate_steering_table.ft; } +struct mlx5_flow_table * +mlx5e_post_meter_get_mtu_true_ft(struct mlx5e_post_meter_priv *post_meter) +{ + return post_meter->mtu_tables.green_table.ft; +} + +struct mlx5_flow_table * +mlx5e_post_meter_get_mtu_false_ft(struct mlx5e_post_meter_priv *post_meter) +{ + return post_meter->mtu_tables.red_table.ft; +} + static struct mlx5_flow_table * mlx5e_post_meter_table_create(struct mlx5e_priv *priv, enum mlx5_flow_namespace_type ns_type) |