All of lore.kernel.org
 help / color / mirror / Atom feed
* [Accel-config] Re: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and retrieve mdev properties
@ 2020-12-04 23:53 Jiang, Dave
  0 siblings, 0 replies; 3+ messages in thread
From: Jiang, Dave @ 2020-12-04 23:53 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 3788 bytes --]



> -----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.

- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Accel-config] Re: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and retrieve mdev properties
@ 2020-12-04 23:59 Thomas, Ramesh
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas, Ramesh @ 2020-12-04 23:59 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 4159 bytes --]

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.

> 
> - 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
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Accel-config] Re: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and retrieve mdev properties
@ 2020-12-05  0:10 Jiang, Dave
  0 siblings, 0 replies; 3+ messages in thread
From: Jiang, Dave @ 2020-12-05  0:10 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 4815 bytes --]



> -----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
> >
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-05  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-04 23:53 [Accel-config] Re: [PATCH v1 03/11] accel-config: Add lib functions to list mdevs and retrieve mdev properties Jiang, Dave
  -- strict thread matches above, loose matches on Subject: below --
2020-12-04 23:59 Thomas, Ramesh
2020-12-05  0:10 Jiang, Dave

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.