]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Properly deal with flow counters when deleting rules
authorChris Mi <chrism@mellanox.com>
Mon, 16 Apr 2018 01:36:51 +0000 (10:36 +0900)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Apr 2018 19:43:21 +0000 (12:43 -0700)
commite8ca493e7d7c6a75d40df628fe460ce4717d7dff
tree16f437a48149487709b9668ced08e8eaa7ca69f6
parenta9f096fc3f7ca8e000af26605e6d7e122e0f7521
net/mlx5: Properly deal with flow counters when deleting rules

When deleting a flow counter, the modify mask should be the action and
the flow counter. Otherwise the flow counter is not deleted and we'll
get a firmware warning when deleting the remaining destinations on the
same FTE.

It only happens in the presence of flow counter and multiple vport
destinations. If there is only one vport destination, there is no
need to update the FTE when deleting the only vport destination,
we just delete the FTE.

Fixes: f7271eb4849e ("net/mlx5: Add option to add fwd rule with counter")
Signed-off-by: Chris Mi <chrism@mellanox.com>
Signed-off-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c