Blame SOURCES/0150-netdrv-net-mlx5-IPsec-Fix-esp-modify-function-attrib.patch

d8f823
From 061a619728519c89cd3009d87289e129f4382c3e Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Tue, 12 May 2020 10:54:13 -0400
d8f823
Subject: [PATCH 150/312] [netdrv] net/mlx5: IPsec, Fix esp modify function
d8f823
 attribute
d8f823
d8f823
Message-id: <20200512105530.4207-48-ahleihel@redhat.com>
d8f823
Patchwork-id: 306919
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789382 047/124] net/mlx5: IPsec, Fix esp modify function attribute
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.6-rc1
d8f823
d8f823
commit 0dc2c534f17c05bed0622b37a744bc38b48ca88a
d8f823
Author: Raed Salem <raeds@mellanox.com>
d8f823
Date:   Tue Dec 24 09:54:45 2019 +0200
d8f823
d8f823
    net/mlx5: IPsec, Fix esp modify function attribute
d8f823
d8f823
    The function mlx5_fpga_esp_validate_xfrm_attrs is wrongly used
d8f823
    with negative negation as zero value indicates success but it
d8f823
    used as failure return value instead.
d8f823
d8f823
    Fix by remove the unary not negation operator.
d8f823
d8f823
    Fixes: 05564d0ae075 ("net/mlx5: Add flow-steering commands for FPGA IPSec implementation")
d8f823
    Signed-off-by: Raed Salem <raeds@mellanox.com>
d8f823
    Reviewed-by: Boris Pismenny <borisp@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/fpga/ipsec.c | 2 +-
d8f823
 1 file changed, 1 insertion(+), 1 deletion(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
d8f823
index e4ec0e03c289..4ed4d4d8e073 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
d8f823
@@ -1478,7 +1478,7 @@ int mlx5_fpga_esp_modify_xfrm(struct mlx5_accel_esp_xfrm *xfrm,
d8f823
 	if (!memcmp(&xfrm->attrs, attrs, sizeof(xfrm->attrs)))
d8f823
 		return 0;
d8f823
 
d8f823
-	if (!mlx5_fpga_esp_validate_xfrm_attrs(mdev, attrs)) {
d8f823
+	if (mlx5_fpga_esp_validate_xfrm_attrs(mdev, attrs)) {
d8f823
 		mlx5_core_warn(mdev, "Tried to create an esp with unsupported attrs\n");
d8f823
 		return -EOPNOTSUPP;
d8f823
 	}
d8f823
-- 
d8f823
2.13.6
d8f823