* [iwl-net v2] ice: use internal pf id instead of function number
@ 2024-08-19 7:17 Michal Swiatkowski
2024-08-20 21:27 ` [Intel-wired-lan] " Jacob Keller
0 siblings, 1 reply; 2+ messages in thread
From: Michal Swiatkowski @ 2024-08-19 7:17 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, wojciech.drewek, jiri
Use always the same pf id in devlink port number. When doing
pass-through the PF to VM bus info func number can be any value.
Fixes: 2ae0aa4758b0 ("ice: Move devlink port to PF/VF struct")
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
v1 --> v2: https://lore.kernel.org/netdev/20240813071610.52295-1-michal.swiatkowski@linux.intel.com/
* change subject to net and add fixes tag
---
drivers/net/ethernet/intel/ice/devlink/devlink_port.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
index 00fed5a61d62..62ef8e2fb5f1 100644
--- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
+++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
@@ -337,7 +337,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
return -EIO;
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
- attrs.phys.port_number = pf->hw.bus.func;
+ attrs.phys.port_number = pf->hw.pf_id;
/* As FW supports only port split options for whole device,
* set port split options only for first PF.
@@ -455,7 +455,7 @@ int ice_devlink_create_vf_port(struct ice_vf *vf)
return -EINVAL;
attrs.flavour = DEVLINK_PORT_FLAVOUR_PCI_VF;
- attrs.pci_vf.pf = pf->hw.bus.func;
+ attrs.pci_vf.pf = pf->hw.pf_id;
attrs.pci_vf.vf = vf->vf_id;
ice_devlink_set_switch_id(pf, &attrs.switch_id);
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Intel-wired-lan] [iwl-net v2] ice: use internal pf id instead of function number
2024-08-19 7:17 [iwl-net v2] ice: use internal pf id instead of function number Michal Swiatkowski
@ 2024-08-20 21:27 ` Jacob Keller
0 siblings, 0 replies; 2+ messages in thread
From: Jacob Keller @ 2024-08-20 21:27 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan; +Cc: jiri, netdev, wojciech.drewek
On 8/19/2024 12:17 AM, Michal Swiatkowski wrote:
> Use always the same pf id in devlink port number. When doing
> pass-through the PF to VM bus info func number can be any value.
>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: 2ae0aa4758b0 ("ice: Move devlink port to PF/VF struct")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
> Suggested-by: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> v1 --> v2: https://lore.kernel.org/netdev/20240813071610.52295-1-michal.swiatkowski@linux.intel.com/
> * change subject to net and add fixes tag
> ---
>
> drivers/net/ethernet/intel/ice/devlink/devlink_port.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> index 00fed5a61d62..62ef8e2fb5f1 100644
> --- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> +++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
> @@ -337,7 +337,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf)
> return -EIO;
>
> attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
> - attrs.phys.port_number = pf->hw.bus.func;
> + attrs.phys.port_number = pf->hw.pf_id;
>
> /* As FW supports only port split options for whole device,
> * set port split options only for first PF.
> @@ -455,7 +455,7 @@ int ice_devlink_create_vf_port(struct ice_vf *vf)
> return -EINVAL;
>
> attrs.flavour = DEVLINK_PORT_FLAVOUR_PCI_VF;
> - attrs.pci_vf.pf = pf->hw.bus.func;
> + attrs.pci_vf.pf = pf->hw.pf_id;
> attrs.pci_vf.vf = vf->vf_id;
>
> ice_devlink_set_switch_id(pf, &attrs.switch_id);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-20 21:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 7:17 [iwl-net v2] ice: use internal pf id instead of function number Michal Swiatkowski
2024-08-20 21:27 ` [Intel-wired-lan] " Jacob Keller
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).