[dpdk-dev] [RFC] eventdev: add caps API and PMD callback for crypto adapter

Jerin Jacob jerin.jacob at caviumnetworks.com
Wed Nov 29 04:50:35 CET 2017


-----Original Message-----
> Date: Thu, 9 Nov 2017 12:22:37 +0530
> From: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
> To: jerin.jacob at caviumnetworks.com
> CC: dev at dpdk.org, Abhinandan Gujjar <abhinandan.gujjar at intel.com>, Nikhil
>  Rao <nikhil.rao at intel.com>
> Subject: [RFC] eventdev: add caps API and PMD callback for crypto adapter
> X-Mailer: git-send-email 1.9.1
> 
> Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
> Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>

Hi Abhinandan,

Thanks for the contribution. Some comments below,

> ---
>  lib/librte_eventdev/rte_eventdev.c     | 25 +++++++++++++++++++
>  lib/librte_eventdev/rte_eventdev.h     | 44 ++++++++++++++++++++++++++++++++++
>  lib/librte_eventdev/rte_eventdev_pmd.h | 32 +++++++++++++++++++++++++
>  3 files changed, 101 insertions(+)
> +
> +/* Crypto Rx adapter capability bitmap flags */
> +#define RTE_EVENT_CYRPTO_ADAPTER_CAP_INTERNAL_PORT	0x1
> +/**< Flag indicates HW is capable of generating events.
> + * Cryptodev can send packets to the event device using internal event port.
> + */
> +#define RTE_EVENT_CRYPTO_ADAPTER_CAP_MULTI_EVENTQ	0x2
> +/**< Flag indicates adapter supports multiple event queues per cryptodev.
> + * Each cryptodev queue pair can be connected to a unique event queue.
> + */
> +#define RTE_EVENT_CRYPTO_ADAPTER_CAP_MBUF_MULTI_EVENTQ	0x3

The value should be 4 as it is a flag.

> +/**< Flag indicates adapter supports event queue enqueue based on mbuf metadata.
> + * Mbuf metadata will be used enqueue to unique event queue.
> + * Event information will be stored in metadata of each mbuf
> + * @see struct rte_event_crypto_adapter_mbuf_metadata

Since CPU is enqueuing the crypto ops to HW(Unlike ethdev Rx adapter, 
Which is hardwired to Ingress packet Input hardware), I think, we may
NOT need RTE_EVENT_CRYPTO_ADAPTER_CAP_MULTI_EVENTQ and 
RTE_EVENT_CRYPTO_ADAPTER_CAP_MBUF_MULTI_EVENTQ capabilities.

Adding NXP folks to get the comment on capabilities requirement for
their HW. If no one needs RTE_EVENT_CRYPTO_ADAPTER_CAP_MULTI_EVENTQ and
RTE_EVENT_CRYPTO_ADAPTER_CAP_MBUF_MULTI_EVENTQ then we can remove it.

Jerin


More information about the dev mailing list