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 7EB96455AD for ; Mon, 15 Jul 2024 17:28:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79FB740A75; Mon, 15 Jul 2024 17:28:33 +0200 (CEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id B6276402DD for ; Mon, 15 Jul 2024 17:28:32 +0200 (CEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-426526d30aaso31044805e9.0 for ; Mon, 15 Jul 2024 08:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057312; x=1721662112; 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=iExbbLrB6dsBuQ8q82EkeXRAb8FzAAzPzs9q3f88WyY=; b=XE1gKFD0H49gPQofmO3mM+IFY2ksNQi60Ts2nzJGsAwfICatkE1vKK1INcsA4qB7Fm icK6QKn67XVWPomrAvEl7RXAnWTImNxbJUwPRhFcPDtH91QRhhSklflkW9th62BlA3Mz xu/Q4Rje3C4mu+Oc32ZpnPIIxDJ9VVol2BFGWJ5ey5SWJj2cxj6+ImuMuM76ynEqoZQh d+ssBi35jfQGQz644fLsDmoUVIacQ2P6vzm1pMaywbcHpnesQDZEkG5iZ82Y8MsWxDv0 ZeZesarU3qN/04m48IWuUi9WXHxew7cRO9bPuU6JGXJAS5Wk3G/oznm0Jvfmd5y3erF/ EUlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057312; x=1721662112; 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=iExbbLrB6dsBuQ8q82EkeXRAb8FzAAzPzs9q3f88WyY=; b=mx1uk8bsMPGOBlm5+tOWXrWNXvDQSpWzsm8Bx75KqPX7wjt/9k8n7uEQkG02YybrlN G9D+/d23WukSzrYVdRNfcTkYOwGkVzzj8izUjqobhC81yRXpaIDw+bc96/4SEUwh/rJa q9jK68Z4GLpuei4tISB7ju0PfN/itS+tO7i7AiRa6zjnoLSaXMMQ8FO7LI6L1DDSVNv3 kRT9P4/U65Y2547netsPs9ZdeBI0f/Lggm57N2+JWfUBGYddLULnKfBHzJ+rF8c89HQ2 3YDcUEDi3ignwkIXS+oM3hm0/O8e/lFTSlA1IBqqzyG11oxWvXbYSvHocygbR806ej9F q8RQ== X-Forwarded-Encrypted: i=1; AJvYcCV2eedLfbNd6H0hGxUnajxTjMqwnCiyWD7CdEF9ZZOU6rpbmOkQWOLUEmJl85444iUPPaQJjlMVAK2YY2f70M8= X-Gm-Message-State: AOJu0Ywf/x1+yjWg2b8Uwq/zukpKgC8nfbQPvRfCNfAI7CsQPlnq97Ai zxCN8NU1fZqsHqzZPhTzCc35dqobpFce20uGXMLs/NezAJlnACS8 X-Google-Smtp-Source: AGHT+IELRDC1YI501haakNU075NgNJD/6iQQnHMM2413pU6CJ3Anx3X2J/0bBvYq031AELTUMiJ7aw== X-Received: by 2002:a05:600c:6d8f:b0:426:6f0e:a60 with SMTP id 5b1f17b1804b1-426707e2ffdmr132189435e9.17.1721057312234; Mon, 15 Jul 2024 08:28:32 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f2cc244sm124878415e9.37.2024.07.15.08.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:28:31 -0700 (PDT) From: luca.boccassi@gmail.com 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 22.11.6 Date: Mon, 15 Jul 2024 16:26:04 +0100 Message-Id: <20240715152704.2229503-26-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 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 07/17/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/e8f3418f6405784a614cb1d527bee20213770082 Thanks. Luca Boccassi --- >From e8f3418f6405784a614cb1d527bee20213770082 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 45cd29f18b..c7a655003f 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -373,6 +373,7 @@ 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; @@ -507,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(&rule->salt, - &rule->cipher_key[key_len], 4); + memcpy(&salt, &rule->cipher_key[key_len], 4); + rule->salt = rte_be_to_cpu_32(salt); } cipher_algo_p = 1; @@ -572,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(&rule->salt, - &rule->auth_key[key_len], 4); + memcpy(&salt, &rule->auth_key[key_len], 4); + rule->salt = rte_be_to_cpu_32(salt); } auth_algo_p = 1; @@ -631,8 +632,8 @@ 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; continue; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:36.060115685 +0100 +++ 0026-examples-ipsec-secgw-fix-SA-salt-endianness.patch 2024-07-15 16:19:34.512205267 +0100 @@ -1 +1 @@ -From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001 +From e8f3418f6405784a614cb1d527bee20213770082 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 45cd29f18b..c7a655003f 100644 @@ -30 +31 @@ -@@ -374,6 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -373,6 +373,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -38 +39 @@ -@@ -508,8 +509,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -507,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -49 +50 @@ -@@ -573,8 +574,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -572,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, @@ -60 +61 @@ -@@ -632,8 +633,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, +@@ -631,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,