From: Jianbo Liu Date: Thu, 3 Nov 2022 06:55:45 +0000 (-0700) Subject: net/mlx5e: TC, Fix wrong rejection of packet-per-second policing X-Git-Tag: v6.0.9~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=699d2d425b574fac89c40be2c7cbc0c38db1b652;p=thirdparty%2Fkernel%2Fstable.git net/mlx5e: TC, Fix wrong rejection of packet-per-second policing [ Upstream commit 9e06430841363a1d2932d546fdce1cc5edb3c2a0 ] In the bellow commit, we added support for PPS policing without removing the check which block offload of such cases. Fix it by removing this check. Fixes: a8d52b024d6d ("net/mlx5e: TC, Support offloading police action") Signed-off-by: Jianbo Liu Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index a687f047e3aeb..229c14b1af004 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -4739,12 +4739,6 @@ int mlx5e_policer_validate(const struct flow_action *action, return -EOPNOTSUPP; } - if (act->police.rate_pkt_ps) { - NL_SET_ERR_MSG_MOD(extack, - "QoS offload not support packets per second"); - return -EOPNOTSUPP; - } - return 0; }