Subject: Re: [net 03/14] net/mlx5: SF: Fix probing active SFs during driver probe phase

From: Saeed Mahameed <[email-masked]>
Date: Wed, 23 Nov 2022 15:36:36 -0800

On 23 Nov 15:57, Maciej Fijalkowski wrote:
>On Mon, Nov 21, 2022 at 06:25:48PM -0800, Saeed Mahameed wrote:
>> From: Shay Drory <[email-masked]>
>>
>> When SF devices and SF port representors are located on different
>> functions, unloading and reloading of SF parent driver doesn't recreate
>> the existing SF present in the device.
>> Fix it by querying SFs and probe active SFs during driver probe phase.
>
>Maybe shed some light on how it's actually being done? Have a few words
>that you're adding a workqueue dedicated for that etc. There is also a
>new mutex, I was always expecting that such mechanisms get a bit of
>explanation/justification why there is a need for its introduction.
>

it's needed so we can synchronize the new sync operation on load with the
pre-existing SF adding mechanism "device events" .. 

But i don't believe it's a requirement to explain the code behind a
commit, I think for this case it's self explanatory for someone who
understand how the basic mechanism of adding SFs to a PF funciton works in
mlx5. but yes I agree, some more information would've been useful, we will
be more verbose for future patches.

>Not sure if including some example reproducer in here is mandatory or not
>(and therefore splat, if any). General feeling is that commit message
>could be beefed up.
>

reproducer is really as simple as stated in the commit message, 
a devlink reload when you have SFs loaded on a dual function system 
(smart nic) where the switchdev SF admin is on a remote cpu function.