From: Saeed Mahameed <saeedm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Mark Bloch <mbloch@nvidia.com>,
Maor Gottlieb <maorg@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 08/15] net/mlx5: Lag, store number of ports inside lag object
Date: Mon, 9 May 2022 22:57:36 -0700 [thread overview]
Message-ID: <20220510055743.118828-9-saeedm@nvidia.com> (raw)
In-Reply-To: <20220510055743.118828-1-saeedm@nvidia.com>
From: Mark Bloch <mbloch@nvidia.com>
Store the number of lag ports inside the lag object. Lag object is a single
shared object managing the lag state of multiple mlx5 devices on the same
physical HCA.
Downstream patches will allow hardware lag to be created over devices with
more than 2 ports.
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
index 360cb1c4221e..deac240e6d78 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c
@@ -164,6 +164,7 @@ static struct mlx5_lag *mlx5_lag_dev_alloc(struct mlx5_core_dev *dev)
if (err)
mlx5_core_err(dev, "Failed to init multipath lag err=%d\n",
err);
+ ldev->ports = MLX5_CAP_GEN(dev, num_lag_ports);
return ldev;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
index 03a7ea07ce96..1c8fb3fada0c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h
@@ -45,6 +45,7 @@ struct lag_tracker {
*/
struct mlx5_lag {
u8 flags;
+ u8 ports;
int mode_changes_in_progress;
bool shared_fdb;
u8 v2p_map[MLX5_MAX_PORTS];
--
2.35.1
next prev parent reply other threads:[~2022-05-10 5:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 5:57 [pull request][net-next 00/15] mlx5 updates 2022-05-09 Saeed Mahameed
2022-05-10 5:57 ` [net-next 01/15] net/mlx5: Add exit route when waiting for FW Saeed Mahameed
2022-05-11 11:30 ` patchwork-bot+netdevbpf
2022-05-10 5:57 ` [net-next 02/15] net/mlx5: Increase FW pre-init timeout for health recovery Saeed Mahameed
2022-05-10 5:57 ` [net-next 03/15] net/mlx5: Lag, expose number of lag ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 04/15] net/mlx5: devcom only supports 2 ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 05/15] net/mlx5: Lag, move E-Switch prerequisite check into lag code Saeed Mahameed
2022-05-10 5:57 ` [net-next 06/15] net/mlx5: Lag, use lag lock Saeed Mahameed
2022-05-10 5:57 ` [net-next 07/15] net/mlx5: Lag, filter non compatible devices Saeed Mahameed
2022-05-10 5:57 ` Saeed Mahameed [this message]
2022-05-10 5:57 ` [net-next 09/15] net/mlx5: Lag, support single FDB only on 2 ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 10/15] net/mlx5: Lag, use hash when in roce lag on 4 ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 11/15] net/mlx5: Lag, use actual number of lag ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 12/15] net/mlx5: Support devices with more than 2 ports Saeed Mahameed
2022-05-10 5:57 ` [net-next 13/15] net/mlx5: Lag, refactor dmesg print Saeed Mahameed
2022-05-10 5:57 ` [net-next 14/15] net/mlx5: Lag, use buckets in hash mode Saeed Mahameed
2022-05-10 5:57 ` [net-next 15/15] net/mlx5: Lag, add debugfs to query hardware lag state Saeed Mahameed
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=20220510055743.118828-9-saeedm@nvidia.com \
--to=saeedm@nvidia.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=maorg@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).