From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH net 5/6] net/mlx5: E-Switch, Set the actions for offloaded rules properly
Date: Fri, 4 Nov 2016 01:48:46 +0200 [thread overview]
Message-ID: <1478216927-31328-6-git-send-email-saeedm@mellanox.com> (raw)
In-Reply-To: <1478216927-31328-1-git-send-email-saeedm@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
As for the current generation of the mlx5 HW (CX4/CX4-Lx) per flow vlan
push/pop actions are emulated, we must not program them to the firmware.
Fixes: f5f82476090f ('net/mlx5: E-Switch, Support VLAN actions in the offloads mode')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index c55ad8d..d239f5d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -57,7 +57,8 @@ mlx5_eswitch_add_offloaded_rule(struct mlx5_eswitch *esw,
if (esw->mode != SRIOV_OFFLOADS)
return ERR_PTR(-EOPNOTSUPP);
- action = attr->action;
+ /* per flow vlan pop/push is emulated, don't set that into the firmware */
+ action = attr->action & ~(MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH | MLX5_FLOW_CONTEXT_ACTION_VLAN_POP);
if (action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST) {
dest.type = MLX5_FLOW_DESTINATION_TYPE_VPORT;
--
2.7.4
next prev parent reply other threads:[~2016-11-03 23:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 23:48 [PATCH net 0/6] Mellanox 100G mlx5 fixes 2016-11-04 Saeed Mahameed
2016-11-03 23:48 ` [PATCH net 1/6] net/mlx5e: Fix XDP error path of mlx5e_open_channel() Saeed Mahameed
2016-11-03 23:48 ` [PATCH net 2/6] net/mlx5e: Re-arrange XDP SQ/CQ creation Saeed Mahameed
2016-11-03 23:48 ` [PATCH net 3/6] net/mlx5e: Disallow changing name-space for VF representors Saeed Mahameed
2016-11-03 23:48 ` [PATCH net 4/6] net/mlx5e: Handle matching on vlan priority for offloaded TC rules Saeed Mahameed
2016-11-03 23:48 ` Saeed Mahameed [this message]
2016-11-03 23:48 ` [PATCH net 6/6] net/mlx5: Fix invalid pointer reference when prof_sel parameter is invalid Saeed Mahameed
2016-11-04 19:00 ` [PATCH net 0/6] Mellanox 100G mlx5 fixes 2016-11-04 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478216927-31328-6-git-send-email-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox