summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
diff options
context:
space:
mode:
authorPaul Blakey <paulb@mellanox.com>2020-03-12 12:23:11 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-12 15:00:39 -0700
commit6fb0701a9cfa248f1c1e5dfde15c4d79bb1bdc69 (patch)
tree2b8de4e8c579d59503985af6682d8988aa6521ae /drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
parentd18296ffd9ccde82c82c220263fca2e76d5258be (diff)
downloadlinux-6fb0701a9cfa248f1c1e5dfde15c4d79bb1bdc69.tar.bz2
net/mlx5: E-Switch, Add support for offloading rules with no in_port
FTEs in global tables may match on packets from multiple in_ports. Provide the capability to omit the in_port match condition. Signed-off-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Oz Shlomo <ozsh@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 0c4bf69f6c47..c36185eb5fbb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -388,7 +388,9 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
attr->prio, 0);
else
fdb = attr->fdb;
- mlx5_eswitch_set_rule_source_port(esw, spec, attr);
+
+ if (!(attr->flags & MLX5_ESW_ATTR_FLAG_NO_IN_PORT))
+ mlx5_eswitch_set_rule_source_port(esw, spec, attr);
}
if (IS_ERR(fdb)) {
rule = ERR_CAST(fdb);