[v1,2/2] crypto/openssl: mark asym xform constant

Message ID 1563958317-480-3-git-send-email-ayverma@marvell.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series declare crypto asym xform immutable |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Ayuj Verma July 24, 2019, 8:51 a.m. UTC
  Marked asym xform as constant.

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a307c91..022a096 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -813,7 +813,7 @@ 
 
 static int openssl_set_asym_session_parameters(
 		struct openssl_asym_session *asym_session,
-		struct rte_crypto_asym_xform *xform)
+		const struct rte_crypto_asym_xform *xform)
 {
 	int ret = 0;
 
@@ -925,7 +925,7 @@  static int openssl_set_asym_session_parameters(
 	}
 	case RTE_CRYPTO_ASYM_XFORM_MODEX:
 	{
-		struct rte_crypto_modex_xform *xfrm = &(xform->modex);
+		const struct rte_crypto_modex_xform *xfrm = &(xform->modex);
 
 		BN_CTX *ctx = BN_CTX_new();
 		if (ctx == NULL) {
@@ -956,7 +956,7 @@  static int openssl_set_asym_session_parameters(
 	}
 	case RTE_CRYPTO_ASYM_XFORM_MODINV:
 	{
-		struct rte_crypto_modinv_xform *xfrm = &(xform->modinv);
+		const struct rte_crypto_modinv_xform *xfrm = &(xform->modinv);
 
 		BN_CTX *ctx = BN_CTX_new();
 		if (ctx == NULL) {
@@ -1125,7 +1125,7 @@  static int openssl_set_asym_session_parameters(
 /** Configure the session from a crypto xform chain */
 static int
 openssl_pmd_asym_session_configure(struct rte_cryptodev *dev __rte_unused,
-		struct rte_crypto_asym_xform *xform,
+		const struct rte_crypto_asym_xform *xform,
 		struct rte_cryptodev_asym_session *sess,
 		struct rte_mempool *mempool)
 {