diff mbox series

[iwl-next,v1] ice: use internal pf id instead of function number

Message ID 20240813071610.52295-1-michal.swiatkowski@linux.intel.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [iwl-next,v1] ice: use internal pf id instead of function number | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 29 this patch: 29
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 7 maintainers not CCed: przemyslaw.kitszel@intel.com pabeni@redhat.com kuba@kernel.org horms@kernel.org edumazet@google.com anthony.l.nguyen@intel.com piotr.raczynski@intel.com
netdev/build_clang success Errors and warnings before: 29 this patch: 29
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 29 this patch: 29
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 2 this patch: 2
netdev/source_inline success Was 0 now: 0

Commit Message

Michal Swiatkowski Aug. 13, 2024, 7:16 a.m. UTC
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: Wojciech Drewek <wojciech.drewek@intel.com>
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
 drivers/net/ethernet/intel/ice/devlink/devlink_port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jiri Pirko Aug. 14, 2024, 1:51 p.m. UTC | #1
Tue, Aug 13, 2024 at 09:16:10AM CEST, michal.swiatkowski@linux.intel.com 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.

From the patch subject I'm not sure which tree you target, but since
this is a bugfix of something not recent, you should target -net.
Also, please provide "Fixes" tag blaming the commit(s) that introduced
the issue.


>
>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>
>---
> 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 4abdc40d345e..1fe441bfa0ca 100644
>--- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
>+++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
>@@ -340,7 +340,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.
>@@ -458,7 +458,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
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
index 4abdc40d345e..1fe441bfa0ca 100644
--- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
+++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
@@ -340,7 +340,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.
@@ -458,7 +458,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);