[dpdk-dev] [PATCH v3 3/5] lib/security: extend userdata for IPsec events

Anoob Joseph Anoob.Joseph at caviumnetworks.com
Tue Apr 3 16:28:08 CEST 2018


Adding maintainers of testpmd & lib/ethdev

Thanks,
Anoob
On 21/03/18 16:41, Anoob Joseph wrote:
> Extending 'userdata' to be used for IPsec events too.
>
> IPsec events would have some metadata which would uniquely identify the
> security session for which the event is raised. But application would
> need some construct which it can understand. The 'userdata' solves a
> similar problem for inline processed inbound traffic. Updating the
> documentation to extend the usage of 'userdata'.
>
> Signed-off-by: Anoob Joseph <anoob.joseph at caviumnetworks.com>
> ---
> v3:
> * No change
>
> v2:
> * No change
>
>   lib/librte_security/rte_security.h        | 14 ++++++++------
>   lib/librte_security/rte_security_driver.h |  6 +++---
>   2 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
> index ca1e912..afa2861 100644
> --- a/lib/librte_security/rte_security.h
> +++ b/lib/librte_security/rte_security.h
> @@ -364,15 +364,17 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
>   			      struct rte_mbuf *mb, void *params);
>   
>   /**
> - * Get userdata associated with the security session which processed the
> - * packet. This userdata would be registered while creating the session, and
> - * application can use this to identify the SA etc. Device-specific metadata
> - * in the mbuf would be used for this.
> + * Get userdata associated with the security session. Device specific metadata
> + * provided would be used to uniquely identify the security session being
> + * referred to. This userdata would be registered while creating the session,
> + * and application can use this to identify the SA etc.
>    *
> - * This is valid only for inline processed ingress packets.
> + * Device specific metadata would be set in mbuf for inline processed inbound
> + * packets. In addition, the same metadata would be set for IPsec events
> + * reported by rte_eth_event framework.
>    *
>    * @param   instance	security instance
> - * @param   md		device-specific metadata set in mbuf
> + * @param   md		device-specific metadata
>    *
>    * @return
>    *  - On success, userdata
> diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h
> index 4623904..0583f88 100644
> --- a/lib/librte_security/rte_security_driver.h
> +++ b/lib/librte_security/rte_security_driver.h
> @@ -134,9 +134,9 @@ typedef int (*security_set_pkt_metadata_t)(void *device,
>   		void *params);
>   
>   /**
> - * Get application specific userdata associated with the security session which
> - * processed the packet. This would be retrieved using the metadata obtained
> - * from packet.
> + * Get application specific userdata associated with the security session.
> + * Device specific metadata provided would be used to uniquely identify
> + * the security session being referred to.
>    *
>    * @param	device		Crypto/eth device pointer
>    * @param	md		Metadata



More information about the dev mailing list