ice: change devlink port number for pf
Subsystems (2)
PATCH 1/1 ice: change devlink port number for pf
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 <[email protected]>
---
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(-)
drivers/net/ethernet/intel/ice/ice_devlink.c +1 -1
@@ -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);
Signature · 1 line
2.31.1