On Mon, Apr 14, 2025 at 03:12:41PM +0200, Przemek Kitszel wrote:
> 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: 0e2bddf9e5f9 ("ice: add ice_adapter for shared data across PFs on the
> same NIC")
> Suggested-by: Jacob Keller <[email protected]>
> Suggested-by: Jakub Kicinski <[email protected]>
> Suggested-by: Jiri Pirko <[email protected]>
> Reviewed-by: Aleksandr Loktionov <[email protected]>
> Signed-off-by: Przemek Kitszel <[email protected]>
> ---
> CC: Karol Kolacinski <[email protected]>
> CC: Grzegorz Nitka <[email protected]>
> CC: Michal Schmidt <[email protected]>
> CC: Sergey Temerkhanov <[email protected]>
> CC: Michal Kubiak <[email protected]>
> CC: Simon Horman <[email protected]>
>
> v4:
> - Add fixes tag for real... (Simon)
> - extend commit message (Simon)
> - pass dsn to ice_adapter_new() to have simpler code
> (I happened to do that as (local) followup) (me)
Thanks for the updates.
Reviewed-by: Simon Horman <[email protected]>