Blame SOURCES/0241-netdrv-net-mlx5-E-Switch-Add-support-for-offloading-.patch

d8f823
From bf0023a9b4c8fea261dfcf28876ef882eff650ca Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Tue, 19 May 2020 07:49:03 -0400
d8f823
Subject: [PATCH 241/312] [netdrv] net/mlx5: E-Switch, Add support for
d8f823
 offloading rules with no in_port
d8f823
d8f823
Message-id: <20200519074934.6303-33-ahleihel@redhat.com>
d8f823
Patchwork-id: 310533
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1663246 32/63] net/mlx5: E-Switch, Add support for offloading rules with no in_port
d8f823
Bugzilla: 1790219 1663246
d8f823
RH-Acked-by: Marcelo Leitner <mleitner@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
RH-Acked-by: John Linville <linville@redhat.com>
d8f823
RH-Acked-by: Ivan Vecera <ivecera@redhat.com>
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1663246
d8f823
Bugzilla: http://bugzilla.redhat.com/1790219
d8f823
Upstream: v5.7-rc1
d8f823
d8f823
commit 6fb0701a9cfa248f1c1e5dfde15c4d79bb1bdc69
d8f823
Author: Paul Blakey <paulb@mellanox.com>
d8f823
Date:   Thu Mar 12 12:23:11 2020 +0200
d8f823
d8f823
    net/mlx5: E-Switch, Add support for offloading rules with no in_port
d8f823
d8f823
    FTEs in global tables may match on packets from multiple in_ports.
d8f823
    Provide the capability to omit the in_port match condition.
d8f823
d8f823
    Signed-off-by: Paul Blakey <paulb@mellanox.com>
d8f823
    Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
d8f823
    Signed-off-by: David S. Miller <davem@davemloft.net>
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/eswitch.h          | 1 +
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 +++-
d8f823
 2 files changed, 4 insertions(+), 1 deletion(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
d8f823
index e7de5e8e5605..ecf3d7157d4d 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
d8f823
@@ -428,6 +428,7 @@ enum {
d8f823
 enum {
d8f823
 	MLX5_ESW_ATTR_FLAG_VLAN_HANDLED  = BIT(0),
d8f823
 	MLX5_ESW_ATTR_FLAG_SLOW_PATH     = BIT(1),
d8f823
+	MLX5_ESW_ATTR_FLAG_NO_IN_PORT    = BIT(2),
d8f823
 };
d8f823
 
d8f823
 struct mlx5_esw_flow_attr {
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
d8f823
index e8d9a0bd943a..3a6434ba2a58 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
d8f823
@@ -388,7 +388,9 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
d8f823
 							attr->prio, 0);
d8f823
 		else
d8f823
 			fdb = attr->fdb;
d8f823
-		mlx5_eswitch_set_rule_source_port(esw, spec, attr);
d8f823
+
d8f823
+		if (!(attr->flags & MLX5_ESW_ATTR_FLAG_NO_IN_PORT))
d8f823
+			mlx5_eswitch_set_rule_source_port(esw, spec, attr);
d8f823
 	}
d8f823
 	if (IS_ERR(fdb)) {
d8f823
 		rule = ERR_CAST(fdb);
d8f823
-- 
d8f823
2.13.6
d8f823