From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eli Britstein <elibr@mellanox.com>, Roi Dayan <roid@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 07/11] net/mlx5e: Fix number of vports for ingress ACL configuration
Date: Fri, 17 May 2019 20:19:53 +0000 [thread overview]
Message-ID: <20190517201910.32216-8-saeedm@mellanox.com> (raw)
In-Reply-To: <20190517201910.32216-1-saeedm@mellanox.com>
From: Eli Britstein <elibr@mellanox.com>
With the cited commit, ACLs are configured for the VF ports. The loop
for the number of ports had the wrong number. Fix it.
Fixes: 184867373d8c ("net/mlx5e: ACLs for priority tag mode")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
.../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 2060456ddcd0..47b446d30f71 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1732,13 +1732,14 @@ static void esw_prio_tag_acls_cleanup(struct mlx5_eswitch *esw)
struct mlx5_vport *vport;
int i;
- mlx5_esw_for_each_vf_vport(esw, i, vport, esw->nvports) {
+ mlx5_esw_for_each_vf_vport(esw, i, vport, esw->dev->priv.sriov.num_vfs) {
esw_vport_disable_egress_acl(esw, vport);
esw_vport_disable_ingress_acl(esw, vport);
}
}
-static int esw_offloads_steering_init(struct mlx5_eswitch *esw, int nvports)
+static int esw_offloads_steering_init(struct mlx5_eswitch *esw, int vf_nvports,
+ int nvports)
{
int err;
@@ -1746,7 +1747,7 @@ static int esw_offloads_steering_init(struct mlx5_eswitch *esw, int nvports)
mutex_init(&esw->fdb_table.offloads.fdb_prio_lock);
if (MLX5_CAP_GEN(esw->dev, prio_tag_required)) {
- err = esw_prio_tag_acls_config(esw, nvports);
+ err = esw_prio_tag_acls_config(esw, vf_nvports);
if (err)
return err;
}
@@ -1839,7 +1840,7 @@ int esw_offloads_init(struct mlx5_eswitch *esw, int vf_nvports,
{
int err;
- err = esw_offloads_steering_init(esw, total_nvports);
+ err = esw_offloads_steering_init(esw, vf_nvports, total_nvports);
if (err)
return err;
--
2.21.0
next prev parent reply other threads:[~2019-05-17 20:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 20:19 [pull request][net 00/11] Mellanox, mlx5 fixes 2019-05-17 Saeed Mahameed
2019-05-17 20:19 ` [net 01/11] net/mlx5: Imply MLXFW in mlx5_core Saeed Mahameed
2019-05-17 20:19 ` [net 02/11] net/mlx5: Add meaningful return codes to status_to_err function Saeed Mahameed
2019-05-17 20:19 ` [net 03/11] net/mlx5: E-Switch, Correct type to u16 for vport_num and int for vport_index Saeed Mahameed
2019-05-17 20:19 ` [net 04/11] net/mlx5: Fix peer pf disable hca command Saeed Mahameed
2019-05-17 20:19 ` [net 05/11] net/mlx5e: Fix wrong xmit_more application Saeed Mahameed
2019-05-17 20:19 ` [net 06/11] net/mlx5e: Fix ethtool rxfh commands when CONFIG_MLX5_EN_RXNFC is disabled Saeed Mahameed
2019-05-17 20:19 ` Saeed Mahameed [this message]
2019-05-17 20:19 ` [net 08/11] net/mlx5e: Add missing ethtool driver info for representors Saeed Mahameed
2019-05-17 20:19 ` [net 09/11] net/mlx5e: Additional check for flow destination comparison Saeed Mahameed
2019-05-17 20:20 ` [net 10/11] net/mlx5e: Fix no rewrite fields with the same match Saeed Mahameed
2019-05-17 20:20 ` [net 11/11] net/mlx5e: Fix possible modify header actions memory leak Saeed Mahameed
2019-05-17 22:19 ` [pull request][net 00/11] Mellanox, mlx5 fixes 2019-05-17 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=20190517201910.32216-8-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=elibr@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=roid@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;
as well as URLs for NNTP newsgroup(s).