From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Saeed Mahameed <saeedm@mellanox.com>,
Maor Gottlieb <maorg@mellanox.com>
Subject: [net 6/7] net/mlx5e: Fix traffic duplication in ethtool steering
Date: Tue, 24 Sep 2019 09:41:41 +0000 [thread overview]
Message-ID: <20190924094047.15915-7-saeedm@mellanox.com> (raw)
In-Reply-To: <20190924094047.15915-1-saeedm@mellanox.com>
Before this patch, when adding multiple ethtool steering rules with
identical classification, the driver used to append the new destination
to the already existing hw rule, which caused the hw to forward the
traffic to all destinations (rx queues).
Here we avoid this by setting the "no append" mlx5 fs core flag when
adding a new ethtool rule.
Fixes: 6dc6071cfcde ("net/mlx5e: Add ethtool flow steering support")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
index eed7101e8bb7..acd946f2ddbe 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
@@ -399,10 +399,10 @@ add_ethtool_flow_rule(struct mlx5e_priv *priv,
struct mlx5_flow_table *ft,
struct ethtool_rx_flow_spec *fs)
{
+ struct mlx5_flow_act flow_act = { .flags = FLOW_ACT_NO_APPEND };
struct mlx5_flow_destination *dst = NULL;
- struct mlx5_flow_act flow_act = {0};
- struct mlx5_flow_spec *spec;
struct mlx5_flow_handle *rule;
+ struct mlx5_flow_spec *spec;
int err = 0;
spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
--
2.21.0
next prev parent reply other threads:[~2019-09-24 9:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 9:41 [pull request][net 0/7] Mellanox, mlx5 fixes 2019-09-24 Saeed Mahameed
2019-09-24 9:41 ` [net 1/7] net/mlx5: DR, Fix SW steering HW bits and definitions Saeed Mahameed
2019-09-24 9:41 ` [net 2/7] net/mlx5: DR, Remove redundant vport number from action Saeed Mahameed
2019-09-24 9:41 ` [net 3/7] net/mlx5: DR, Fix getting incorrect prev node in ste_free Saeed Mahameed
2019-09-24 9:41 ` [net 4/7] net/mlx5: DR, Allow matching on vport based on vhca_id Saeed Mahameed
2019-09-24 9:41 ` [net 5/7] net/mlx5: Add device ID of upcoming BlueField-2 Saeed Mahameed
2019-09-24 9:41 ` Saeed Mahameed [this message]
2019-09-24 9:41 ` [net 7/7] net/mlx5e: Fix matching on tunnel addresses type Saeed Mahameed
2019-09-24 9:51 ` [pull request][net 0/7] Mellanox, mlx5 fixes 2019-09-24 Saeed Mahameed
2019-09-26 7:16 ` 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=20190924094047.15915-7-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=maorg@mellanox.com \
--cc=netdev@vger.kernel.org \
/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