patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:50:28 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
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/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=613a4879b46c4171b7b63458c81937de20487831
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 613a4879b46c4171b7b63458c81937de20487831 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Date: Mon, 29 Jul 2024 12:57:54 +0000
Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
The previous commit swapped the bytes of SA salt which
led to incorrect work of the ipsec-secgw application.
This patch reverts the previous commit and changes
the type of the salt field in the ipsec_sa structure.
Fixes: e6bfd9676109 ("examples/ipsec-secgw: fix SA salt endianness")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/sa.c | 13 ++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 29b9b283f0..649fb36871 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -117,7 +117,7 @@ struct ipsec_sa {
uint32_t spi;
struct cdev_qp *cqp[RTE_MAX_LCORE];
uint64_t seq;
- uint32_t salt;
+ rte_be32_t salt;
uint32_t fallback_sessions;
enum rte_crypto_cipher_algorithm cipher_algo;
enum rte_crypto_auth_algorithm auth_algo;
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7a90acaec2..6ae0e49fd7 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -374,7 +374,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
uint32_t ti; /*token index*/
uint32_t *ri /*rule index*/;
struct ipsec_sa_cnt *sa_cnt;
- rte_be32_t salt; /*big-endian salt*/
uint32_t cipher_algo_p = 0;
uint32_t auth_algo_p = 0;
uint32_t aead_algo_p = 0;
@@ -509,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
}
cipher_algo_p = 1;
@@ -574,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->auth_key_len = key_len;
rule->iv_len = algo->iv_len;
- memcpy(&salt, &rule->auth_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->auth_key[key_len], 4);
}
auth_algo_p = 1;
@@ -633,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
aead_algo_p = 1;
continue;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:07.260847122 +0800
+++ 0151-examples-ipsec-secgw-revert-SA-salt-endianness.patch 2024-08-12 20:44:02.585069391 +0800
@@ -1 +1 @@
-From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001
+From 613a4879b46c4171b7b63458c81937de20487831 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index a83fd2283b..1fe6b97168 100644
+index 29b9b283f0..649fb36871 100644
@@ -25 +27 @@
-@@ -117,7 +117,7 @@ struct __rte_cache_aligned ipsec_sa {
+@@ -117,7 +117,7 @@ struct ipsec_sa {
@@ -35 +37 @@
-index 8aa9aca739..c4bac17cd7 100644
+index 7a90acaec2..6ae0e49fd7 100644
More information about the stable
mailing list