Subject: Re: [PATCH iwl-net v4] ice: use DSN instead of PCI BDF for ice_adapter index

From: Simon Horman <[email-masked]>
Date: Tue, 15 Apr 2025 20:46:42 +0100

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-masked]>
> Suggested-by: Jakub Kicinski <[email-masked]>
> Suggested-by: Jiri Pirko <[email-masked]>
> Reviewed-by: Aleksandr Loktionov <[email-masked]>
> Signed-off-by: Przemek Kitszel <[email-masked]>
> ---
> CC: Karol Kolacinski <[email-masked]>
> CC: Grzegorz Nitka <[email-masked]>
> CC: Michal Schmidt <[email-masked]>
> CC: Sergey Temerkhanov <[email-masked]>
> CC: Michal Kubiak <[email-masked]>
> CC: Simon Horman <[email-masked]>
> 
> 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-masked]>