3
0
Fork 0
forked from mirrors/linux
kernel/drivers/net/ethernet/intel
Przemek Kitszel 0093cb194a ice: use DSN instead of PCI BDF for ice_adapter index
Use Device Serial Number instead of PCI bus/device/function for
the index of struct ice_adapter.

Functions on the same physical device should point to the very same
ice_adapter instance, but with two PFs, when at least one of them is
PCI-e passed-through to a VM, it is no longer the case - PFs will get
seemingly random PCI BDF values, and thus indices, what finally leds to
each of them being on their own instance of ice_adapter. That causes them
to don't attempt any synchronization of the PTP HW clock usage, or any
other future resources.

DSN works nicely in place of the index, as it is "immutable" in terms of
virtualization.

Fixes: 0e2bddf9e5 ("ice: add ice_adapter for shared data across PFs on the same NIC")
Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Suggested-by: Jiri Pirko <jiri@resnulli.us>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20250505161939.2083581-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-06 18:27:14 -07:00
..
e1000 e1000: Hold RTNL when e1000_down can be called 2024-11-13 10:30:21 -08:00
e1000e treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
fm10k treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
i40e treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
iavf net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
ice ice: use DSN instead of PCI BDF for ice_adapter index 2025-05-06 18:27:14 -07:00
idpf idpf: protect shutdown from reset 2025-04-29 14:28:40 -07:00
igb treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
igbvf treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
igc igc: fix lock order in igc_ptp_reset 2025-04-29 14:28:40 -07:00
ixgbe treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
ixgbevf treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
libeth module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
libie module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
e100.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
Kconfig iavf: add initial framework for registering PTP clock 2025-02-14 10:58:07 -08:00
Makefile net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00