[v2,1/3] test/event_crypto: fix missing IV value for AES algo

Message ID 20191107090121.3246-1-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,1/3] test/event_crypto: fix missing IV value for AES algo |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues

Commit Message

Hemant Agrawal Nov. 7, 2019, 9:01 a.m. UTC
  The IV was not set, which was causing HW based SEC on DPAA1
to fail.

Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
Sending only the fixes. dropped the functional changes

 app/test/test_event_crypto_adapter.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
  

Comments

Jerin Jacob Nov. 18, 2019, 3:59 p.m. UTC | #1
On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> The IV was not set, which was causing HW based SEC on DPAA1
> to fail.
>
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes


Hi Abhinandan,

Can I merge this patch series?
  
Gujjar, Abhinandan S Nov. 18, 2019, 4:02 p.m. UTC | #2
Hi Jerin,

Last week, I was on vacation. So, could not review it.
I will try to finish this by tomorrow.

Regards
Abhinandan 

> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Monday, November 18, 2019 9:30 PM
> To: Hemant Agrawal <hemant.agrawal@nxp.com>
> Cc: dpdk-dev <dev@dpdk.org>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Subject: Re: [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
> 
> On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com>
> wrote:
> >
> > The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> > Sending only the fixes. dropped the functional changes
> 
> 
> Hi Abhinandan,
> 
> Can I merge this patch series?
  
Gujjar, Abhinandan S Nov. 19, 2019, 10:36 a.m. UTC | #3
For series:
Acked-by: abhinandan.gujjar@intel.com

I noticed that these patches have issue with "Intel-compilation".
Hope, it will be taken care before merging. 

> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Thursday, November 7, 2019 2:31 PM
> To: dev@dpdk.org
> Cc: jerinjacobk@gmail.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Subject: [PATCH v2 1/3] test/event_crypto: fix missing IV value for AES algo
> 
> The IV was not set, which was causing HW based SEC on DPAA1 to fail.
> 
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes
> 
>  app/test/test_event_crypto_adapter.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/app/test/test_event_crypto_adapter.c
> b/app/test/test_event_crypto_adapter.c
> index 652e458f0..bf83a6357 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -171,6 +171,7 @@ test_op_forward_mode(uint8_t session_less)
>  	struct rte_event ev;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -186,6 +187,11 @@ test_op_forward_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op,
> @@ -364,6 +370,7 @@ test_op_new_mode(uint8_t session_less)
>  	struct rte_mbuf *m;
>  	uint32_t cap;
>  	int ret;
> +	uint8_t cipher_key[17];
> 
>  	memset(&m_data, 0, sizeof(m_data));
> 
> @@ -379,6 +386,11 @@ test_op_new_mode(uint8_t session_less)
>  	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
>  	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
> 
> +	cipher_xform.cipher.key.data = cipher_key;
> +	cipher_xform.cipher.key.length = 16;
> +	cipher_xform.cipher.iv.offset = IV_OFFSET;
> +	cipher_xform.cipher.iv.length = 16;
> +
>  	op = rte_crypto_op_alloc(params.op_mpool,
>  			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
>  	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");
> --
> 2.17.1
  
Jerin Jacob Nov. 20, 2019, 1:39 p.m. UTC | #4
On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> The IV was not set, which was causing HW based SEC on DPAA1
> to fail.
>
> Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
> Sending only the fixes. dropped the functional changes


Could you fix the following check-git-log.sh errors and send the v3. I
can pull the v3 for rc3.

Wrong 'Fixes' reference:
        Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
        Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
        Fixes: cfe599b325e8 ("test/event_crypto: no service core when
HW support available")
  
Jerin Jacob Nov. 26, 2019, 5:55 a.m. UTC | #5
On Wed, Nov 20, 2019 at 10:39 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Thu, Nov 7, 2019 at 2:34 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
> >
> > The IV was not set, which was causing HW based SEC on DPAA1
> > to fail.
> >
> > Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
> >
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> > ---
> > Sending only the fixes. dropped the functional changes
>
>
> Could you fix the following check-git-log.sh errors and send the v3. I
> can pull the v3 for rc3.
>
> Wrong 'Fixes' reference:
>         Fixes: ce02103ad072 ("test/event_crypto: change the SEC cipher algo")
>         Fixes: 24054e3640a2 ("test/crypto: use separate session mempools");
>         Fixes: cfe599b325e8 ("test/event_crypto: no service core when
> HW support available")

Fixed the wrong references.

Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

Series applied to dpdk-next-eventdev/master. Thanks.
  

Patch

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 652e458f0..bf83a6357 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -171,6 +171,7 @@  test_op_forward_mode(uint8_t session_less)
 	struct rte_event ev;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -186,6 +187,11 @@  test_op_forward_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op,
@@ -364,6 +370,7 @@  test_op_new_mode(uint8_t session_less)
 	struct rte_mbuf *m;
 	uint32_t cap;
 	int ret;
+	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -379,6 +386,11 @@  test_op_new_mode(uint8_t session_less)
 	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
 	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
+	cipher_xform.cipher.key.data = cipher_key;
+	cipher_xform.cipher.key.length = 16;
+	cipher_xform.cipher.iv.offset = IV_OFFSET;
+	cipher_xform.cipher.iv.length = 16;
+
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
 	TEST_ASSERT_NOT_NULL(op, "Failed to allocate crypto_op!\n");