Skip to contentSkip to conversation

test/event_crypto_adapter: set cipher operation in transform

PATCH Superseded Ankur Dwivedi 3 participants 9 messages Jan 8, 2021 – Jan 26, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/event_crypto_adapter: set cipher operation in transform

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +2 -0
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
Signature · 1 line
2.28.0
#1 lore raw
Quoted 6 lines · Ankur Dwivedi

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")

@Gujjar, Abhinandan S

Please review this.

Quoted 27 lines
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +2 -1
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
        op = rte_crypto_op_alloc(params.op_mpool,
                        RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
        op = rte_crypto_op_alloc(params.op_mpool,
                        RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

#2 lore raw
In reply to Ankur Dwivedi

Hi Ankur,

Quoted 24 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Friday, January 8, 2021 2:11 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH] test/event_crypto_adapter: set cipher operation in transform

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +0 -0
index a0169aa6cf..335211cd8c 100644

app/test/test_event_crypto_adapter.c test_op_forward_mode(uint8_t session_less) · line 186

Quoted 4 lines
app/test/test_event_crypto_adapter.c +1 -0
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;

NULL PMD does not refer " RTE_CRYPTO_CIPHER_OP_ENCRYPT ". Is your test code failing without this change?

Quoted 13 lines
app/test/test_event_crypto_adapter.c +1 -1
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

#3 lore raw

Hi Abhinandan,

Quoted 33 lines

-----Original Message-----
From: Gujjar, Abhinandan S <[email protected]>
Sent: Monday, January 18, 2021 2:42 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

External Email

----------------------------------------------------------------------
Hi Ankur,

Quoted 19 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Friday, January 8, 2021 2:11 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH] test/event_crypto_adapter: set cipher operation in transform

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 12 lines

app/test/test_event_crypto_adapter.c test_op_forward_mode(uint8_t session_less) · line 186

Quoted 10 lines
app/test/test_event_crypto_adapter.c +1 -0
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;

NULL PMD does not refer " RTE_CRYPTO_CIPHER_OP_ENCRYPT ". Is your test code failing without this change?

[Ankur] Yes the test is failing, because in octeontx2 crypto pmd, during crypto session configure there is a check for the cipher xform op. If the op does not match either encrypt or decrypt, the session configure fails.

Quoted 13 lines
Quoted 13 lines
app/test/test_event_crypto_adapter.c +1 -1
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

#4 lore raw

Hi Ankur,

Quoted 56 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Monday, January 18, 2021 5:04 PM
To: Gujjar, Abhinandan S <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

Hi Abhinandan,

Quoted 33 lines

-----Original Message-----
From: Gujjar, Abhinandan S <[email protected]>
Sent: Monday, January 18, 2021 2:42 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

External Email

----------------------------------------------------------------------
Hi Ankur,

Quoted 19 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Friday, January 8, 2021 2:11 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH] test/event_crypto_adapter: set cipher operation in transform

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")
---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 12 lines

app/test/test_event_crypto_adapter.c test_op_forward_mode(uint8_t session_less) · line 186

Quoted 10 lines
app/test/test_event_crypto_adapter.c +1 -0
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;

NULL PMD does not refer " RTE_CRYPTO_CIPHER_OP_ENCRYPT ". Is your test code failing without this change?

Quoted 3 lines

[Ankur] Yes the test is failing, because in octeontx2 crypto pmd, during crypto session configure there is a check for the cipher xform op. If the op does not match either encrypt or decrypt, the session configure fails.

[Abhinandan] Ok. I have not come across such issue on my system. Could you please add more details into the commit message of the patch and send?

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
app/test/test_event_crypto_adapter.c +1 -1
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

#5 lore raw

Hi Abhinandan,

Quoted 72 lines

-----Original Message-----
From: Gujjar, Abhinandan S <[email protected]>
Sent: Monday, January 18, 2021 5:41 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

External Email

----------------------------------------------------------------------
Hi Ankur,

Quoted 58 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Monday, January 18, 2021 5:04 PM
To: Gujjar, Abhinandan S <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

Hi Abhinandan,

Quoted 47 lines

-----Original Message-----
From: Gujjar, Abhinandan S <[email protected]>
Sent: Monday, January 18, 2021 2:42 PM
To: Ankur Dwivedi <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Anoob Joseph <[email protected]>
Subject: [EXT] RE: [PATCH] test/event_crypto_adapter: set cipher operation in transform

External Email

---------------------------------------------------------------------
-
Hi Ankur,

Quoted 26 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Friday, January 8, 2021 2:11 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH] test/event_crypto_adapter: set cipher operation in transform

The cipher operation in the transform should be set to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix

configuration")

---
 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +0 -0
index a0169aa6cf..335211cd8c 100644

app/test/test_event_crypto_adapter.c test_op_forward_mode(uint8_t session_less) · line 186

Quoted 4 lines
app/test/test_event_crypto_adapter.c +1 -0
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;

NULL PMD does not refer " RTE_CRYPTO_CIPHER_OP_ENCRYPT ". Is your test code failing without this change?

Quoted 7 lines
Quoted 3 lines

[Ankur] Yes the test is failing, because in octeontx2 crypto pmd, during crypto session configure there is a check for the cipher xform op. If the op does not match either encrypt or decrypt, the session configure

fails.
[Abhinandan] Ok. I have not come across such issue on my system. Could you please add more details into the commit message of the patch and send?

[Ankur] Sure. I will update the commit message in v2.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
app/test/test_event_crypto_adapter.c +1 -1
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

#6 lore raw

PATCH v2 1/1 test/event_crypto_adapter: set cipher operation in transform

In reply to Ankur Dwivedi

The symmetric session configure callback function in OCTEON TX2 crypto PMD returns error if the cipher operation is not set to either encrypt or decrypt. This patch sets the cipher operation for the null cipher to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")

---
v2:
* Updated the commit message with details.

 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +2 -0
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
Signature · 1 line
2.28.0
Acked-by on v2 1/1
#7 lore raw

Thanks & Regards
Abhinandan

Quoted 47 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Monday, January 18, 2021 9:50 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH v2] test/event_crypto_adapter: set cipher operation in transform

The symmetric session configure callback function in OCTEON TX2 crypto PMD returns error if the cipher operation is not set to either encrypt or decrypt. This patch sets the cipher operation for the null cipher to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")

---
v2:
* Updated the commit message with details.

 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +2 -1
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0

Applied
#8 lore raw
Quoted 2 lines · Abhinandan S

Applied to dpdk-next-eventdev/for-main. Thanks.

Quoted 52 lines

Thanks & Regards
Abhinandan

Quoted 47 lines

-----Original Message-----
From: Ankur Dwivedi <[email protected]>
Sent: Monday, January 18, 2021 9:50 PM
To: [email protected]
Cc: [email protected]; Gujjar, Abhinandan S <[email protected]>; [email protected]; [email protected]; [email protected]; Ankur Dwivedi <[email protected]>
Subject: [PATCH v2] test/event_crypto_adapter: set cipher operation in transform

The symmetric session configure callback function in OCTEON TX2 crypto PMD returns error if the cipher operation is not set to either encrypt or decrypt. This patch sets the cipher operation for the null cipher to encrypt.

Fixes 74449375237f ("test/event_crypto_adapter: fix configuration")

---
v2:
* Updated the commit message with details.

 app/test/test_event_crypto_adapter.c | 2 ++
 1 file changed, 2 insertions(+)
app/test/test_event_crypto_adapter.c +2 -1
index a0169aa6cf..335211cd8c 100644
@@ -183,6 +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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
      op = rte_crypto_op_alloc(params.op_mpool,
                      RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -382,6 +383,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.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
 
      op = rte_crypto_op_alloc(params.op_mpool,
                      RTE_CRYPTO_OP_TYPE_SYMMETRIC);
--

2.28.0