Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net-next] ice: change devlink port number for pf
@ 2021-07-12  5:07 Michal Swiatkowski
  0 siblings, 0 replies; only message in thread
From: Michal Swiatkowski @ 2021-07-12  5:07 UTC (permalink / raw)
  To: intel-wired-lan

Using lport from VSI structure as physical port number for
PF devlink port introduces inconsistency with netdevice naming scheme
and PF attribute in VF devlink port.

Change this value to be the same for VF and PF devlink port.

Before this change:
- devlink phys_port_name for first netdevice (ending name "f0"): p1
- devlink phys_port_name for VF created on first netdevice: pf0vf0

After this change:
- devlink phys_port_name for first netdevice (ending name "f0"): p0
- devlink phys_port_name for VF created on first netdevice: pf0vf0

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
This commit should be squashed with "ice: Move devlink port to PF/VF struct"

 drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
index 59ae94266fcf..792a3972dec3 100644
--- a/drivers/net/ethernet/intel/ice/ice_devlink.c
+++ b/drivers/net/ethernet/intel/ice/ice_devlink.c
@@ -624,7 +624,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
 	vsi = ice_get_main_vsi(pf);
 
 	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
-	attrs.phys.port_number = vsi->port_info->lport;
+	attrs.phys.port_number = pf->hw.bus.func;
 
 	devlink_port_attrs_set(devlink_port, &attrs);
 	devlink = priv_to_devlink(pf);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-12  5:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-12  5:07 [Intel-wired-lan] [PATCH net-next] ice: change devlink port number for pf Michal Swiatkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox