From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 5BEA31B1E4 for ; Mon, 16 Apr 2018 08:54:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2018 23:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,458,1517904000"; d="scan'208";a="51074616" Received: from unknown (HELO localhost.localdomain) ([10.224.122.195]) by orsmga002.jf.intel.com with ESMTP; 15 Apr 2018 23:54:38 -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: Mon, 16 Apr 2018 12:24:56 +0530 Message-Id: <1523861696-103397-3-git-send-email-abhinandan.gujjar@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523861696-103397-1-git-send-email-abhinandan.gujjar@intel.com> References: <1523861696-103397-1-git-send-email-abhinandan.gujjar@intel.com> Subject: [dpdk-dev] [v3,3/3] doc: add private data info in crypto guide 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: Mon, 16 Apr 2018 06:54:41 -0000 Signed-off-by: Abhinandan Gujjar Acked-by: Akhil Goyal --- doc/guides/prog_guide/cryptodev_lib.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst index 066fe2d..b279a20 100644 --- a/doc/guides/prog_guide/cryptodev_lib.rst +++ b/doc/guides/prog_guide/cryptodev_lib.rst @@ -299,6 +299,33 @@ directly from the devices processed queue, and for virtual device's from a enqueue call. +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 crypto session. + +For example, suppose an application is submitting a crypto operation with a session +associated and wants to indicate private data information which is required to be +used after completion of the crypto 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 other crypto information such as the IVs (since there can +be an IV also for authentication). + + Enqueue / Dequeue Burst APIs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 1.9.1