Subject: Re: [PATCH v9 net-next 08/14] pds_core: set up the VIF definitions and defaults

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

On Mon, Apr 10, 2023 at 12:36:31PM -0700, Shannon Nelson wrote:
> On 4/9/23 5:08 AM, Leon Romanovsky wrote:
> > 
> > On Thu, Apr 06, 2023 at 04:41:37PM -0700, Shannon Nelson wrote:
> > > The Virtual Interfaces (VIFs) supported by the DSC's
> > > configuration (vDPA, Eth, RDMA, etc) are reported in the
> > > dev_ident struct and made visible in debugfs.  At this point
> > > only vDPA is supported in this driver - the other interfaces
> > > are defined for future use but not yet realized.
> > 
> > Let's add only supported modes for now.
> 
> As stated, only the vDPA feature is supported in the driver.
> 
> > 
> > <...>
> > 
> > > +static int viftype_show(struct seq_file *seq, void *v)
> > > +{
> > > +     struct pdsc *pdsc = seq->private;
> > > +     int vt;
> > > +
> > > +     for (vt = 0; vt < PDS_DEV_TYPE_MAX; vt++) {
> > > +             if (!pdsc->viftype_status[vt].name)
> > > +                     continue;
> > > +
> > > +             seq_printf(seq, "%s\t%d supported %d enabled\n",
> > > +                        pdsc->viftype_status[vt].name,
> > > +                        pdsc->viftype_status[vt].supported,
> > > +                        pdsc->viftype_status[vt].enabled);
> > > +     }
> > > +     return 0;
> > > +}
> > > +DEFINE_SHOW_ATTRIBUTE(viftype);
> > 
> > I think that it is handled by devlink.
> 
> Yes, this is handled for those for which the driver sets up parameters (only
> vDPA), but that doesn't help when we want to see what the device is actually
> advertising.  This shows us what the device is thinking, which we find
> useful in debugging, but it doesn't belong in devlink information.

I'm not sure, users somehow need to know if they can or can't enable
certain feature and it is impossible without advertising it.

All drivers which support auxbus need this feature.

Thanks

> > Thanks