]> git.baikalelectronics.ru Git - kernel.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)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 22 Aug 2022 19:57:09 +0000 (12:57 -0700)
commit018deb6f3765a3fd365d34139c4501db78c4a43b
treef938a3e97674ef398b11093e8c333e7388a1b964
parente2c5c696b48e56d41b72af4e868249e4a593a1ff
net/mlx5e: Fix wrong tc flag used when set hw-tc-offload off

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: 505f57b89277 ("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>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c