From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH v5 01/11] lib/rte_security: add security library Date: Wed, 25 Oct 2017 10:43:24 +0530 Message-ID: <51222096-8849-9f3e-0b74-4cd5383ba5f3@nxp.com> References: <20171014221734.15511-1-akhil.goyal@nxp.com> <20171024141545.30837-1-akhil.goyal@nxp.com> <20171024141545.30837-2-akhil.goyal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , , , , , To: Akhil Goyal , Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0055.outbound.protection.outlook.com [104.47.36.55]) by dpdk.org (Postfix) with ESMTP id DCB061B803 for ; Wed, 25 Oct 2017 07:13:32 +0200 (CEST) In-Reply-To: <20171024141545.30837-2-akhil.goyal@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Akhil, Some minor comments. On 10/24/2017 7:45 PM, Akhil Goyal wrote: > rte_security library provides APIs for security session > create/free for protocol offload or offloaded crypto > operation to ethernet device. > > Signed-off-by: Akhil Goyal > Signed-off-by: Boris Pismenny > Signed-off-by: Radu Nicolau > Signed-off-by: Declan Doherty > Signed-off-by: Aviad Yehezkel > --- .. > diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h > new file mode 100644 > index 0000000..87b39fb > --- /dev/null > +++ b/lib/librte_security/rte_security.h > @@ -0,0 +1,528 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright 2017 NXP. > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of NXP nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > + > +#ifndef _RTE_SECURITY_H_ > +#define _RTE_SECURITY_H_ > + > +/** > + * @file rte_security.h > + * > + * RTE Security Common Definitions > + * minor comment: better to add: @b EXPERIMENTAL: this API may change without prior notice > + */ > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + .. > + > +/** > + * Create security session as specified by the session configuration > + * > + * @param instance security instance > + * @param conf session configuration parameters > + * @param mp mempool to allocate session objects from can you fix the spacing for *mp* details here? > + * @return > + * - On success, pointer to session > + * - On failure, NULL > + */ > +struct rte_security_session * > +rte_security_session_create(struct rte_security_ctx *instance, > + struct rte_security_session_conf *conf, > + struct rte_mempool *mp); > + > diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h > new file mode 100644 > index 0000000..78814fa > --- /dev/null > +++ b/lib/librte_security/rte_security_driver.h > @@ -0,0 +1,155 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright(c) 2017 Intel Corporation. All rights reserved. > + * Copyright 2017 NXP. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * > + * * Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * * Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Intel Corporation nor the names of its > + * contributors may be used to endorse or promote products derived > + * from this software without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + */ > + > +#ifndef _RTE_SECURITY_DRIVER_H_ > +#define _RTE_SECURITY_DRIVER_H_ > + > +/** > + * @file rte_security_driver.h > + * > + * RTE Security Common Definitions RTE Security driver related common function definitions. @b EXPERIMENTAL: these API may change without prior notice > diff --git a/lib/librte_security/rte_security_version.map b/lib/librte_security/rte_security_version.map > new file mode 100644 > index 0000000..8af7fc1 > --- /dev/null > +++ b/lib/librte_security/rte_security_version.map > @@ -0,0 +1,13 @@ > +DPDK_17.11 { This should be EXPERIMENTAL > + global: > + > + rte_security_attach_session; > + rte_security_capabilities_get; > + rte_security_capability_get; > + rte_security_session_create; > + rte_security_session_destroy; > + rte_security_session_stats_get; > + rte_security_session_update; > + rte_security_set_pkt_metadata; > + > +}; >