From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B507F45AF3;
	Wed,  9 Oct 2024 16:16:53 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id D99AE427C7;
	Wed,  9 Oct 2024 16:16:50 +0200 (CEST)
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17])
 by mails.dpdk.org (Postfix) with ESMTP id BB48A427B6
 for <dev@dpdk.org>; Wed,  9 Oct 2024 16:16:48 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1728483409; x=1760019409;
 h=from:to:cc:subject:date:message-id:in-reply-to: references;
 bh=XG+usPHpMZuHc+C5tDsISzfsB6iRMS2MBf+bdb9M7sY=;
 b=dBfBhqQX4o6B4DvGfdNur3CaBGyxPuk6CeFA5LH48CKBcdi6l4aQ9/+z
 WAwUWss3DxzC/4mT60gEetEfd8OZhWjx2+taHVDhshogSIjYaqAk1CIqZ
 kZ4uI1afd8aJ9yqQPZEcBZKe3lrKP6EW7nKV/TYhGcYBfEaqOQKMyNC1K
 7Ntxet9BzlaK4tG2wkZEXjXD20IV5rR3AYNKL4FIvvDlcdD8mB/BSa3M9
 RZ3s/jz6ixrLh0JrA+3HYPn+RbCvzBufUUDn1tB03N5VL5gXzq/hlg7Qu
 t7JJ+HPaGLWMEp0hRz+jo2gESAxu+vF0jqkUbyQWa7dznBmGvaIdzYwJP w==;
X-CSE-ConnectionGUID: 7y8kRhATSjaQFbTB0uvIGw==
X-CSE-MsgGUID: WkYgM3JSQmiEUliVvBEOEw==
X-IronPort-AV: E=McAfee;i="6700,10204,11220"; a="27666304"
X-IronPort-AV: E=Sophos;i="6.11,190,1725346800"; d="scan'208";a="27666304"
Received: from fmviesa010.fm.intel.com ([10.60.135.150])
 by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 09 Oct 2024 07:16:49 -0700
X-CSE-ConnectionGUID: uwWdW11dRNyySJ2+rqoUDQ==
X-CSE-MsgGUID: 5oieRIC+Rg6BWvPv7x29UA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.11,190,1725346800"; d="scan'208";a="76585205"
Received: from silpixa00399302.ir.intel.com ([10.237.214.22])
 by fmviesa010.fm.intel.com with ESMTP; 09 Oct 2024 07:16:47 -0700
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
To: dev@dpdk.org
Cc: gakhil@marvell.com, brian.dooley@intel.com,
 Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Subject: [PATCH v5 1/4] cryptodev: reorder structures in asym crypto header
Date: Wed,  9 Oct 2024 14:01:44 +0100
Message-Id: <20241009130147.38280-2-arkadiuszx.kusztal@intel.com>
X-Mailer: git-send-email 2.13.6
In-Reply-To: <20241009130147.38280-1-arkadiuszx.kusztal@intel.com>
References: <20241008181433.57591-3-arkadiuszx.kusztal@intel.com>
 <20241009130147.38280-1-arkadiuszx.kusztal@intel.com>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Asymmetric-crypto header has a simple structure that allows to
keep logically separate blocks together. Therefore, xforms,
ops, and generic structs may be appropriately ordered.
This patch moves sm2-op structs to be placed along other
algorithms-op structs.

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/cryptodev/rte_crypto_asym.h | 68 ++++++++++++++++++++---------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 1adbe9c389..2af6a307f6 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -600,40 +600,6 @@ struct rte_crypto_ecpm_op_param {
 };
 
 /**
- * Asymmetric crypto transform data
- *
- * Structure describing asym xforms.
- */
-struct rte_crypto_asym_xform {
-	struct rte_crypto_asym_xform *next;
-	/**< Pointer to next xform to set up xform chain.*/
-	enum rte_crypto_asym_xform_type xform_type;
-	/**< Asymmetric crypto transform */
-
-	union {
-		struct rte_crypto_rsa_xform rsa;
-		/**< RSA xform parameters */
-
-		struct rte_crypto_modex_xform modex;
-		/**< Modular Exponentiation xform parameters */
-
-		struct rte_crypto_modinv_xform modinv;
-		/**< Modular Multiplicative Inverse xform parameters */
-
-		struct rte_crypto_dh_xform dh;
-		/**< DH xform parameters */
-
-		struct rte_crypto_dsa_xform dsa;
-		/**< DSA xform parameters */
-
-		struct rte_crypto_ec_xform ec;
-		/**< EC xform parameters, used by elliptic curve based
-		 * operations.
-		 */
-	};
-};
-
-/**
  * SM2 operation capabilities
  */
 enum rte_crypto_sm2_op_capa {
@@ -708,6 +674,40 @@ struct rte_crypto_sm2_op_param {
 };
 
 /**
+ * Asymmetric crypto transform data
+ *
+ * Structure describing asym xforms.
+ */
+struct rte_crypto_asym_xform {
+	struct rte_crypto_asym_xform *next;
+	/**< Pointer to next xform to set up xform chain.*/
+	enum rte_crypto_asym_xform_type xform_type;
+	/**< Asymmetric crypto transform */
+
+	union {
+		struct rte_crypto_rsa_xform rsa;
+		/**< RSA xform parameters */
+
+		struct rte_crypto_modex_xform modex;
+		/**< Modular Exponentiation xform parameters */
+
+		struct rte_crypto_modinv_xform modinv;
+		/**< Modular Multiplicative Inverse xform parameters */
+
+		struct rte_crypto_dh_xform dh;
+		/**< DH xform parameters */
+
+		struct rte_crypto_dsa_xform dsa;
+		/**< DSA xform parameters */
+
+		struct rte_crypto_ec_xform ec;
+		/**< EC xform parameters, used by elliptic curve based
+		 * operations.
+		 */
+	};
+};
+
+/**
  * Asymmetric Cryptographic Operation.
  *
  * Structure describing asymmetric crypto operation params.
-- 
2.13.6