]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off
authorMaor Dickman <maord@nvidia.com>
Thu, 4 Aug 2022 12:28:42 +0000 (15:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:18:04 +0000 (17:18 +0200)
commiteaa08e3c5abd1701c888438ae07d8edbce077642
tree7c77df438c5c0368c94cfa7a7a53b12ebbc3edc2
parent160967199c5ee01b72d6769815bcdf624c3f45fb
net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off

[ Upstream commit 550f96432e6f6770efdaee0e65239d61431062a1 ]

The cited commit reintroduced the ability to set hw-tc-offload
in switchdev mode by reusing NIC mode calls without modifying it
to support both modes, this can cause an illegal memory access
when trying to turn hw-tc-offload off.

Fix this by using the right TC_FLAG when checking if tc rules
are installed while disabling hw-tc-offload.

Fixes: d3cbd4254df8 ("net/mlx5e: Add ndo_set_feature for uplink representor")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c