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 6D67841EA5 for ; Wed, 15 Mar 2023 23:47:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69706410DD; Wed, 15 Mar 2023 23:47:39 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 7025D40141 for ; Wed, 15 Mar 2023 23:47:38 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id m35so15822wms.4 for ; Wed, 15 Mar 2023 15:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678920458; 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=DyPiFwR3vEB7PuynM37cUU6VP84TMAnK5nrugCQ18d4=; b=HyA+F+mdRzXod1YZmuHE8z0UGujyi9AvVIakjLkR7igPhke8hZOwFGwZYD9DXRbmCX Q+mAa0Kpv30cGZmiTZ2wvO65gHkfGMu/j1wajAkqlPliW5t3xwU3XPeC95Q2dGmlhATP lpHmM0qUKz834udzzzuN/BDO86BusANiF3EqUj1zyjnTcV9niZcii2C42XLHkyzlWYXo 080bi6DMOR1sp1kdeOAkkp9/9aazPjMJq1+ZuEDwJRmGiyvjc4H72M5+C0rkjf0qeuZV Cqsor5KWSCNGuFaKcJNoGY68ybyajOOvLV1J5q6DiybfQCaV/4tk0GPTNk5EJjl+G3+p jq2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678920458; 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=DyPiFwR3vEB7PuynM37cUU6VP84TMAnK5nrugCQ18d4=; b=lVADW1wmb8t4cURtRb9EKLVOnkrx95GI+n5S+GKX76cjlUhk/C1pzTvuldxVt9gT0E NCqaqkkwdtmb1jG/Gm1LuzJK+37B7flY71HLEbi/ZIGKki8vJAb13gNKWWuWecO2auQG TDfsx5b/1BGT3RGey7rYIqDBkbt1DLG0t1OGL+8UiMwuW6+m7oGzesvkXhV4yvLr/xkU lh6MOQsKz0gTi9SKIVfBOVn7MTEcL8qAFaGFOc0h7l6KwTvjKuCfxXFSuaXTA5EkBYDN aVUOucbG57N+3wfdUFqTC3jbq/4vIICmNWfT1PW69RxWpBpxNaQ1RZyaFnw/6/JXkwLi vfbA== X-Gm-Message-State: AO0yUKXSjODJvowf889XM27GmqFpdIISnv8GlxwhJPqX+fmnN7CISG4y oM43X0wRKsM36ZXkjhczT78= X-Google-Smtp-Source: AK7set9bf9uXb3zDxEScNGxnmqEoQxh7Voyk6MvcJtl5rqFtzOIr1mg1563lvdmlX3hZ8amFPGF1fA== X-Received: by 2002:a05:600c:314d:b0:3eb:3945:d3fd with SMTP id h13-20020a05600c314d00b003eb3945d3fdmr19732953wmo.14.1678920458126; Wed, 15 Mar 2023 15:47:38 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id fk4-20020a05600c0cc400b003e0015c8618sm3153318wmb.6.2023.03.15.15.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 15:47:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix possible truncation of hash key when config' has been queued to stable release 20.11.8 Date: Wed, 15 Mar 2023 22:46:15 +0000 Message-Id: <20230315224631.1025649-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315224631.1025649-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-71-luca.boccassi@gmail.com> <20230315224631.1025649-1-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 20.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 03/17/23. 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/add16de717b4b9df71d3d554dab231179a234e2d Thanks. Luca Boccassi --- >From add16de717b4b9df71d3d554dab231179a234e2d Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:03 +0800 Subject: [PATCH] net/hns3: fix possible truncation of hash key when config [ upstream commit bb38316e738ad6009b3f20b3abfaf27ea8cb0202 ] The hash key length of hns3 driver is obtained from firmware. If the length is a multiple of HNS3_RSS_HASH_KEY_NUM (16), the last part of hash key will be truncated. Fixes: 88347111eb53 ("net/hns3: refactor set RSS hash algorithm and key interface") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index c38e12f79d..6478150f7b 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -301,7 +301,8 @@ hns3_set_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo, req->hash_config |= (hash_algo & HNS3_RSS_HASH_ALGO_MASK); req->hash_config |= (idx << HNS3_RSS_HASH_KEY_OFFSET_B); - if (idx == max_bd_num - 1) + if (idx == max_bd_num - 1 && + (key_len % HNS3_RSS_HASH_KEY_NUM) != 0) cur_key_size = key_len % HNS3_RSS_HASH_KEY_NUM; else cur_key_size = HNS3_RSS_HASH_KEY_NUM; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-15 22:44:51.020029637 +0000 +++ 0024-net-hns3-fix-possible-truncation-of-hash-key-when-co.patch 2023-03-15 22:44:49.615850932 +0000 @@ -1 +1 @@ -From bb38316e738ad6009b3f20b3abfaf27ea8cb0202 Mon Sep 17 00:00:00 2001 +From add16de717b4b9df71d3d554dab231179a234e2d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bb38316e738ad6009b3f20b3abfaf27ea8cb0202 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index d6e0754273..2011c18b9b 100644 +index c38e12f79d..6478150f7b 100644 @@ -23 +24 @@ -@@ -301,7 +301,8 @@ hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo, +@@ -301,7 +301,8 @@ hns3_set_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo,