Skip to contentSkip to conversation

test/event_crypto: fix mempool name

PATCH In review Hemant Agrawal 3 participants 9 messages Sep 27, 2019 – Sep 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/event_crypto: fix mempool name

The longer mempool name size is causing error in
rte_mempool_create_empty for dpaa1

ret = snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name); This patch reduce the size of mempool name string

Fixes 24054e3640a2 ("test/crypto: use separate session mempools")
---
 app/test/test_event_crypto_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_event_crypto_adapter.c +1 -1
index 73655020d..cff7ad61f 100644
@@ -536,7 +536,7 @@ configure_cryptodev(void)
 			"session mempool allocation failed\n");
 
 	params.session_priv_mpool = rte_mempool_create(
-				"CRYPTO_ADAPTER_SESSION_MP_PRIV",
+				"CRYPTO_AD_SESS_MP_PRIV",
 				MAX_NB_SESSIONS,
 				session_size,
 				0, 0, NULL, NULL, NULL,
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 test/event_crypto: change the SEC cipher algo

The existing code usages NULL as the cipher algo for testing crypto event adapter.
DPAA1/DPAA2 do not support NULL algo. Hence changing is to the most common algo AES-CBC, which is supported by all crypto drivers implementing event crypto adapter.

---
 app/test/test_event_crypto_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +2 -2
index cff7ad61f..83f3214ca 100644
@@ -183,7 +183,7 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
@@ -373,7 +373,7 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#2 lore raw

Re: [dpdk-dev] [PATCH] test/event_crypto: change the SEC cipher algo

Quoted 43 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: change the SEC cipher algo

The existing code usages NULL as the cipher algo for testing crypto event adapter.
DPAA1/DPAA2 do not support NULL algo. Hence changing is to the most common algo AES-CBC, which is supported by all crypto drivers implementing event crypto adapter.

---
 app/test/test_event_crypto_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +2 -3
index cff7ad61f..83f3214ca 100644
@@ -183,7 +183,7 @@ test_op_forward_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
@@ -373,7 +373,7 @@ test_op_new_mode(uint8_t session_less)
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
 
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
--

2.17.1

#3 lore raw

Re: [dpdk-dev] [PATCH] test/event_crypto: change the SEC cipher algo

Quoted 2 lines · Abhinandan S

Changed to Acked-by: Abhinandan Gujjar <[email protected]> and Applied to dpdk-next-eventdev/master. Thanks.

Quoted 46 lines
Quoted 45 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: change the SEC cipher algo

The existing code usages NULL as the cipher algo for testing crypto event adapter.
DPAA1/DPAA2 do not support NULL algo. Hence changing is to the most common algo AES-CBC, which is supported by all crypto drivers implementing event crypto adapter.

---
 app/test/test_event_crypto_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +2 -3
index cff7ad61f..83f3214ca 100644
@@ -183,7 +183,7 @@ test_op_forward_mode(uint8_t session_less)
      cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
      cipher_xform.next = NULL;
 
-     cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+     cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
      cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
      op = rte_crypto_op_alloc(params.op_mpool,
@@ -373,7 +373,7 @@ test_op_new_mode(uint8_t session_less)
      cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
      cipher_xform.next = NULL;
 
-     cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+     cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
      cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
      op = rte_crypto_op_alloc(params.op_mpool,
--

2.17.1

#4 lore raw

PATCH 1/1 test/event_crypto: add check for adapter failure

In reply to Hemant Agrawal

Return err if the adapter creation is failed.

---
 app/test/test_event_crypto_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +5 -2
index 83f3214ca..275729ba6 100644
@@ -814,7 +814,8 @@ test_crypto_adapter_conf_op_forward_mode(void)
 	enum rte_event_crypto_adapter_mode mode;
 
 	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
-	test_crypto_adapter_conf(mode);
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+				"Failed to config crypto adapter");
 
 	return TEST_SUCCESS;
 }
@@ -825,7 +826,9 @@ test_crypto_adapter_conf_op_new_mode(void)
 	enum rte_event_crypto_adapter_mode mode;
 
 	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
-	test_crypto_adapter_conf(mode);
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+				"Failed to config crypto adapter");
+
 	return TEST_SUCCESS;
 }
 
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#5 lore raw

Re: [dpdk-dev] [PATCH] test/event_crypto: add check for adapter failure

Quoted 42 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: add check for adapter failure

Return err if the adapter creation is failed.

---
 app/test/test_event_crypto_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +5 -3
index 83f3214ca..275729ba6 100644
@@ -814,7 +814,8 @@ test_crypto_adapter_conf_op_forward_mode(void)
 	enum rte_event_crypto_adapter_mode mode;
 
 	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
-	test_crypto_adapter_conf(mode);
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+				"Failed to config crypto adapter");
 
 	return TEST_SUCCESS;
 }
@@ -825,7 +826,9 @@ test_crypto_adapter_conf_op_new_mode(void)
 	enum rte_event_crypto_adapter_mode mode;
 
 	mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
-	test_crypto_adapter_conf(mode);
+	TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+				"Failed to config crypto adapter");
+
 	return TEST_SUCCESS;
 }
 
--

2.17.1

#6 lore raw

Re: [dpdk-dev] [PATCH] test/event_crypto: add check for adapter failure

Quoted 2 lines · Abhinandan S

Changed to Acked-by: Abhinandan Gujjar <[email protected]> and Applied to dpdk-next-eventdev/master. Thanks.

Quoted 44 lines
Quoted 43 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: add check for adapter failure

Return err if the adapter creation is failed.

---
 app/test/test_event_crypto_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
app/test/test_event_crypto_adapter.c +5 -3
index 83f3214ca..275729ba6 100644
@@ -814,7 +814,8 @@ test_crypto_adapter_conf_op_forward_mode(void)
      enum rte_event_crypto_adapter_mode mode;
 
      mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
-     test_crypto_adapter_conf(mode);
+     TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+                             "Failed to config crypto adapter");
 
      return TEST_SUCCESS;
 }
@@ -825,7 +826,9 @@ test_crypto_adapter_conf_op_new_mode(void)
      enum rte_event_crypto_adapter_mode mode;
 
      mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
-     test_crypto_adapter_conf(mode);
+     TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+                             "Failed to config crypto adapter");
+
      return TEST_SUCCESS;
 }
 
--

2.17.1

Acked-by on v1 1/1
#7 lore raw
In reply to Hemant Agrawal
Quoted 37 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: [email protected]; Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: fix mempool name

The longer mempool name size is causing error in rte_mempool_create_empty for dpaa1

ret = snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name); This patch reduce the size of mempool name string

Fixes 24054e3640a2 ("test/crypto: use separate session mempools")
---
 app/test/test_event_crypto_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_event_crypto_adapter.c +1 -2
index 73655020d..cff7ad61f 100644
@@ -536,7 +536,7 @@ configure_cryptodev(void)
 			"session mempool allocation failed\n");
 
 	params.session_priv_mpool = rte_mempool_create(
-				"CRYPTO_ADAPTER_SESSION_MP_PRIV",
+				"CRYPTO_AD_SESS_MP_PRIV",
 				MAX_NB_SESSIONS,
 				session_size,
 				0, 0, NULL, NULL, NULL,
--

2.17.1

#8 lore raw
Quoted 2 lines · Abhinandan S

Changed to Acked-by: Abhinandan Gujjar <[email protected]> and Applied to dpdk-next-eventdev/master. Thanks.

Quoted 40 lines
Quoted 39 lines

-----Original Message-----
From: Hemant Agrawal <[email protected]>
Sent: Friday, September 27, 2019 1:46 PM
To: [email protected]; Gujjar, Abhinandan S <[email protected]>
Cc: [email protected]; Hemant Agrawal <[email protected]>
Subject: [PATCH] test/event_crypto: fix mempool name

The longer mempool name size is causing error in rte_mempool_create_empty for dpaa1

ret = snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_MZ_FORMAT, name); This patch reduce the size of mempool name string

Fixes 24054e3640a2 ("test/crypto: use separate session mempools")
---
 app/test/test_event_crypto_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_event_crypto_adapter.c +1 -2
index 73655020d..cff7ad61f 100644
@@ -536,7 +536,7 @@ configure_cryptodev(void)
                      "session mempool allocation failed\n");
 
      params.session_priv_mpool = rte_mempool_create(
-                             "CRYPTO_ADAPTER_SESSION_MP_PRIV",
+                             "CRYPTO_AD_SESS_MP_PRIV",
                              MAX_NB_SESSIONS,
                              session_size,
                              0, 0, NULL, NULL, NULL,
--

2.17.1