Subject: Re: [RFC net-next 0/5] devlink: Add unique identifier to devlink port function

From: Jakub Kicinski <[email-masked]>
Date: Mon, 5 May 2025 11:55:12 -0700

On Sun, 4 May 2025 20:46:51 +0300 Mark Bloch wrote:
> On the DPU (ARM), we see representors for each BDF. For simplicity,
> assume each BDF corresponds to a single devlink port. So the ARM would
> expose:
> 
> PF0_HOST0_REP
> UPLINK0_REP
> PF0_HOST1_REP
> UPLINK1_REP
> 
> In devlink terms, we're referring to the c argument in phys_port_name,
> which represents the controller, effectively indicating which host
> the BDF belongs to.
> 
> The problem we're addressing is matching the PF seen on a host to its
> corresponding representor on the DPU. From the ARM side, we know that
> this rep X belongs to pf0 on host y, but we don't which host is which.
> From within each host, you can't tell which host you are, because all
> see their PF as PF0.
> 
> With the proposed feature (along with Jiri's changes), this becomes
> trivial, you just match the function UID and you're done.

Thanks for explaining the setup. Could you please explain the user
scenario now? Perhaps thinking of it as a sequence diagram would
be helpful, but whatever is easiest, just make it concrete.

> As a side note, I believe this feature has merit even beyond this
> specific use case. 

I also had that belief when I implemented something similar for the NFP
long time ago. Jiri didn't like the solution / understand the problem 
at the time. But it turned out not to matter in practice.