Subject: Re: [PATCH v9 net-next 10/14] pds_core: add auxiliary_bus devices

From: Leon Romanovsky <[email-masked]>
Date: Thu, 13 Apr 2023 11:43:23 +0300

On Mon, Apr 10, 2023 at 01:02:10PM -0700, Shannon Nelson wrote:
> On 4/9/23 5:23 AM, Leon Romanovsky wrote:
> > 
> > On Thu, Apr 06, 2023 at 04:41:39PM -0700, Shannon Nelson wrote:
> > > An auxiliary_bus device is created for each vDPA type VF at VF
> > > probe and destroyed at VF remove.  The aux device name comes
> > > from the driver name + VIF type + the unique id assigned at PCI
> > > probe.  The VFs are always removed on PF remove, so there should
> > > be no issues with VFs trying to access missing PF structures.
> > > 
> > > The auxiliary_device names will look like "pds_core.vDPA.nn"
> > > where 'nn' is the VF's uid.
> > > 
> > > Signed-off-by: Shannon Nelson <[email-masked]>
> > > ---
> > >   drivers/net/ethernet/amd/pds_core/Makefile |   1 +
> > >   drivers/net/ethernet/amd/pds_core/auxbus.c | 112 +++++++++++++++++++++
> > >   drivers/net/ethernet/amd/pds_core/core.h   |   6 ++
> > >   drivers/net/ethernet/amd/pds_core/main.c   |  36 ++++++-
> > >   include/linux/pds/pds_auxbus.h             |  16 +++
> > >   include/linux/pds/pds_common.h             |   1 +
> > >   6 files changed, 170 insertions(+), 2 deletions(-)
> > >   create mode 100644 drivers/net/ethernet/amd/pds_core/auxbus.c
> > >   create mode 100644 include/linux/pds/pds_auxbus.h

<...>

> > 
> > And can we please find another name for functions and parameters which
> > don't include VF in it as it is not correct anymore.
> > 
> > In ideal world, it will be great to have same probe flow for PF and VF
> > while everything is controlled through FW and auxbus. For PF, you won't
> > advertise any aux devices, but the flow will continue to be the same.
> 
> Since we currently only have VFs and not more finely grained sub-functions,
> these seem to still make sense and help define the context of the
> operations.  I can find places where we can reduce the use of 'VF'.  Would
> you prefer PF and SF to PF and VF where the difference is important?

I'm talking about VF names in auxbus code. It simply doesn't belong there as you
are creating/deleting auxiliary devices for specific physical devices. They by
chance your VFs.

"PF/VF probe flow" is my wishful thinking, it is fine to leave it as is.

Thanks