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 86913456E6 for ; Tue, 30 Jul 2024 01:33:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72DB64069F; Tue, 30 Jul 2024 01:33:35 +0200 (CEST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id 630FD4069D for ; Tue, 30 Jul 2024 01:33:33 +0200 (CEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-427b1d4da32so13280315e9.0 for ; Mon, 29 Jul 2024 16:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722296013; x=1722900813; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J/zfDGCbQeeWGNnu7zzaep/Feif2FJlyS+MTZYzLdNc=; b=LN8EMtV8m/AjJ3KEKD3qvn47+zhCP9OiFTYiB1j6Q6FdXNDjUfYtGE9q/PfNgJwGSm LQOneX+qfjoHIe/tuzdw1xnGevlO12LOHTwcQclQ400lO31R0beftx5iKZtz+fqF5ACu 6VGt+BAG6XQxNdSjOoGZAZnjvgznFGGilhWNSJsGxhxiHjwlkYxxriu1gOIsrLOxaLnx tohv+jB4bHZsU0ctVrOxHaZIr5GlBWOdxo/GRj+TPP7zQfHpaLz51L6d2/P9VHQ9+JHm ksQaky8vSNMM5QPay3si1pzU5Wf+bwDcO1xJV/gEkqN1YrT78sWHh6xHrvNPwq9dvNs0 zxkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722296013; x=1722900813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J/zfDGCbQeeWGNnu7zzaep/Feif2FJlyS+MTZYzLdNc=; b=m5G80+nnTBPNqYcxqzGoaEwn9sVuJ7c54a2l23GEUoCTgJGdiiwyYC2qPoETmA6CKC Ho7DD/FdpkP1DafaQnxTWCQH4C0xWJlUf+WnaPG/NvolE809n0CTVd39B3pMBGJWxQwz 6CQU1bfy7PHmqrdF7bHSbL4eah57VppzAxsr1qHE5YQbdCRtugis5bNHN0cwT15qtnOu XQBj6O7tJBLQI4UBopjw/U6OBk11MfBkLwFnt6gKmaxoEzVnD5YrDUs9t5NICvYuvQfB 92mxOsDhgFNcKCqoQKZVIwOuRbfpiGY+j0VuCwMZCexJ3aceIozC67kscHiL68ytSFKS ziIA== X-Forwarded-Encrypted: i=1; AJvYcCU92385xi6aJy5ISJjQqsgBVw5crP6IWkkjkgZA5nhsfi6m1Z24QhcNmPoeaAMv/4dOkenI7dy/xChV09LDwRM= X-Gm-Message-State: AOJu0YxtdCsCAQhDzJueS6CY5ZjFvebXHVrqVABl2vEiDA1IJDcJeJMY uaREqWIeaEVCt1Uy3HxkastmA0CyT1VP8Yi2d3cuNTV+4attlaZNW/M8X5Yl X-Google-Smtp-Source: AGHT+IGquYBhS8SAimIBNIPmb7Hp5V6bUAtDYyC2kBvQcTw+paQqUsgKWb3RxOWcdMrMfBEm8P0S0A== X-Received: by 2002:a05:6000:18aa:b0:367:89ae:c204 with SMTP id ffacd0b85a97d-36b8c8e5d30mr129080f8f.12.1722296012528; Mon, 29 Jul 2024 16:33:32 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428054b9196sm191660645e9.0.2024.07.29.16.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 16:33:31 -0700 (PDT) From: luca.boccassi@gmail.com To: Vladimir Medvedkin Cc: Radu Nicolau , dpdk stable Subject: patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 22.11.6 Date: Tue, 30 Jul 2024 00:33:27 +0100 Message-Id: <20240729233329.2683538-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240724113318.616754-40-luca.boccassi@gmail.com> References: <20240724113318.616754-40-luca.boccassi@gmail.com> MIME-Version: 1.0 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 22.11.6 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/01/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Thanks. Luca Boccassi --- >From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Mon, 29 Jul 2024 12:57:54 +0000 Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness [ 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 Acked-by: Radu Nicolau --- 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 5217e28f8a..13694ee1e0 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 c7a655003f..45cd29f18b 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -373,7 +373,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; @@ -508,8 +507,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; @@ -573,8 +572,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; @@ -632,8 +631,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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-30 00:33:03.359903055 +0100 +++ 0001-examples-ipsec-secgw-revert-SA-salt-endianness.patch 2024-07-30 00:33:03.301030141 +0100 @@ -1 +1 @@ -From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001 +From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index a83fd2283b..1fe6b97168 100644 +index 5217e28f8a..13694ee1e0 100644 @@ -25 +26 @@ -@@ -117,7 +117,7 @@ struct __rte_cache_aligned ipsec_sa { +@@ -117,7 +117,7 @@ struct ipsec_sa { @@ -35 +36 @@ -index 8aa9aca739..c4bac17cd7 100644 +index c7a655003f..45cd29f18b 100644 @@ -38 +39 @@ -@@ -374,7 +374,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -373,7 +373,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -46 +47 @@ -@@ -509,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -508,8 +507,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -57 +58 @@ -@@ -574,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -573,8 +572,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -68 +69 @@ -@@ -633,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -632,8 +631,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,