From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6C93B2C06 for ; Mon, 22 Feb 2016 19:23:17 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 22 Feb 2016 10:23:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,485,1449561600"; d="scan'208";a="891935529" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga001.jf.intel.com with ESMTP; 22 Feb 2016 10:23:06 -0800 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.113]) by IRSMSX154.ger.corp.intel.com ([169.254.12.208]) with mapi id 14.03.0248.002; Mon, 22 Feb 2016 18:23:05 +0000 From: "Trahe, Fiona" To: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto op oriented Thread-Index: AQHRawVpIpCpTkLZR0OC4mP5hHX+ZZ84ZQlQ Date: Mon, 22 Feb 2016 18:23:04 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B43588F7117B@IRSMSX101.ger.corp.intel.com> References: <1454159235-5175-1-git-send-email-declan.doherty@intel.com> <1455879670-31446-1-git-send-email-declan.doherty@intel.com> <1455879670-31446-3-git-send-email-declan.doherty@intel.com> In-Reply-To: <1455879670-31446-3-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmY2ZjQwYTYtNjY4Mi00MmU3LWI2ODQtNGQzMDQxNzhhMjczIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Imhacm9ZMTVYOFlUQXh1RXczeEpBU0FmTUpKSjFKeFRGaml5MjU1UzRKUEE9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto op oriented 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, 22 Feb 2016 18:23:18 -0000 Hi Declan, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty > Sent: Friday, February 19, 2016 11:01 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be cryp= to op > oriented >=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, this simplifies the burst processing in the crypto PMDs = and the > use of crypto operations in general. >=20 > This change set also continues the separation of the symmetric operation > parameters > from the more general operation parameters, this will simplify the integr= ation of > asymmetric crypto operations in the future. >=20 > As well as the changes to the crypto APIs this patch adds functions 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. >=20 > Finally this change set removes the now unused rte_mbuf_offload library. >=20 > Signed-off-by: Declan Doherty > --- Delete unused fn below. > diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte= _crypto.h > index df0c0b8..489314b 100644 > --- a/lib/librte_cryptodev/rte_crypto.h > +++ b/lib/librte_cryptodev/rte_crypto.h > + > +/** > + * Allocate a symmetric crypto operation in the private data of an mbuf. > + * > + * @param m mbuf which is associated with the crypto operation, the > + * operation will be allocated in the private data of that > + * mbuf. > + * > + * @returns > + * - On success returns a pointer to the crypto operation. > + * - On failure returns NULL. > + */ > +static inline struct rte_crypto_op * > +rte_crypto_sym_op_alloc_from_mbuf_priv_data(struct rte_mbuf *m) > +{ > + if (unlikely(m =3D=3D NULL)) > + return NULL; > + > + /* > + * check that the mbuf's private data size is sufficient to contain a > + * crypto operation > + */ > + if (unlikely(m->priv_size < (sizeof(struct rte_crypto_op) + > + sizeof(struct rte_crypto_sym_op)))) > + return NULL; > + > + /* private data starts immediately after the mbuf header in the mbuf. *= / > + struct rte_crypto_op *op =3D (struct rte_crypto_op *)(m + 1); > + > + __rte_crypto_op_reset(op, RTE_CRYPTO_OP_TYPE_SYMMETRIC); > + > + op->mempool =3D NULL; > + op->sym->m_src =3D m; > + > + return op; > +}