From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anoob Joseph Subject: Re: [PATCH v3 3/5] lib/security: extend userdata for IPsec events Date: Tue, 3 Apr 2018 19:58:08 +0530 Message-ID: <4b38b4cf-0135-4dbd-0cf0-0fc4e208bf9c@caviumnetworks.com> References: <1519896103-32479-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-4-git-send-email-anoob.joseph@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , dev@dpdk.org, Thomas Monjalon , Wenzhuo Lu , Jingjing Wu To: Akhil Goyal , Declan Doherty , Radu Nicolau Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0073.outbound.protection.outlook.com [104.47.32.73]) by dpdk.org (Postfix) with ESMTP id 659001B735 for ; Tue, 3 Apr 2018 16:28:29 +0200 (CEST) In-Reply-To: <1521630685-5179-4-git-send-email-anoob.joseph@caviumnetworks.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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