]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Avoid wrong identification of rules on deletion
authorOr Gerlitz <ogerlitz@mellanox.com>
Fri, 10 Mar 2017 12:33:04 +0000 (14:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 18:03:26 +0000 (10:03 -0800)
commit686329fd101a053e0784c4403a6bd58abd480b56
treec0f36c0a76833d0bc7d135ca9a4dd770ae20dd31
parent285baf0cc4c12a028725a764f69e137f324fe473
net/mlx5e: Avoid wrong identification of rules on deletion

When deleting offloaded TC flows, we must correctly identify E-switch
rules. The current check could get us wrong w.r.t to rules set on the
PF. Since it's possible to set NIC rules on the PF, switch to SRIOV
offloads mode and then attempt to delete a NIC rule.

To solve that, we add a flags field to offloaded rules, set it on
creation time and use that over the code where currently needed.

Fixes: a4b8a6b1ea97 ('net/mlx5e: Add TC vlan action for SRIOV offloads')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c