From patchwork Wed Jul 17 12:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayuj Verma X-Patchwork-Id: 56618 X-Patchwork-Delegate: gakhil@marvell.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 846431B993; Wed, 17 Jul 2019 14:34:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C68614D27 for ; Wed, 17 Jul 2019 14:34:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6HCTpTY020123; Wed, 17 Jul 2019 05:34:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=rKrmcIZAGByZ3DqAIEKIQ+wm/f6OErpBMc1Pn+YQ//4=; b=kdJswR7i58MQTY9YHPMo3UcLevgJUIhj3Fk9gGrdJ2zXyGiIVPaDXqX2CYQjRodiYihY 4jmPBtQCoWB5LRoP+Z4kmSRhioOfc0Gl0aMhR8URb7NvEAtiYvnvrxAOGUcNM+//OTT+ xlJOg6w2lzP/FhUNTqUK5g4FHRd33RHL9M/anISoA5P+k4W6CJ+0RZeLWa1f9ZVuJg6/ /hEBsIfhroaLDKepiBKi5Fy8EUd/uPcjM6/gmGB828WtO1ZVyymPgSMYM50xyGBvwg6t DTs10FrJCpR6ZLjG1P8tH8cnZnFkM9WohqEIxCIti3EjBiDR5uaq4Z6rdagZSEBGQE+Y Yw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2ts07vg5c0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 17 Jul 2019 05:34:23 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 17 Jul 2019 05:34:21 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 17 Jul 2019 05:34:21 -0700 Received: from localhost.marvell.com (unknown [10.28.10.76]) by maili.marvell.com (Postfix) with ESMTP id 142F43F703F; Wed, 17 Jul 2019 05:34:18 -0700 (PDT) From: Ayuj Verma To: CC: , , , , , , Ayuj Verma Date: Wed, 17 Jul 2019 18:04:12 +0530 Message-ID: <1563366852-23118-2-git-send-email-ayverma@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1563366852-23118-1-git-send-email-ayverma@marvell.com> References: <1563366852-23118-1-git-send-email-ayverma@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-17_05:2019-07-17,2019-07-17 signatures=0 Subject: [dpdk-dev] [RFC] lib/crypto: mark asym session-buffer non-reuseable 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" Update asym xform usage in cryptodev documentation. Xform are immutable, non-reuseable entity till life time of session. This allow some PMD to optimize session setup time. Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- doc/guides/prog_guide/cryptodev_lib.rst | 6 ++++++ lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst index 9719944..c97a239 100644 --- a/doc/guides/prog_guide/cryptodev_lib.rst +++ b/doc/guides/prog_guide/cryptodev_lib.rst @@ -894,6 +894,12 @@ asymmetric crypto chaining is Diffie-Hellman private key generation followed by public generation. Also, currently API does not support chaining of symmetric and asymmetric crypto xforms. +Transform is attached to session during asym session initialization and can't be +modified during session configuration. It remains constant till the end of life +span of a session. It should be used as it is in PMD, PMDs which requires +modification of these immutable data should internally do memcpy of data and +perform required operations. + Each xform defines specific asymmetric crypto algo. Currently supported are: * RSA * Modular operations (Exponentiation and Inverse) diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index defe05e..1f083ea 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -290,7 +290,7 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev, * - Returns -ENOMEM if the private session could not be allocated. */ typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev, - struct rte_crypto_asym_xform *xform, + const struct rte_crypto_asym_xform *xform, struct rte_cryptodev_asym_session *session, struct rte_mempool *mp); /**