From patchwork Wed Apr 4 06:34:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gujjar, Abhinandan S" X-Patchwork-Id: 37072 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 461741BBC0; Wed, 4 Apr 2018 08:34:09 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 90CCE1BB92 for ; Wed, 4 Apr 2018 08:34:07 +0200 (CEST) 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; 03 Apr 2018 23:34:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,405,1517904000"; d="scan'208";a="31387602" Received: from unknown (HELO localhost.localdomain) ([10.224.122.195]) by orsmga006.jf.intel.com with ESMTP; 03 Apr 2018 23:34:03 -0700 From: Abhinandan Gujjar To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, akhil.goyal@nxp.com, dev@dpdk.org Cc: narender.vangati@intel.com, abhinandan.gujjar@intel.com, nikhil.rao@intel.com Date: Wed, 4 Apr 2018 12:04:32 +0530 Message-Id: <1522823672-60023-1-git-send-email-abhinandan.gujjar@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [dpdk-dev, v1, 3/3] doc: update cryptodev documentation for set/get private data 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Abhinandan Gujjar Acked-by: Akhil Goyal --- doc/guides/prog_guide/cryptodev_lib.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst index 066fe2d..57b3f6e 100644 --- a/doc/guides/prog_guide/cryptodev_lib.rst +++ b/doc/guides/prog_guide/cryptodev_lib.rst @@ -299,6 +299,32 @@ directly from the devices processed queue, and for virtual device's from a enqueue call. +Set/Get private data +~~~~~~~~~~~~~~~~~~~~ +For session-based operations, the set and get API provides a mechanism for an +application to store and retrieve the private data information stored along with +the rte_cryptodev_sym_session session. + +For example, suppose an application is submitting a rte_cryptodev_sym_session +operation and wants to indicate private data information is required to be used +after completion of the rte_cryptodev_sym_session operation. In this case, the +application can use the set API to set the private data and retrieve it using get API. + +.. code-block:: c + + int rte_cryptodev_sym_session_set_private_data( + struct rte_cryptodev_sym_session *sess, void *data, uint16_t size); + + void * rte_cryptodev_sym_session_get_private_data( + struct rte_cryptodev_sym_session *sess); + + +For session-less mode, the private data information can be placed along with the +``struct rte_crypto_op``. The ``rte_crypto_op::private_data_offset`` indicates the start +of private data information. The offset is counted from the start of the rte_crypto_op +including initialization vector (IV). + + Enqueue / Dequeue Burst APIs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~