From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B92DA45804 for ; Fri, 23 Aug 2024 18:22:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8ADB4337A; Fri, 23 Aug 2024 18:22:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C545043388 for ; Fri, 23 Aug 2024 18:22:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Bd5BNC4yazmQ5fPq7r6InM4DdqNWOGQsuQP1cJTFV4=; b=GGkLTuO+d8ofFy25sN8ImJ7zAfH5gPbM5sVnIkYrWQoQDIJZEzum0ujhqTEvGZP6fsA9TM NN8oPEZRoOqe+FKdIdHOR5qktHm17w/XQJy4XCfr+NOTgSC2LX+Mx8p9igcnHEhqDA0QX5 co0pMZpVnPoNbWGorPsjZN25/cEjY0Q= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-DX6_aH5nN3Ozfr6CIZ7HzA-1; Fri, 23 Aug 2024 12:22:07 -0400 X-MC-Unique: DX6_aH5nN3Ozfr6CIZ7HzA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0006B1955BF7; Fri, 23 Aug 2024 16:22:05 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 16B7E1955F44; Fri, 23 Aug 2024 16:22:03 +0000 (UTC) From: Kevin Traynor To: Shihong Wang Cc: Chaoyong He , Akhil Goyal , dpdk stable Subject: patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:18:17 +0100 Message-ID: <20240823161929.1004778-69-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.8 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/28/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Thanks. Kevin --- >From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001 From: Shihong Wang Date: Thu, 14 Mar 2024 10:00:52 +0800 Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ] The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s value is stored in an array of encryption or authentication keys according to big-endian. So it maybe need to convert the endianness order to ensure that the value assigned to the SA salt is CPU-endian. Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt") Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms") Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters") Signed-off-by: Shihong Wang Reviewed-by: Chaoyong He Acked-by: Akhil Goyal --- examples/ipsec-secgw/sa.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 49d16f055b..af3a92f53e 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, 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; @@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, key_len -= 4; rule->cipher_key_len = key_len; - memcpy(&rule->salt, - &rule->cipher_key[key_len], 4); + memcpy(&salt, &rule->cipher_key[key_len], 4); + rule->salt = rte_be_to_cpu_32(salt); } @@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, rule->auth_key_len = key_len; rule->iv_len = algo->iv_len; - memcpy(&rule->salt, - &rule->auth_key[key_len], 4); + memcpy(&salt, &rule->auth_key[key_len], 4); + rule->salt = rte_be_to_cpu_32(salt); } @@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, key_len -= 4; rule->cipher_key_len = key_len; - memcpy(&rule->salt, - &rule->cipher_key[key_len], 4); + memcpy(&salt, &rule->cipher_key[key_len], 4); + rule->salt = rte_be_to_cpu_32(salt); aead_algo_p = 1; -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:11.871795930 +0100 +++ 0069-examples-ipsec-secgw-fix-SA-salt-endianness.patch 2024-08-23 17:18:09.746430196 +0100 @@ -1 +1 @@ -From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001 +From db8d7d17a9e8b79c8b6bae2044a6fcb819b33700 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index c4bac17cd7..8aa9aca739 100644 +index 49d16f055b..af3a92f53e 100644 @@ -30 +31 @@ -@@ -375,4 +375,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -366,4 +366,5 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -36 +37 @@ -@@ -509,6 +510,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -500,6 +501,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -45 +46 @@ -@@ -574,6 +575,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -565,6 +566,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -54 +55 @@ -@@ -633,6 +634,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -624,6 +625,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,