From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 31B041B5F1 for ; Thu, 10 Jan 2019 12:22:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 03:22:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,461,1539673200"; d="scan'208";a="107177213" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga006.jf.intel.com with ESMTP; 10 Jan 2019 03:22:56 -0800 Received: from irsmsx112.ger.corp.intel.com ([169.254.1.84]) by irsmsx110.ger.corp.intel.com ([169.254.15.16]) with mapi id 14.03.0415.000; Thu, 10 Jan 2019 11:22:55 +0000 From: "De Lara Guarch, Pablo" To: "Zhang, Roy Fan" , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "Trahe, Fiona" Thread-Topic: [PATCH v4 02/12] cryptodev: add sym session mempool create Thread-Index: AQHUqG6QgttzrIg260W3Jv06FJZpp6WoQzHw Date: Thu, 10 Jan 2019 11:22:54 +0000 Message-ID: References: <20181221135550.80745-1-roy.fan.zhang@intel.com> <20190109225609.20590-1-roy.fan.zhang@intel.com> <20190109225609.20590-3-roy.fan.zhang@intel.com> In-Reply-To: <20190109225609.20590-3-roy.fan.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDU1NTAyZWEtYTFhMC00OWUwLWFlZDgtZDYxYzBhNWMxZmUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN2pGYzFCdEdkb0hLS0tzYjhoT29aMlZFdEZhUGVUZW5hRmRtMVVTVXJyQ24rYjdiQ0JuRzArVDBGRGJuM2trZSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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 v4 02/12] cryptodev: add sym session mempool create X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 11:22:58 -0000 > -----Original Message----- > From: Zhang, Roy Fan > Sent: Wednesday, January 9, 2019 10:56 PM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; De Lara Guarch, Pablo > ; Trahe, Fiona > Subject: [PATCH v4 02/12] cryptodev: add sym session mempool create >=20 > This patch adds a new API "rte_cryptodev_sym_session_pool_create()" to > cryptodev library. All applications are required to use this API to creat= e sym > session mempool as it adds private data and nb_drivers information to the > mempool private data. >=20 > Signed-off-by: Fan Zhang > Acked-by: Fiona Trahe > --- > doc/guides/prog_guide/cryptodev_lib.rst | 28 ++++++++++----- > doc/guides/rel_notes/release_19_02.rst | 5 +++ > lib/librte_cryptodev/rte_cryptodev.c | 50 > ++++++++++++++++++++++++++ > lib/librte_cryptodev/rte_cryptodev.h | 31 ++++++++++++++++ > lib/librte_cryptodev/rte_cryptodev_version.map | 7 ++++ > 5 files changed, 112 insertions(+), 9 deletions(-) >=20 > diff --git a/doc/guides/prog_guide/cryptodev_lib.rst > b/doc/guides/prog_guide/cryptodev_lib.rst > index 050a58dc4..366508618 100644 > --- a/doc/guides/prog_guide/cryptodev_lib.rst > +++ b/doc/guides/prog_guide/cryptodev_lib.rst > @@ -455,13 +455,15 @@ Crypto workloads. >=20 > .. figure:: img/cryptodev_sym_sess.* >=20 > -The Crypto device framework provides APIs to allocate and initialize > sessions -for crypto devices, where sessions are mempool objects. > +The Crypto device framework provides APIs to create session mempool and > +allocate and initialize sessions for crypto devices, where sessions are > mempool objects. > It is the application's responsibility to create and manage the session > mempools. > This approach allows for different scenarios such as having a single ses= sion > mempool for all crypto devices (where the mempool object size is big > enough to hold the private session of any crypto device), as well as havi= ng - > multiple session mempools of different sizes for better memory usage. > +multiple session mempools of different sizes for better memory usage. > +However, the application is required to use > +``rte_cryptodev_sym_session_pool_create()`` > +to create symmetric session mempool. >=20 > An application can use ``rte_cryptodev_sym_get_private_session_size()`` = to > get the private session size of given crypto device. This function would = allow > @@ -623,7 +625,8 @@ using one of the crypto PMDs available in DPDK. > #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ > sizeof(struct rte_crypto_sym_op)) >=20 > - struct rte_mempool *mbuf_pool, *crypto_op_pool, *session_pool; > + struct rte_mempool *mbuf_pool, *crypto_op_pool; > + struct *session_pool, *session_priv_pool; Missing rte_mempool here. > unsigned int session_size; > int ret; >=20 ... > +++ b/doc/guides/rel_notes/release_19_02.rst > @@ -167,6 +167,11 @@ API Changes > * cryptodev: as shown in the the 18.11 deprecation notice, the last > parameter > of ``rte_cryptodev_queue_pair_setup()`` is removed. >=20 > +* cryptodev: a new function ``rte_cryptodev_sym_session_pool_create()`` > +is > + introduced. This function is used to create symmetric session mempool > +safely > + and all crypto applications are required to use this function to > +create > + symmetric session mempool from now on. Even though this is new API, it is replacing a necessary call to rte_mempool_create() which was used to create the session pools. I think we should also include that it needs to be used instead of mempool_= create (being more explicit). > + >=20 > ABI Changes > ----------- ... > +++ b/lib/librte_cryptodev/rte_cryptodev_version.map > @@ -88,6 +88,13 @@ DPDK_18.05 { >=20 > } DPDK_17.11; >=20 > +DPDK_19.02 { > + global: > + > + rte_cryptodev_sym_session_pool_create; Just saw that check-symbol-change is complaining about this new API being s= table. Apologies for having you changing from experimental to stable, when the API= needs to be experimental. > + > +} DPDK_18.05; > + > EXPERIMENTAL { > global: >=20 > -- > 2.13.6 Apart from this, patch looks ok to me: Acked-by: Pablo de Lara