[dpdk-dev] [PATCH 20.11] raw/ioat: added a flag to control copying handle parameters

Bruce Richardson bruce.richardson at intel.com
Mon Jul 13 15:28:20 CEST 2020


On Mon, Jul 13, 2020 at 07:15:19AM +0000, Cheng Jiang wrote:
> Added a flag which controls whether rte_ioat_enqueue_copy
> and rte_ioat_completed_copies function should process
> handle parameters to improve the performance when handle
> parameters are not necessary to use. This is targeting
> 20.11 release.
> 
> Signed-off-by: Cheng Jiang <Cheng1.jiang at intel.com>
> ---
>  drivers/raw/ioat/ioat_rawdev.c     |  1 +
>  drivers/raw/ioat/rte_ioat_rawdev.h | 14 +++++++++++---
>  2 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
> index 87fd088aa..5bf030785 100644
> --- a/drivers/raw/ioat/ioat_rawdev.c
> +++ b/drivers/raw/ioat/ioat_rawdev.c
> @@ -57,6 +57,7 @@ ioat_dev_configure(const struct rte_rawdev *dev, rte_rawdev_obj_t config)
>  		return -EINVAL;
>  
>  	ioat->ring_size = params->ring_size;
> +	ioat->hdls_enable = params->hdls_enable;
>  	if (ioat->desc_ring != NULL) {
>  		rte_memzone_free(ioat->desc_mz);
>  		ioat->desc_ring = NULL;
> diff --git a/drivers/raw/ioat/rte_ioat_rawdev.h b/drivers/raw/ioat/rte_ioat_rawdev.h
> index f765a6557..daca04dd3 100644
> --- a/drivers/raw/ioat/rte_ioat_rawdev.h
> +++ b/drivers/raw/ioat/rte_ioat_rawdev.h
> @@ -35,6 +35,7 @@
>   */
>  struct rte_ioat_rawdev_config {
>  	unsigned short ring_size;
> +	bool hdls_enable;
>  };
>  
You need a doxygen comment on the new structure member (and add to existing
one). While it's fairly clear what ring_size parameter should do, the
hdls_enable one needs a proper explanation.

I also think you might want to investigate changing it to "hdls_disable"
so that the default zero-value is the current behaviour. Requiring it to be
set as 1 means that existing code will likely recompile but fail to work.
For example, the ioat_rawdev_autotest fails on completion checks now.


More information about the dev mailing list