diff mbox series

[v2,2/4] crypto: hide asym session structure

Message ID 20220124150339.280090-3-ciara.power@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers show
Series crypto: improve asym session usage | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Power, Ciara Jan. 24, 2022, 3:03 p.m. UTC
The rte_cryptodev_asym_session structure is now moved to an internal
header. This will no longer be used directly by apps,
private session data can be accessed via get API.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/cperf_ops.c             |  2 +-
 app/test/test_cryptodev_asym.c               | 34 ++++++++++----------
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c     |  4 +--
 drivers/crypto/cnxk/cnxk_cryptodev_ops.h     |  4 +--
 drivers/crypto/octeontx/otx_cryptodev_ops.c  |  4 +--
 drivers/crypto/openssl/rte_openssl_pmd_ops.c |  4 +--
 drivers/crypto/qat/qat_asym.c                |  4 +--
 drivers/crypto/qat/qat_asym.h                |  4 +--
 lib/cryptodev/cryptodev_pmd.h                | 23 ++++++++++---
 lib/cryptodev/rte_cryptodev.c                |  7 ++--
 lib/cryptodev/rte_cryptodev.h                | 17 ++--------
 lib/cryptodev/rte_cryptodev_trace.h          |  7 ++--
 12 files changed, 57 insertions(+), 57 deletions(-)

Comments

Zhang, Roy Fan Jan. 27, 2022, 11:04 a.m. UTC | #1
> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Monday, January 24, 2022 3:04 PM
> To: dev@dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>; gakhil@marvell.com;
> anoobj@marvell.com; mdr@ashroe.eu; Power, Ciara
> <ciara.power@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> Ankur Dwivedi <adwivedi@marvell.com>; Tejasree Kondoj
> <ktejasree@marvell.com>; Griffin, John <john.griffin@intel.com>; Trahe,
> Fiona <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>
> Subject: [PATCH v2 2/4] crypto: hide asym session structure
> 
> The rte_cryptodev_asym_session structure is now moved to an internal
> header. This will no longer be used directly by apps,
> private session data can be accessed via get API.
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
diff mbox series

Patch

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index bdc5dc9544..948dc0f608 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -21,7 +21,7 @@  cperf_set_ops_asym(struct rte_crypto_op **ops,
 		   uint64_t *tsc_start __rte_unused)
 {
 	uint16_t i;
-	struct rte_cryptodev_asym_session *asym_sess = (void *)sess;
+	void *asym_sess = (void *)sess;
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_asym_op *asym_op = ops[i]->asym;
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index f7c2fd2588..f93f39af42 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -44,7 +44,7 @@  struct crypto_testsuite_params_asym {
 };
 
 struct crypto_unittest_params {
-	struct rte_cryptodev_asym_session *sess;
+	void *sess;
 	struct rte_crypto_op *op;
 };
 
@@ -65,7 +65,7 @@  static uint32_t test_index;
 static struct crypto_testsuite_params_asym testsuite_params = { NULL };
 
 static int
-queue_ops_rsa_sign_verify(struct rte_cryptodev_asym_session *sess)
+queue_ops_rsa_sign_verify(void *sess)
 {
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
@@ -156,7 +156,7 @@  queue_ops_rsa_sign_verify(struct rte_cryptodev_asym_session *sess)
 }
 
 static int
-queue_ops_rsa_enc_dec(struct rte_cryptodev_asym_session *sess)
+queue_ops_rsa_enc_dec(void *sess)
 {
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
@@ -308,7 +308,7 @@  test_cryptodev_asym_op(struct crypto_testsuite_params_asym *ts_params,
 	struct rte_crypto_op *op = NULL;
 	struct rte_crypto_op *result_op = NULL;
 	struct rte_crypto_asym_xform xform_tc;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	struct rte_cryptodev_asym_capability_idx cap_idx;
 	const struct rte_cryptodev_asymmetric_xform_capability *capability;
 	uint8_t dev_id = ts_params->valid_devs[0];
@@ -644,7 +644,7 @@  test_rsa_sign_verify(void)
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
-	struct rte_cryptodev_asym_session *sess;
+	void *sess;
 	struct rte_cryptodev_info dev_info;
 	int status = TEST_SUCCESS;
 
@@ -685,7 +685,7 @@  test_rsa_enc_dec(void)
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
-	struct rte_cryptodev_asym_session *sess;
+	void *sess;
 	struct rte_cryptodev_info dev_info;
 	int status = TEST_SUCCESS;
 
@@ -726,7 +726,7 @@  test_rsa_sign_verify_crt(void)
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
-	struct rte_cryptodev_asym_session *sess;
+	void *sess;
 	struct rte_cryptodev_info dev_info;
 	int status = TEST_SUCCESS;
 
@@ -767,7 +767,7 @@  test_rsa_enc_dec_crt(void)
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
-	struct rte_cryptodev_asym_session *sess;
+	void *sess;
 	struct rte_cryptodev_info dev_info;
 	int status = TEST_SUCCESS;
 
@@ -1049,7 +1049,7 @@  test_dh_gen_shared_sec(struct rte_crypto_asym_xform *xfrm)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t output[TEST_DH_MOD_LEN];
 	struct rte_crypto_asym_xform xform = *xfrm;
@@ -1134,7 +1134,7 @@  test_dh_gen_priv_key(struct rte_crypto_asym_xform *xfrm)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t output[TEST_DH_MOD_LEN];
 	struct rte_crypto_asym_xform xform = *xfrm;
@@ -1217,7 +1217,7 @@  test_dh_gen_pub_key(struct rte_crypto_asym_xform *xfrm)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t output[TEST_DH_MOD_LEN];
 	struct rte_crypto_asym_xform xform = *xfrm;
@@ -1308,7 +1308,7 @@  test_dh_gen_kp(struct rte_crypto_asym_xform *xfrm)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t out_pub_key[TEST_DH_MOD_LEN];
 	uint8_t out_prv_key[TEST_DH_MOD_LEN];
@@ -1397,7 +1397,7 @@  test_mod_inv(void)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	struct rte_cryptodev_asym_capability_idx cap_idx;
 	const struct rte_cryptodev_asymmetric_xform_capability *capability;
@@ -1512,7 +1512,7 @@  test_mod_exp(void)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	struct rte_cryptodev_asym_capability_idx cap_idx;
 	const struct rte_cryptodev_asymmetric_xform_capability *capability;
@@ -1663,7 +1663,7 @@  test_dsa_sign(void)
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t r[TEST_DH_MOD_LEN];
 	uint8_t s[TEST_DH_MOD_LEN];
@@ -1796,7 +1796,7 @@  test_ecdsa_sign_verify(enum curve curve_id)
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
 	struct crypto_testsuite_ecdsa_params input_params;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_op *result_op = NULL;
 	uint8_t output_buf_r[TEST_DATA_SIZE];
@@ -2000,7 +2000,7 @@  test_ecpm(enum curve curve_id)
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
 	struct crypto_testsuite_ecpm_params input_params;
-	struct rte_cryptodev_asym_session *sess = NULL;
+	void *sess = NULL;
 	uint8_t dev_id = ts_params->valid_devs[0];
 	struct rte_crypto_op *result_op = NULL;
 	uint8_t output_buf_x[TEST_DATA_SIZE];
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 0d561ba0f3..260aca41f4 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -652,7 +652,7 @@  cnxk_ae_session_size_get(struct rte_cryptodev *dev __rte_unused)
 
 void
 cnxk_ae_session_clear(struct rte_cryptodev *dev,
-		      struct rte_cryptodev_asym_session *sess)
+		      void *sess)
 {
 	struct rte_mempool *sess_mp;
 	struct cnxk_ae_sess *priv;
@@ -673,7 +673,7 @@  cnxk_ae_session_clear(struct rte_cryptodev *dev,
 int
 cnxk_ae_session_cfg(struct rte_cryptodev *dev,
 		    struct rte_crypto_asym_xform *xform,
-		    struct rte_cryptodev_asym_session *sess,
+		    void *sess,
 		    struct rte_mempool *pool)
 {
 	struct cnxk_cpt_vf *vf = dev->data->dev_private;
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
index e521f07585..b2100b360c 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
@@ -117,10 +117,10 @@  void sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess);
 unsigned int cnxk_ae_session_size_get(struct rte_cryptodev *dev __rte_unused);
 
 void cnxk_ae_session_clear(struct rte_cryptodev *dev,
-			   struct rte_cryptodev_asym_session *sess);
+			   void *sess);
 int cnxk_ae_session_cfg(struct rte_cryptodev *dev,
 			struct rte_crypto_asym_xform *xform,
-			struct rte_cryptodev_asym_session *sess,
+			void *sess,
 			struct rte_mempool *pool);
 void cnxk_cpt_dump_on_err(struct cnxk_cpt_qp *qp);
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 22c54dde68..1027aca895 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -377,7 +377,7 @@  otx_cpt_asym_session_size_get(struct rte_cryptodev *dev __rte_unused)
 static int
 otx_cpt_asym_session_cfg(struct rte_cryptodev *dev __rte_unused,
 			 struct rte_crypto_asym_xform *xform __rte_unused,
-			 struct rte_cryptodev_asym_session *sess,
+			 void *sess,
 			 struct rte_mempool *pool __rte_unused)
 {
 	struct cpt_asym_sess_misc *priv = get_asym_session_private_data(sess);
@@ -398,7 +398,7 @@  otx_cpt_asym_session_cfg(struct rte_cryptodev *dev __rte_unused,
 
 static void
 otx_cpt_asym_session_clear(struct rte_cryptodev *dev,
-			   struct rte_cryptodev_asym_session *sess)
+			   void *sess)
 {
 	struct cpt_asym_sess_misc *priv;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 061fdd2837..553fea7c08 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -1119,7 +1119,7 @@  static int openssl_set_asym_session_parameters(
 static int
 openssl_pmd_asym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_asym_xform *xform,
-		struct rte_cryptodev_asym_session *sess,
+		void *sess,
 		struct rte_mempool *mempool __rte_unused)
 {
 	void *asym_sess_private_data;
@@ -1196,7 +1196,7 @@  static void openssl_reset_asym_session(struct openssl_asym_session *sess)
  */
 static void
 openssl_pmd_asym_session_clear(struct rte_cryptodev *dev __rte_unused,
-		struct rte_cryptodev_asym_session *sess)
+		void *sess)
 {
 	void *sess_priv = get_asym_session_private_data(sess);
 
diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 32d3f01a18..3f3c9c1d26 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -725,7 +725,7 @@  qat_asym_process_response(void **op, uint8_t *resp,
 int
 qat_asym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_asym_xform *xform,
-		struct rte_cryptodev_asym_session *sess,
+		void *sess,
 		struct rte_mempool *mempool __rte_unused)
 {
 	struct qat_asym_session *session;
@@ -770,7 +770,7 @@  unsigned int qat_asym_session_get_private_size(
 
 void
 qat_asym_session_clear(struct rte_cryptodev *dev,
-		struct rte_cryptodev_asym_session *sess)
+		void *sess)
 {
 	void *sess_priv = get_asym_session_private_data(sess);
 	struct qat_asym_session *s = (struct qat_asym_session *)sess_priv;
diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h
index 308b6b2e0b..d9e695d198 100644
--- a/drivers/crypto/qat/qat_asym.h
+++ b/drivers/crypto/qat/qat_asym.h
@@ -48,7 +48,7 @@  struct qat_asym_session {
 int
 qat_asym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_asym_xform *xform,
-		struct rte_cryptodev_asym_session *sess,
+		void *sess,
 		struct rte_mempool *mempool);
 
 unsigned int
@@ -56,7 +56,7 @@  qat_asym_session_get_private_size(struct rte_cryptodev *dev);
 
 void
 qat_asym_session_clear(struct rte_cryptodev *dev,
-		struct rte_cryptodev_asym_session *sess);
+		void *sess);
 
 /*
  * Build PKE request to be sent to the fw, partially uses template
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 474d447496..2d12505d3c 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -329,7 +329,7 @@  typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
  */
 typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev,
 		struct rte_crypto_asym_xform *xform,
-		struct rte_cryptodev_asym_session *session,
+		void *session,
 		struct rte_mempool *mp);
 /**
  * Free driver private session data.
@@ -343,10 +343,10 @@  typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
  * Clear asymmetric session private data.
  *
  * @param	dev		Crypto device pointer
- * @param	sess		Cryptodev session structure
+ * @param	sess		Cryptodev session void pointer
  */
 typedef void (*cryptodev_asym_clear_session_t)(struct rte_cryptodev *dev,
-		struct rte_cryptodev_asym_session *sess);
+		void *sess);
 /**
  * Perform actual crypto processing (encrypt/digest or auth/decrypt)
  * on user provided data.
@@ -627,10 +627,23 @@  set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 	sess->sess_data[driver_id].data = private_data;
 }
 
+/**
+ * @internal
+ * Cryptodev asymmetric crypto session.
+ */
+__extension__ struct rte_cryptodev_asym_session {
+	uint8_t driver_id;
+	/**< Session driver ID. */
+	uint8_t max_priv_session_sz;
+	/**< size of private session data used when creating mempool */
+	uint8_t padding[6];
+	uint8_t sess_private_data[0];
+};
+
 static inline void *
-get_asym_session_private_data(struct rte_cryptodev_asym_session *sess)
+get_asym_session_private_data(void *sess)
 {
-	return sess->sess_private_data;
+	return ((struct rte_cryptodev_asym_session *)sess)->sess_private_data;
 }
 
 #endif /* _CRYPTODEV_PMD_H_ */
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index ca10428770..c10b9bf05f 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1908,7 +1908,7 @@  rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-struct rte_cryptodev_asym_session *
+void *
 rte_cryptodev_asym_session_create(struct rte_mempool *mp, uint8_t dev_id,
 		struct rte_crypto_asym_xform *xforms)
 {
@@ -2015,8 +2015,7 @@  rte_cryptodev_sym_session_clear(uint8_t dev_id,
 }
 
 int
-rte_cryptodev_asym_session_clear(uint8_t dev_id,
-		struct rte_cryptodev_asym_session *sess)
+rte_cryptodev_asym_session_clear(uint8_t dev_id, void *sess)
 {
 	struct rte_cryptodev *dev;
 
@@ -2062,7 +2061,7 @@  rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 }
 
 int
-rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess)
+rte_cryptodev_asym_session_free(void *sess)
 {
 	struct rte_mempool *sess_mp;
 
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 7db543eae2..af328de896 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -918,16 +918,6 @@  struct rte_cryptodev_sym_session {
 	/**< Driver specific session material, variable size */
 };
 
-/** Cryptodev asymmetric crypto session */
-__extension__ struct rte_cryptodev_asym_session {
-	uint8_t driver_id;
-	/**< Session driver ID. */
-	uint8_t max_priv_session_sz;
-	/**< size of private session data used when creating mempool */
-	uint8_t padding[6];
-	uint8_t sess_private_data[0];
-};
-
 /**
  * Create a symmetric session mempool.
  *
@@ -1008,7 +998,7 @@  rte_cryptodev_sym_session_create(struct rte_mempool *mempool);
  *  - On failure returns NULL
  */
 __rte_experimental
-struct rte_cryptodev_asym_session *
+void *
 rte_cryptodev_asym_session_create(struct rte_mempool *mempool,
 		uint8_t dev_id, struct rte_crypto_asym_xform *xforms);
 
@@ -1039,7 +1029,7 @@  rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
  */
 __rte_experimental
 int
-rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess);
+rte_cryptodev_asym_session_free(void *sess);
 
 /**
  * Fill out private data for the device id, based on its device type.
@@ -1092,8 +1082,7 @@  rte_cryptodev_sym_session_clear(uint8_t dev_id,
  */
 __rte_experimental
 int
-rte_cryptodev_asym_session_clear(uint8_t dev_id,
-			struct rte_cryptodev_asym_session *sess);
+rte_cryptodev_asym_session_clear(uint8_t dev_id, void *sess);
 
 /**
  * Get the size of the header session, for all registered drivers excluding
diff --git a/lib/cryptodev/rte_cryptodev_trace.h b/lib/cryptodev/rte_cryptodev_trace.h
index 2ea253a2fd..2c9de4f6de 100644
--- a/lib/cryptodev/rte_cryptodev_trace.h
+++ b/lib/cryptodev/rte_cryptodev_trace.h
@@ -96,7 +96,7 @@  RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_cryptodev_trace_asym_session_create,
 	RTE_TRACE_POINT_ARGS(void *mempool,
-		struct rte_cryptodev_asym_session *sess),
+		void *sess),
 	rte_trace_point_emit_ptr(mempool);
 	rte_trace_point_emit_ptr(sess);
 )
@@ -109,7 +109,7 @@  RTE_TRACE_POINT(
 
 RTE_TRACE_POINT(
 	rte_cryptodev_trace_asym_session_free,
-	RTE_TRACE_POINT_ARGS(struct rte_cryptodev_asym_session *sess),
+	RTE_TRACE_POINT_ARGS(void *sess),
 	rte_trace_point_emit_ptr(sess);
 )
 
@@ -130,8 +130,7 @@  RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_cryptodev_trace_asym_session_init,
 	RTE_TRACE_POINT_ARGS(uint8_t dev_id,
-		struct rte_cryptodev_asym_session *sess, void *xforms,
-		void *mempool),
+		void *sess, void *xforms, void *mempool),
 	rte_trace_point_emit_u8(dev_id);
 	rte_trace_point_emit_ptr(sess);
 	rte_trace_point_emit_ptr(xforms);