[dpdk-dev] [PATCH v5 02/12] crypto/dpaa2_sec: add dpaa2 sec poll mode driver

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Mar 21 16:40:53 CET 2017



> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal at nxp.com]
> Sent: Friday, March 03, 2017 7:49 PM
> To: dev at dpdk.org
> Cc: thomas.monjalon at 6wind.com; Doherty, Declan; De Lara Guarch, Pablo;
> Mcnamara, John; nhorman at tuxdriver.com; hemant.agrawal at nxp.com;
> Akhil Goyal
> Subject: [PATCH v5 02/12] crypto/dpaa2_sec: add dpaa2 sec poll mode
> driver
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>

...

> --- /dev/null
> +++ b/drivers/crypto/dpaa2_sec/Makefile
> @@ -0,0 +1,81 @@

...

> +# build flags
> +ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT),y)
> +CFLAGS += -O0 -g
> +CFLAGS += "-Wno-error"
> +else
> +CFLAGS += -O3
> +CFLAGS += $(WERROR_FLAGS)
> +endif
> +CFLAGS += "-Wno-strict-aliasing"

Is this "Wno-strict-aliasing" necessary? Is any gcc version complaining about this?
If yes, could you add a comment about it?

...

> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> new file mode 100644
> index 0000000..34ca776
> --- /dev/null
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

...

> +
> +#include <time.h>
> +#include <net/if.h>

Add blank line here, to separate glibc libraries and DPDK libraries.

> +#include <rte_mbuf.h>
> +#include <rte_cryptodev.h>

...

> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
> b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
> new file mode 100644
> index 0000000..e0d6148
> --- /dev/null
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
> @@ -0,0 +1,225 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
> + *   Copyright (c) 2016 NXP. All rights reserved.

...

> +/** private data structure for each DPAA2_SEC device */
> +struct dpaa2_sec_dev_private {
> +	void *mc_portal; /**< MC Portal for configuring this device */
> +	void *hw; /**< Hardware handle for this device.Used by NADK
> framework */
> +	int32_t hw_id; /**< An unique ID of this device instance */
> +	int32_t vfio_fd; /**< File descriptor received via VFIO */
> +	uint16_t token; /**< Token required by DPxxx objects */
> +	unsigned int max_nb_queue_pairs;

Missing comment here?

> +
> +	unsigned int max_nb_sessions;
> +	/**< Max number of sessions supported by device */
> +};
> +
> +struct dpaa2_sec_qp {
> +	struct dpaa2_queue rx_vq;
> +	struct dpaa2_queue tx_vq;
> +};
> +



More information about the dev mailing list