]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Fix matcher disconnect error flow
authorRongwei Liu <rongweil@nvidia.com>
Wed, 26 Oct 2022 13:51:41 +0000 (14:51 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 18:06:50 +0000 (11:06 -0700)
commitb03f4d396fef538a68eaba263f67cb36eed5e280
treeafaea6003f34e6214f62db880c095c2116a47c21
parent2083c9f9d0669fd0b0fcc54c41a3086950a867f4
net/mlx5: DR, Fix matcher disconnect error flow

When 2nd flow rules arrives, it will merge together with the
1st one if matcher criteria is the same.

If merge fails, driver will rollback the merge contents, and
reject the 2nd rule. At rollback stage, matcher can't be
disconnected unconditionally, otherise the 1st rule can't be
hit anymore.

Add logic to check if the matcher should be disconnected or not.

Fixes: a27d0e9c74a0 ("net/mlx5: DR, Improve steering for empty or RX/TX-only matchers")
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221026135153.154807-4-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c