Blame SOURCES/0187-netdrv-net-mlx5-Fix-group-version-management.patch

d8f823
From d0b7b0101b6234149651940453cb568c716f9e3c Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Tue, 12 May 2020 10:54:59 -0400
d8f823
Subject: [PATCH 187/312] [netdrv] net/mlx5: Fix group version management
d8f823
d8f823
Message-id: <20200512105530.4207-94-ahleihel@redhat.com>
d8f823
Patchwork-id: 306966
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789382 093/124] net/mlx5: Fix group version management
d8f823
Bugzilla: 1789382
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1789382
d8f823
Upstream: v5.7-rc1
d8f823
d8f823
commit 454401aeb2957e0d996bc9208b78aa4d8ac12964
d8f823
Author: Eli Cohen <eli@mellanox.com>
d8f823
Date:   Wed Mar 4 10:32:56 2020 +0200
d8f823
d8f823
    net/mlx5: Fix group version management
d8f823
d8f823
    When adding a rule to a flow group we need increment the version of the
d8f823
    group. Current code fails to do that and as a result, when trying to add
d8f823
    a rule, we will fail to discover a case where an FTE with the same match
d8f823
    value was added while we scanned the groups of the same match criteria,
d8f823
    thus we may try to add an FTE that was already added.
d8f823
d8f823
    Signed-off-by: Eli Cohen <eli@mellanox.com>
d8f823
    Reviewed-by: Mark Bloch <markb@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 +
d8f823
 1 file changed, 1 insertion(+)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
d8f823
index 4c7c707f9e2d..7cc21f08cbcc 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
d8f823
@@ -1342,6 +1342,7 @@ add_rule_fte(struct fs_fte *fte,
d8f823
 	fte->node.active = true;
d8f823
 	fte->status |= FS_FTE_STATUS_EXISTING;
d8f823
 	atomic_inc(&fte->node.version);
d8f823
+	atomic_inc(&fg->node.version);
d8f823
 
d8f823
 out:
d8f823
 	return handle;
d8f823
-- 
d8f823
2.13.6
d8f823