From: Mark Bloch <mbloch@nvidia.com>
To: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
<przemyslaw.kitszel@intel.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
"Saeed Mahameed" <saeedm@nvidia.com>, <netdev@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Gal Pressman <gal@nvidia.com>,
Daniel Jurgens <danielj@nvidia.com>,
Parav Pandit <parav@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
William Tu <witu@nvidia.com>
Subject: [PATCH V2 net 1/8] net/mlx5: Base ECVF devlink port attrs from 0
Date: Wed, 20 Aug 2025 16:32:02 +0300 [thread overview]
Message-ID: <20250820133209.389065-2-mbloch@nvidia.com> (raw)
In-Reply-To: <20250820133209.389065-1-mbloch@nvidia.com>
From: Daniel Jurgens <danielj@nvidia.com>
Adjust the vport number by the base ECVF vport number so the port
attributes start at 0. Previously the port attributes would start 1
after the maximum number of host VFs.
Fixes: dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports")
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
index b7102e14d23d..c33accadae0f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
@@ -47,10 +47,12 @@ static void mlx5_esw_offloads_pf_vf_devlink_port_attrs_set(struct mlx5_eswitch *
devlink_port_attrs_pci_vf_set(dl_port, controller_num, pfnum,
vport_num - 1, external);
} else if (mlx5_core_is_ec_vf_vport(esw->dev, vport_num)) {
+ u16 base_vport = mlx5_core_ec_vf_vport_base(dev);
+
memcpy(dl_port->attrs.switch_id.id, ppid.id, ppid.id_len);
dl_port->attrs.switch_id.id_len = ppid.id_len;
devlink_port_attrs_pci_vf_set(dl_port, 0, pfnum,
- vport_num - 1, false);
+ vport_num - base_vport, false);
}
}
--
2.34.1
next prev parent reply other threads:[~2025-08-20 13:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 13:32 [PATCH V2 net 0/8] mlx5 misx fixes 2025-08-20 Mark Bloch
2025-08-20 13:32 ` Mark Bloch [this message]
2025-08-20 13:32 ` [PATCH V2 net 2/8] net/mlx5: Remove default QoS group and attach vports directly to root TSAR Mark Bloch
2025-08-20 13:32 ` [PATCH V2 net 3/8] net/mlx5e: Preserve tc-bw during parent changes Mark Bloch
2025-10-02 16:31 ` ChaosEsque Team
2025-08-20 13:32 ` [PATCH V2 net 4/8] net/mlx5: Destroy vport QoS element when no configuration remains Mark Bloch
2025-08-20 14:45 ` Przemek Kitszel
2025-08-20 13:32 ` [PATCH V2 net 5/8] net/mlx5: Fix QoS reference leak in vport enable error path Mark Bloch
2025-08-20 13:32 ` [PATCH V2 net 6/8] net/mlx5: Restore missing scheduling node cleanup on vport enable failure Mark Bloch
2025-08-20 13:32 ` [PATCH V2 net 7/8] net/mlx5e: Query FW for buffer ownership Mark Bloch
2025-08-20 13:32 ` [PATCH V2 net 8/8] net/mlx5e: Preserve shared buffer capacity during headroom updates Mark Bloch
2025-08-20 14:50 ` Przemek Kitszel
2025-08-21 15:20 ` [PATCH V2 net 0/8] mlx5 misx fixes 2025-08-20 patchwork-bot+netdevbpf
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=20250820133209.389065-2-mbloch@nvidia.com \
--to=mbloch@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=witu@nvidia.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