* [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset
[not found] <1591853907-2501-1-git-send-email-adwivedi@marvell.com>
@ 2020-07-03 5:41 ` Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature Ankur Dwivedi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ankur Dwivedi @ 2020-07-03 5:41 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, akhil.goyal, anoobj, Ankur Dwivedi, stable
In case of gmac auth the encryption offset should be set to zero.
Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
Fixes: 177b41ceee61 ("common/cpt: add microcode interface for decryption")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
drivers/common/cpt/cpt_ucode.h | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 34ccd08..ab595eb 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -682,9 +682,6 @@
m_vaddr = (uint8_t *)m_vaddr + size;
m_dma += size;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
iv_offset = ENCR_IV_OFFSET(d_offs);
@@ -716,6 +713,11 @@
opcode.s.major = CPT_MAJOR_OP_FC;
opcode.s.minor = 0;
+ if (hash_type == GMAC_TYPE) {
+ encr_offset = 0;
+ encr_data_len = 0;
+ }
+
auth_dlen = auth_offset + auth_data_len;
enc_dlen = encr_data_len + encr_offset;
if (unlikely(encr_data_len & 0xf)) {
@@ -726,11 +728,6 @@
enc_dlen = ROUNDUP16(encr_data_len) + encr_offset;
}
- if (unlikely(hash_type == GMAC_TYPE)) {
- encr_offset = auth_dlen;
- enc_dlen = 0;
- }
-
if (unlikely(auth_dlen > enc_dlen)) {
inputlen = auth_dlen;
outputlen = auth_dlen + mac_len;
@@ -1033,9 +1030,6 @@
hash_type = cpt_ctx->hash_type;
mac_len = cpt_ctx->mac_len;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
iv_offset = ENCR_IV_OFFSET(d_offs);
@@ -1092,6 +1086,11 @@
opcode.s.major = CPT_MAJOR_OP_FC;
opcode.s.minor = 1;
+ if (hash_type == GMAC_TYPE) {
+ encr_offset = 0;
+ encr_data_len = 0;
+ }
+
enc_dlen = encr_offset + encr_data_len;
auth_dlen = auth_offset + auth_data_len;
@@ -1103,9 +1102,6 @@
outputlen = enc_dlen;
}
- if (hash_type == GMAC_TYPE)
- encr_offset = inputlen;
-
vq_cmd_w0.u64 = 0;
vq_cmd_w0.s.param1 = encr_data_len;
vq_cmd_w0.s.param2 = auth_data_len;
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Ankur Dwivedi
@ 2020-07-03 5:41 ` Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 6/8] crypto/octeontx2: " Ankur Dwivedi
2020-07-04 19:57 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Akhil Goyal
2 siblings, 0 replies; 4+ messages in thread
From: Ankur Dwivedi @ 2020-07-03 5:41 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, akhil.goyal, anoobj, Ankur Dwivedi, stable
This reverts commit 32b8f26adf8b26a55230408ff6adffd4b2327e52.
For SNOW and ZUC algos the offset value for enryption and decryption
is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA
feature is not supported by the octeontx crypto pmd.
Fixes: 32b8f26adf8b ("crypto/octeontx: enable non-byte aligned data")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
doc/guides/cryptodevs/features/octeontx.ini | 1 -
drivers/crypto/octeontx/otx_cryptodev_ops.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/doc/guides/cryptodevs/features/octeontx.ini b/doc/guides/cryptodevs/features/octeontx.ini
index 09affb2..4ce4ff1 100644
--- a/doc/guides/cryptodevs/features/octeontx.ini
+++ b/doc/guides/cryptodevs/features/octeontx.ini
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y
OOP SGL In SGL Out = Y
RSA PRIV OP KEY QT = Y
Symmetric sessionless = Y
-Non-Byte aligned data = Y
;
; Supported crypto algorithms of 'octeontx' crypto driver.
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 8f58fe2..2cedf7d 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -979,7 +979,6 @@
RTE_CRYPTODEV_FF_IN_PLACE_SGL |
RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
- RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
break;
default:
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v2 6/8] crypto/octeontx2: revert non-byte aligned data feature
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature Ankur Dwivedi
@ 2020-07-03 5:41 ` Ankur Dwivedi
2020-07-04 19:57 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Akhil Goyal
2 siblings, 0 replies; 4+ messages in thread
From: Ankur Dwivedi @ 2020-07-03 5:41 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, akhil.goyal, anoobj, Ankur Dwivedi, stable
This reverts commit 51f3e107aca23a1cbc1a5ad9fdce7921340307b5.
For SNOW and ZUC algos the offset value for enryption and decryption
is converted to bytes. Hence RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA
feature is not supported by the octeontx2 crypto pmd.
Fixes: 51f3e107aca2 ("crypto/octeontx2: enable non-byte aligned data")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
doc/guides/cryptodevs/features/octeontx2.ini | 1 -
drivers/crypto/octeontx2/otx2_cryptodev.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/doc/guides/cryptodevs/features/octeontx2.ini b/doc/guides/cryptodevs/features/octeontx2.ini
index cdcaf70..e9ce26c 100644
--- a/doc/guides/cryptodevs/features/octeontx2.ini
+++ b/doc/guides/cryptodevs/features/octeontx2.ini
@@ -13,7 +13,6 @@ OOP SGL In LB Out = Y
OOP SGL In SGL Out = Y
RSA PRIV OP KEY QT = Y
Symmetric sessionless = Y
-Non-Byte aligned data = Y
;
; Supported crypto algorithms of 'octeontx2' crypto driver.
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 6ffbc2e..7cda077 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -104,7 +104,6 @@
RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT |
- RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
return 0;
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 6/8] crypto/octeontx2: " Ankur Dwivedi
@ 2020-07-04 19:57 ` Akhil Goyal
2 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2020-07-04 19:57 UTC (permalink / raw)
To: Ankur Dwivedi, dev; +Cc: declan.doherty, anoobj, stable
> In case of gmac auth the encryption offset should be set to zero.
>
> Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
> Fixes: 177b41ceee61 ("common/cpt: add microcode interface for decryption")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> ---
Series applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-04 19:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1591853907-2501-1-git-send-email-adwivedi@marvell.com>
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 5/8] crypto/octeontx: revert non-byte aligned data feature Ankur Dwivedi
2020-07-03 5:41 ` [dpdk-stable] [PATCH v2 6/8] crypto/octeontx2: " Ankur Dwivedi
2020-07-04 19:57 ` [dpdk-stable] [PATCH v2 1/8] common/cpt: fix encryption offset Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).