From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D64655677 for ; Mon, 8 Feb 2016 18:50:30 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 08 Feb 2016 09:50:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,417,1449561600"; d="scan'208";a="898768659" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga001.fm.intel.com with ESMTP; 08 Feb 2016 09:50:29 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.113]) by IRSMSX109.ger.corp.intel.com ([169.254.13.100]) with mapi id 14.03.0248.002; Mon, 8 Feb 2016 17:50:28 +0000 From: "Trahe, Fiona" To: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] cryptodev: API change to rte_crypto_op bursts Thread-Index: AQHRW19z2M6TtMhQS0KtIoL+UMlFdZ8ieL6Q Date: Mon, 8 Feb 2016 17:50:27 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B43588F64703@IRSMSX101.ger.corp.intel.com> References: <1454159235-5175-1-git-send-email-declan.doherty@intel.com> In-Reply-To: <1454159235-5175-1-git-send-email-declan.doherty@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGQ5MGY5YTktY2VmYi00ZjZjLWJiMGYtMWRlMjc4Y2FmZjdmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOVY4TlJrN2FCaWV2c3ExNTVQb294UzR0SFI2RStvTmFsMzd5VEt2b09YMD0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] cryptodev: API change to rte_crypto_op bursts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2016 17:50:31 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty > Sent: Saturday, January 30, 2016 1:07 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] cryptodev: API change to rte_crypto_op bursts >=20 > This patch modifies the crypto burst enqueue/dequeue APIs to operate on b= ursts > rte_crypto_op's rather than the current implementation which operates on > rte_mbuf bursts which simplifies the burst processing in the crypto PMDs = and the > use of crypto operations in general. >=20 > The changes also separates the symmetric operation parameters from the mo= re > general operation parameters, this will simplify the integration of > asymmetric crypto operations in the future. >=20 > As well as the changes to the crypto APIs this patch adds function for m= anaging > rte_crypto_op pools to the cryptodev API. It modifies the existing PMDs, = unit > tests and sample application to work with the modified APIs and finally > removes the now unused rte_mbuf_offload library. >=20 > Signed-off-by: Declan Doherty > --- //snip// > + > +/** > + * Reset the fields of a symmetric operation to their default values. > * > * @param op The crypto operation to be reset. > */ > static inline void > -__rte_crypto_op_reset(struct rte_crypto_op *op) > +__rte_crypto_sym_op_reset(struct rte_crypto_sym_op *op) > { > op->type =3D RTE_CRYPTO_OP_SESSIONLESS; Maybe rename the type param in struct rte_crypto_sym_op to session_type=20 and op param in this fn to sym_op? To avoid confusion with op->type in function below. > - op->dst.m =3D NULL; > - op->dst.offset =3D 0; > + > + op->m_src =3D NULL; > + op->m_dst =3D NULL; > +} > + > +/** > + * Reset the fields of a crypto operation to their default values. > + * > + * @param op The crypto operation to be reset. > + * @param type The crypto operation type. > + */ > +static inline void > +__rte_crypto_op_reset(struct rte_crypto_op *op, enum rte_crypto_op_type > type) > +{ > + op->status =3D RTE_CRYPTO_OP_STATUS_NOT_SUBMITTED; > + > + if (type =3D=3D RTE_CRYPTO_OP_TYPE_SYMMETRIC) { > + op->type =3D type; > + __rte_crypto_sym_op_reset(&op->sym); > + } > } >=20