netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Daniel Jurgens <danielj@nvidia.com>
Subject: [net 06/11] net/mlx5: Fix devlink controller number for ECVF
Date: Mon,  7 Aug 2023 14:26:02 -0700	[thread overview]
Message-ID: <20230807212607.50883-7-saeed@kernel.org> (raw)
In-Reply-To: <20230807212607.50883-1-saeed@kernel.org>

From: Daniel Jurgens <danielj@nvidia.com>

The controller number for ECVFs is always 0, because the ECPF must be
the eswitch owner for EC VFs to be enabled.

Fixes: dc13180824b7 ("net/mlx5: Enable devlink port for embedded cpu VF vports")
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c | 2 +-
 1 file changed, 1 insertion(+), 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 af779c700278..fdf2be548e85 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c
@@ -60,7 +60,7 @@ static struct devlink_port *mlx5_esw_dl_port_alloc(struct mlx5_eswitch *esw, u16
 	}  else if (mlx5_core_is_ec_vf_vport(esw->dev, vport_num)) {
 		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, controller_num, pfnum,
+		devlink_port_attrs_pci_vf_set(dl_port, 0, pfnum,
 					      vport_num - 1, false);
 	}
 	return dl_port;
-- 
2.41.0


  parent reply	other threads:[~2023-08-07 21:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 21:25 [pull request][net 00/11] mlx5 fixes 2023-08-07 Saeed Mahameed
2023-08-07 21:25 ` [net 01/11] net/mlx5e: Take RTNL lock when needed before calling xdp_set_features() Saeed Mahameed
2023-08-08 23:40   ` patchwork-bot+netdevbpf
2023-08-07 21:25 ` [net 02/11] net/mlx5e: TC, Fix internal port memory leak Saeed Mahameed
2023-08-07 21:25 ` [net 03/11] net/mlx5: DR, Fix wrong allocation of modify hdr pattern Saeed Mahameed
2023-08-07 21:26 ` [net 04/11] net/mlx5: Return correct EC_VF function ID Saeed Mahameed
2023-08-07 21:26 ` [net 05/11] net/mlx5: Allow 0 for total host VFs Saeed Mahameed
2023-08-07 21:26 ` Saeed Mahameed [this message]
2023-08-07 21:26 ` [net 07/11] net/mlx5e: Unoffload post act rule when handling FIB events Saeed Mahameed
2023-08-07 21:26 ` [net 08/11] net/mlx5: LAG, Check correct bucket when modifying LAG Saeed Mahameed
2023-08-07 21:26 ` [net 09/11] net/mlx5: Skip clock update work when device is in error state Saeed Mahameed
2023-08-07 21:26 ` [net 10/11] net/mlx5: Reload auxiliary devices in pci error handlers Saeed Mahameed
2023-08-07 21:26 ` [net 11/11] net/mlx5e: Add capability check for vnic counters 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=20230807212607.50883-7-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=danielj@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@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;
as well as URLs for NNTP newsgroup(s).