[Accel-config] Re: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and retrieve mdev properties

Jiang, Dave <dave.jiang at intel.com>
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>

> -----Original Message-----
> From: Thomas, Ramesh <ramesh.thomas(a)intel.com>
> Sent: Friday, December 4, 2020 5:00 PM
> To: Jiang, Dave <dave.jiang(a)intel.com>; accel-config(a)lists.01.org
> Cc: Luck, Tony <tony.luck(a)intel.com>
> Subject: RE: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and
> retrieve mdev properties
> 
> On Fri, Dec 04, 2020 at 03:53:17PM, Dave Jiang wrote:
> >
> >
> > > -----Original Message-----
> > > From: ramesh.thomas(a)intel.com <ramesh.thomas(a)intel.com>
> > > Sent: Wednesday, December 2, 2020 12:31 PM
> > > To: accel-config(a)lists.01.org
> > > Cc: Thomas, Ramesh <ramesh.thomas(a)intel.com>; Luck, Tony
> > > <tony.luck(a)intel.com>; Jiang, Dave <dave.jiang(a)intel.com>
> > > Subject: [PATCH v1 03/11] accel-config: Add lib functions to list
> > > mdevs and retrieve mdev properties
> > >
> > > From: Ramesh Thomas <ramesh.thomas(a)intel.com>
> > >
> > > Create library functions for querrying mdev details
> > > - Functions to retrieve first and next mdev in list
> > > - Macro to iterate mdev list
> > > - Functions to retrieve mdev uuid and type
> > >
> > > Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
> > > ---
> > >  accfg/lib/libaccel-config.sym |  9 +++++++++
> > >  accfg/lib/libaccfg.c          | 22 ++++++++++++++++++++++
> > >  accfg/libaccel_config.h       | 11 +++++++++++
> > >  3 files changed, 42 insertions(+)
> > >
> > > diff --git a/accfg/lib/libaccel-config.sym
> > > b/accfg/lib/libaccel-config.sym index
> > > 471e06a..a857152 100644
> > > --- a/accfg/lib/libaccel-config.sym
> > > +++ b/accfg/lib/libaccel-config.sym
> > > @@ -133,3 +133,12 @@ global:
> > >  accfg_wq_set_max_batch_size;
> > >  accfg_wq_set_max_transfer_size;
> > >  } LIBACCFG_6;
> > > +
> > > +LIBACCFG_8 {
> > > +global:
> > > +accfg_device_first_mdev;
> > > +accfg_device_next_mdev;
> > > +accfg_mdev_get_uuid;
> > > +accfg_mdev_get_type;
> > > +accfg_mdev_basenames;
> > > +} LIBACCFG_7;
> > > diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c index
> > > 0dd1f0c..6a4648a
> > > 100644
> > > --- a/accfg/lib/libaccfg.c
> > > +++ b/accfg/lib/libaccfg.c
> > > @@ -956,6 +956,28 @@ static void engines_init(struct accfg_device
> > > *device)  add_engine);  }
> > >
> > > +ACCFG_EXPORT struct accfg_device_mdev
> > > *accfg_device_first_mdev(struct
> > > +accfg_device *device) {
> >
> > Can you line up the function like:
> > ACCFG_EXPORT struct accfg_device_mdev
> *accfg_device_first_mdev(struct
> > accfg_device *device) {
> >
> > This is for the entire series. Otherwise looks ok.
> 
> Assuming this is also the issue with your Outlook removing newlines.
> In code it is aligned like you suggest.

Most likely. Disregard. You can add review tag. 
> 
> >
> > - Dave.
> >
> >
> > > +return list_top(&device->mdev_list, struct accfg_device_mdev,
> > > +list);
> > > }
> > > +
> > > +ACCFG_EXPORT struct accfg_device_mdev
> > > *accfg_device_next_mdev(struct
> > > +accfg_device_mdev *mdev) {
> > > +struct accfg_device *device = mdev->device;
> > > +
> > > +return list_next(&device->mdev_list, mdev, list); }
> > > +
> > > +ACCFG_EXPORT void accfg_mdev_get_uuid(struct accfg_device_mdev
> > > *mdev,
> > > +uuid_t uuid) {
> > > +uuid_copy(uuid, mdev->uuid);
> > > +}
> > > +
> > > +ACCFG_EXPORT enum accfg_mdev_type accfg_mdev_get_type(struct
> > > +accfg_device_mdev *mdev) { return mdev->type; }
> > > +
> > >  /**
> > >   * accfg_device_get_first - retrieve first device in the system
> > >   * @ctx: context established by accfg_new diff --git
> a/accfg/libaccel_config.h
> > > b/accfg/libaccel_config.h index e89bd40..a55bfde 100644
> > > --- a/accfg/libaccel_config.h
> > > +++ b/accfg/libaccel_config.h
> > > @@ -184,6 +184,17 @@ int accfg_device_is_active(struct accfg_device
> > > *device);  int accfg_device_get_cmd_status(struct accfg_device
> *device);
> > > const char * accfg_device_get_cmd_status_str(struct accfg_device
> *device);
> > >
> > > +struct accfg_device_mdev;
> > > +struct accfg_device_mdev *accfg_device_first_mdev(struct
> accfg_device
> > > +*device); struct accfg_device_mdev *accfg_device_next_mdev(struct
> > > +accfg_device_mdev *mdev); void accfg_mdev_get_uuid(struct
> > > +accfg_device_mdev *mdev, uuid_t uuid); enum accfg_mdev_type
> > > +accfg_mdev_get_type(struct accfg_device_mdev *mdev);
> > > +
> > > +#define accfg_device_mdev_foreach(device, mdev) \
> > > +for (mdev = accfg_device_first_mdev(device); \
> > > +mdev != NULL; \
> > > +mdev = accfg_device_next_mdev(mdev))
> > > +
> > >  /* libaccfg function for group */
> > >  struct accfg_group;
> > >  struct accfg_group *accfg_group_get_first(struct accfg_device *device);
> > > --
> > > 2.26.2
> >
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.