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 6D457A034F for ; Wed, 10 Nov 2021 07:56:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6705240142; Wed, 10 Nov 2021 07:56:08 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2051.outbound.protection.outlook.com [40.107.244.51]) by mails.dpdk.org (Postfix) with ESMTP id DA60540142 for ; Wed, 10 Nov 2021 07:56:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gPNYD9F9bus5D1AMab4B8AWbnrDXtuHjra5JGjMGTGyzL2UwdQBJbbyb4QtBpY2Xpep3XIMoPjwSbSPEbtURXUnwczGeOiGcmV/aQ+QjGybDV5+k8NmNXwJ7hUjeNtU+9BJZIeWKm2zA7/SqEkg3DBfXLODr0WbOZHZZqrLlDsUrqbdT+2vjuHixCzFQpHckN8JucKJf/3Zz3/NaxA7nHJeYiiO97qnYnRwHcwdPfPvOMtPjMFhkZlVZLclV2MgrR3RSvo9Is4wjmIi17iLmRdOizL+vjvupDsPO1CgZqzPMkYnxojSINhJmGpIzero137j6R1F1yOd1LjXyX4AvaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6C0EU0TyItubnEo9Vpl7lxSjcA4/kbVpw20QkCKvTko=; b=U2MMCG0sheNfsxcODbgxgiNEQqIKjyLN7UUl1wR/Ke7vgLGK6YZoo2P2v3rSYX7+obhWp0L4qjCWy+Oz4GkAiYZ/HVGoCCXoBcmnZZVu6Ci0iQf/OukJJJX9pboUr2YVVc7AHwmASUMd3hlbQY4tsjFpHfL1G540GIYFUeZtohzZ3Azvz8hq46RbaZl8X53F/RwaGp5Kou2kKLwQNuND+cRROZRURiYFe8M3x2ZJk0m4gBRuVW68AyIjex7QtX82r2HbZON85A6XiBfrmYD91Jh1WPfEOgvKj1tjDhEVunoGMPYO1E+aIQICg7dT+2ru8IQ5gow8AqZRB8UhQHXtZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6C0EU0TyItubnEo9Vpl7lxSjcA4/kbVpw20QkCKvTko=; b=Z5qimQ9a9tyl7ChvIn+o8vzglDED+KkrpmUAqJMwj6eJ3qOF9tP4FYYv+ys1EOmW7wJxzMu1j0hbSObH2h3j9i7bJec5Bt6WUWiRrWNLPMRRWhw2CPqIbteZq5VNLwNcBznbBrmZa9yo/pra90xPrHtoSkSuWNA1ORIqBCRrhx1DFjvH9wRbtf8jQNsJFy0O+i2owVAwwfn29US6eiHGx66rNrX09aB7anh7hoMOiVaXXwbRj+ZKyG6h6scbK8LuX/uXL0MRPUaJTgEHz46AjLL3EuWrMI3yy3rvetCnGRS0faVceCx+j6gghQGnYMqclSFLKJ0QCVpVfCfh4GffwA== Received: from DM5PR07CA0071.namprd07.prod.outlook.com (2603:10b6:4:ad::36) by MN2PR12MB3262.namprd12.prod.outlook.com (2603:10b6:208:102::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:56:03 +0000 Received: from DM6NAM11FT062.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::fc) by DM5PR07CA0071.outlook.office365.com (2603:10b6:4:ad::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:56:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT062.mail.protection.outlook.com (10.13.173.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:56:00 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:55:58 +0000 From: Xueming Li To: Maxime Coquelin CC: Luca Boccassi , Xiaoyun Li , Chenbo Xia , dpdk stable Date: Wed, 10 Nov 2021 14:31:38 +0800 Message-ID: <20211110063216.2744012-215-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 80a3f585-ed6c-49cb-436c-08d9a41727dc X-MS-TrafficTypeDiagnostic: MN2PR12MB3262: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2vE0XZrrMd6rZhNYxAXxoKVCl5DBvjgkaVGYoQ74SUPk8NzoxDEkTS/7VAth4CWrr1Fp9z/sGv1ve2bmVcJEyYxyJiFa9m/kt7L/BXaq0+FPiz/oavPkpEQ/jEDJxqtygR8mPer4XtfEPzKTj3JWUCPngfmzRs/cPvHlqAxSdb58/+04znDoQhiY56lKzRRJHBV+k53Q+2TQeKXHMaICjekoQDmU6vtSUydLghdsYPJJDNA/dI9DPCSYnG5NrZ9am5uGbv6N6zlyoRTt8odEYuSsStmG/6spvjJO89pAmXE4GOHxPkm8eJWhC1ZKODh/u2XV4AJeOZY9EoJXEIB9gVnJLgAMTsPWK9wbgvqY/6OM+kWfoXFbroVW6SZBwR9UINRyJC3GJXaWsGp+QZQ1D8ajmk6PMYNaMkexWU6U8XxF0GVXEVqNlWiDdq2rr8C/5BBYcs6BiXIFp+jxKeQEOAa7mlBGqAyC7/l/qCNuGk4AlSoxm7g61GSmWiaO05i3hFWxC0OO378HDe3cuQUnHcsMfc/JPLqQsx0Sc78cBjgfzvQY8H2xv5X7hkQS+Nn3yO8PzEQgqZh3Im8oHZES/7z2G3kedkDEZBOZlZ3/GZg0oKgiB9HFR4XA2gvvdL20vF4MnyZnyydSiyw+Bd1ygl38/PpegKUIfPvHve9VBLSiKNJsh1hfT9fdErSdC9mZ558XUZ/J47jwJTKgPXBfa8YGqUqp8IL7PCTx9Kz8F7vPf0poiBquNYUvDyDwo1kWRQN7eg/H+JGjHyXLBlxzr3x3YrJ8vnlLCFGTcQ00sAahZSwzLNgWkK8ApgZQu3xEkdqmOhsLn5LzvzkwXun9Pw== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(6916009)(8936002)(47076005)(316002)(70206006)(8676002)(426003)(7696005)(6666004)(54906003)(55016002)(83380400001)(70586007)(7636003)(2906002)(2616005)(4326008)(336012)(508600001)(36756003)(5660300002)(16526019)(26005)(4001150100001)(1076003)(86362001)(966005)(36860700001)(186003)(82310400003)(356005)(53546011)(6286002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:56:00.8536 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80a3f585-ed6c-49cb-436c-08d9a41727dc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT062.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3262 Subject: [dpdk-stable] patch 'app/testpmd: fix RSS key length' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/cce7ff86137d29f54991b8627a69890f59f5a1e0 Thanks. Xueming Li --- >From cce7ff86137d29f54991b8627a69890f59f5a1e0 Mon Sep 17 00:00:00 2001 From: Maxime Coquelin Date: Wed, 27 Oct 2021 16:22:10 +0200 Subject: [PATCH] app/testpmd: fix RSS key length Cc: Xueming Li [ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ] port_rss_hash_key_update() initializes rss_conf with the RSS key configuration provided by the user, but it calls rte_eth_dev_rss_hash_conf_get() before calling rte_eth_dev_rss_hash_update(), which overrides the parsed RSS config. While the RSS key value is set again after, this is not the case of the key length. It could cause out of bounds access if the key length parsed is smaller than the one read from rte_eth_dev_rss_hash_conf_get(). This patch restores the key length before the rte_eth_dev_rss_hash_update() call to ensure the RSS key value/length pair is consistent. Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands") Signed-off-by: Maxime Coquelin Acked-by: Xiaoyun Li Reviewed-by: Chenbo Xia --- app/test-pmd/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 11369ca2c2..d4ec4cec80 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2988,7 +2988,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, unsigned int i; rss_conf.rss_key = NULL; - rss_conf.rss_key_len = hash_key_len; + rss_conf.rss_key_len = 0; rss_conf.rss_hf = 0; for (i = 0; rss_type_table[i].str; i++) { if (!strcmp(rss_type_table[i].str, rss_type)) @@ -2997,6 +2997,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf); if (diag == 0) { rss_conf.rss_key = hash_key; + rss_conf.rss_key_len = hash_key_len; diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf); } if (diag == 0) -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:11.357297365 +0800 +++ 0214-app-testpmd-fix-RSS-key-length.patch 2021-11-10 14:17:02.027411476 +0800 @@ -1 +1 @@ -From 8e1d0547d6ed6a28c5c80c832f7b259518b89735 Mon Sep 17 00:00:00 2001 +From cce7ff86137d29f54991b8627a69890f59f5a1e0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8e1d0547d6ed6a28c5c80c832f7b259518b89735 ] @@ -22 +24,0 @@ -Cc: stable@dpdk.org @@ -32 +34 @@ -index 3b97164302..dde6cdcff1 100644 +index 11369ca2c2..d4ec4cec80 100644 @@ -35 +37 @@ -@@ -3042,7 +3042,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, +@@ -2988,7 +2988,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, @@ -44 +46 @@ -@@ -3051,6 +3051,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key, +@@ -2997,6 +2997,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,