]> 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)
commite2be445c5d980d25c87e7e251a45c5f5277234d7
treec0f36c0a76833d0bc7d135ca9a4dd770ae20dd31
parenta11c6d3146623bd2100b4b756328381d5150234d
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: 0a4e504ef574 ('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