[dpdk-dev] [PATCH 1/2] common/qat: add sgl header

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Fri Jul 20 19:19:17 CEST 2018



> -----Original Message-----
> From: Trahe, Fiona
> Sent: Tuesday, July 17, 2018 6:56 PM
> To: dev at dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Trahe, Fiona
> <fiona.trahe at intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak at intel.com>
> Subject: [PATCH 1/2] common/qat: add sgl header
> 
> This patch refactors the sgl struct so it includes a flexible array of flat buffers as
> sym and compress PMDs can have different size sgls.
> 
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
> Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
> ---
>  drivers/common/qat/qat_common.c | 53 ++++++++++++++++++++++++++++++-
> ----------
>  drivers/common/qat/qat_common.h | 23 ++++++++++--------
>  drivers/crypto/qat/qat_sym.c    | 12 ++++++----
>  drivers/crypto/qat/qat_sym.h    | 14 +++++++++--
>  4 files changed, 71 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/common/qat/qat_common.c
> b/drivers/common/qat/qat_common.c index c206d3b..c25372d 100644
> --- a/drivers/common/qat/qat_common.c
> +++ b/drivers/common/qat/qat_common.c
> @@ -8,40 +8,53 @@
> 
>  int
>  qat_sgl_fill_array(struct rte_mbuf *buf, uint64_t buf_start,
> -		struct qat_sgl *list, uint32_t data_len)
> +		void *list_in, uint32_t data_len,
> +		const int32_t max_segs)

This should be "uint16_t max_segs".

...

> +sgl_end:
> +#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
> +	QAT_DP_LOG(INFO, "SGL with %d buffers:", list->num_bufs);
> +	for (uint8_t i = 0; i < list->num_bufs; i++) {

I think declaring a variable inside the for statement is not allowed in some compilers?

> +		QAT_DP_LOG(INFO, "QAT SGL buf %d, len = %d, iova =
> 0x%012lx",
> +				i, list->buffers[i].len,
> +				list->buffers[i].addr);
> +		QAT_DP_HEXDUMP_LOG(DEBUG, "qat SGL",
> +				virt_addr[i], list->buffers[i].len);
> +	}
> +#endif
> +
>  	return 0;



More information about the dev mailing list