[dpdk-stable] patch 'common/cpt: fix encryption offset' has been queued to LTS release 18.11.10
Kevin Traynor
ktraynor at redhat.com
Thu Aug 20 17:33:13 CEST 2020
Hi,
FYI, your patch has been queued to LTS release 18.11.10
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/25/20. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/380fb4d751781f214a0055211700a88a8f730505
Thanks.
Kevin.
---
>From 380fb4d751781f214a0055211700a88a8f730505 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi at marvell.com>
Date: Fri, 3 Jul 2020 11:11:37 +0530
Subject: [PATCH] common/cpt: fix encryption offset
[ upstream commit 0058f30514f13e5d5412e97973a9c9254e36edb1 ]
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")
Signed-off-by: Ankur Dwivedi <adwivedi at 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 f47c96d934..ac6cd8d1eb 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -732,7 +732,4 @@ cpt_enc_hmac_prep(uint32_t flags,
m_dma += size;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
@@ -766,4 +763,9 @@ cpt_enc_hmac_prep(uint32_t flags,
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;
@@ -776,9 +778,4 @@ cpt_enc_hmac_prep(uint32_t flags,
}
- if (unlikely(hash_type == GMAC_TYPE)) {
- encr_offset = auth_dlen;
- enc_dlen = 0;
- }
-
if (unlikely(auth_dlen > enc_dlen)) {
inputlen = auth_dlen;
@@ -1085,7 +1082,4 @@ cpt_dec_hmac_prep(uint32_t flags,
mac_len = cpt_ctx->mac_len;
- if (hash_type == GMAC_TYPE)
- encr_data_len = 0;
-
if (unlikely(!(flags & VALID_IV_BUF))) {
iv_len = 0;
@@ -1144,4 +1138,9 @@ cpt_dec_hmac_prep(uint32_t flags,
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;
@@ -1155,7 +1154,4 @@ cpt_dec_hmac_prep(uint32_t flags,
}
- if (hash_type == GMAC_TYPE)
- encr_offset = inputlen;
-
vq_cmd_w0.u64 = 0;
vq_cmd_w0.s.param1 = rte_cpu_to_be_16(encr_data_len);
--
2.26.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-08-20 16:26:16.183979376 +0100
+++ 0008-common-cpt-fix-encryption-offset.patch 2020-08-20 16:26:15.767323807 +0100
@@ -1 +1 @@
-From 0058f30514f13e5d5412e97973a9c9254e36edb1 Mon Sep 17 00:00:00 2001
+From 380fb4d751781f214a0055211700a88a8f730505 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0058f30514f13e5d5412e97973a9c9254e36edb1 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 34ccd08a40..ab595eb580 100644
+index f47c96d934..ac6cd8d1eb 100644
@@ -21 +22 @@
-@@ -683,7 +683,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -732,7 +732,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -29 +30 @@
-@@ -717,4 +714,9 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -766,4 +763,9 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -39 +40 @@
-@@ -727,9 +729,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -776,9 +778,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -49 +50 @@
-@@ -1034,7 +1031,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1085,7 +1082,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -57 +58 @@
-@@ -1093,4 +1087,9 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1144,4 +1138,9 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -67 +68 @@
-@@ -1104,7 +1103,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1155,7 +1154,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -74 +75 @@
- vq_cmd_w0.s.param1 = encr_data_len;
+ vq_cmd_w0.s.param1 = rte_cpu_to_be_16(encr_data_len);
More information about the stable
mailing list