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 9AA1BA034F for ; Wed, 10 Nov 2021 07:50:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9050A4014D; Wed, 10 Nov 2021 07:50:48 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2053.outbound.protection.outlook.com [40.107.93.53]) by mails.dpdk.org (Postfix) with ESMTP id 720C3410E0 for ; Wed, 10 Nov 2021 07:50:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TiMZw6nCXPUDtqulO/Ef5MWDbRskdWVKBWHNRBtnM60G8ChEjm3Kf9Qrk9LfYE6pST3H8/5qGDHrYrokw1+uRZACXeyiP/77wCFOb4KmLeYjE7FMSmUTtjz8ne8tWS0sr0gYx/0Y3TAQXp/SQdTVRLCYdML9cW5L/gIKSXEyNnFlyy8wJKXwoVKuWMAdOyJfXQ4afd7520qEr9fbX1+3zYvBjWSJXOm6bZu0Y+3lBaOWX0sF/bsjdjDf7R9RLS+9+YnGq9VxXbExarXSpIdgo6GsyQE/EFWA+//RIyQQdhw8gi5xlW+O2+6mfmFJRZBFA8c+oyc+yrePifjSxfUt3A== 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=foamB2uvaQyroRZWGblkKQx/YPSXRGijSL1xX4sQsbw=; b=TjfeBZARwkouawCvZyT4ssWnlXvBhr+3IYySnFU3+ufPXCetIKpj8//UQOsIWeayiBaJpvnN2TUx8XTVsL/wtsABpV1OAcKaTbjc/vXs9/csz9o6xkuEITsAYmeCT1bjmklooJmQEyvbzdNsxg6R7hy28+TOQd/wP2V1PiYC6UwUvm9zdjurzNdmoHvtY2h/s1tx4AuSWEymdYgYO9M52sq7s8biIQcHs3tFsXN9vuqod+gktUF4cRUpxwNxWubtt1Mw3znseNPFPT1zlGvRGgodylETLumoH5AWYe33v93HbsRIYklPdNf7Epy6LM/mHiZc5ru5Dy4yXP1COXFfOw== 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=foamB2uvaQyroRZWGblkKQx/YPSXRGijSL1xX4sQsbw=; b=Mv6jol/IY5GHOjvQUos6DffB9Pc0cOmnVYL6w1CCDS4s3vOiy1bxIgNHvd7KgJS/QHRZHEllmuM0WJd6DH7qs1fo1H6zTzW+eKt+51I0huESjKxpADpNamu+bONHFMRzy5fZrbMuAiYgziu1RaOvvZ90A88UPvjfGpCtfY1tBNWV4YWD4fKnmCNYW/MmqEqYcHZncjkuJ2VJ5Wu/BnPwiPZIouxUyECI0fUIWISass1mCkRcWNd8nZMT5kw0xUXIYvtCNxRNIx9yf08pVBnVfK3w3zN1I+gmnETXQVehxvAicNLWx1J8a0Czq+d3260e4HMsK6bFPLrjc/xBMPsGIA== Received: from BN8PR04CA0054.namprd04.prod.outlook.com (2603:10b6:408:d4::28) by CH2PR12MB3768.namprd12.prod.outlook.com (2603:10b6:610:22::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:50:45 +0000 Received: from BN8NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:408:d4:cafe::bc) by BN8PR04CA0054.outlook.office365.com (2603:10b6:408:d4::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:50:45 +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 BN8NAM11FT052.mail.protection.outlook.com (10.13.177.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:50:44 +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:50:30 +0000 From: Xueming Li To: Sunil Kumar Kori CC: Luca Boccassi , Ferruh Yigit , dpdk stable Date: Wed, 10 Nov 2021 14:30:46 +0800 Message-ID: <20211110063216.2744012-163-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: 73bca166-c9e2-495c-3104-08d9a4166b5e X-MS-TrafficTypeDiagnostic: CH2PR12MB3768: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kla4VWDmjPrLRBwv13ISWthq/CVJi0x3xH4E1z7M/qa1gCOlXxojIFvKlkhhH1ybJamPw2roF3UlQRC/8Kvimzva+hMQJb3XqzT7oL1s6NIh4NcQz8BkW6IbVOzdlI3N5wpXpVhk4x+UAkEQe9XCQvWNHT+uc+oM14gYsWDjW4lVDtwdXLUUdgD9jv9uQsm540gwU5/09IKtcBEb1BuCfErqGf9P0ASSYsxuMWnz39hBLHoaZrcKPNOprx2MyEbuDtsGSKlP+E2okw5yiAyj7jJrT0S3OKNqsSx7wp1DaJGHYrD1pFx2xj73jc/wIXns7xG1Snf3SXwo4YKLSppCckRAoPG6AS2SKE+NZHLvap2etZ5udLPL2rE6s+2C/46izoTLQNL5UqCSjwMISotPIldl9dra3TzPme1DHAOdVtnZjJdSQjCqzi/2JJXCVLvu0idocoF3SWDNPAge/vQrOLL8X3VC08UQlmwYtSv3zC3RMmSgFzWktpEMlDkJSrTcqV+ayB8StCYeyBhVOEJ5gfP5SxawLqVynDvrvoPEDmFPmO3SDBdPqzu0QsZsXXMNdw2nJJHf09GcicG9gjLhnfklsWh9XC6lpOucixlKgqfa6o99yFaqO6eeWq6Fo7Rud16n+eaPIiic48h44PBauIjE/1A8C1nfS/0nOh6No6jcST5BVbqXAX/rnFRw1GvBCQ8T7WlEpd9xK7KA4JBMsvvs9TadtdhlDGM+dbOtbLL4XAxVF9gJMChwvh/mz0cv2U/Us02eppGaxlIkp3sWdQgshEbprAQS0/iPYgap5gHkhW/9sG8qyw1ozoSz3PQZo93VMOmqX2aM1+kaQw/T0w== 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)(46966006)(36840700001)(55016002)(966005)(8936002)(508600001)(70206006)(26005)(70586007)(336012)(47076005)(8676002)(6286002)(426003)(316002)(2906002)(2616005)(36906005)(54906003)(1076003)(7696005)(4001150100001)(16526019)(186003)(83380400001)(86362001)(4326008)(5660300002)(36860700001)(36756003)(53546011)(82310400003)(6666004)(6916009)(356005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:50:44.5537 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73bca166-c9e2-495c-3104-08d9a4166b5e 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: BN8NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3768 Subject: [dpdk-stable] patch 'app/testpmd: fix access to DSCP table entries' 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/453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a Thanks. Xueming Li --- >From 453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a Mon Sep 17 00:00:00 2001 From: Sunil Kumar Kori Date: Tue, 12 Oct 2021 14:03:17 +0530 Subject: [PATCH] app/testpmd: fix access to DSCP table entries Cc: Xueming Li [ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ] During parsing of DSCP entries, memory is allocated and assigned to *dscp_table. Later on, same memory is accessed using *dscp_table[i++]. Due to higher precedence for array subscript, dscp_table[i++] will be executed first which actually does not point to the same memory which was allocated previously for DSCP table entries. Fixes: 459463ae6c26 ("app/testpmd: fix memory allocation for DSCP table") Signed-off-by: Sunil Kumar Kori Reviewed-by: Ferruh Yigit --- app/test-pmd/cmdline_mtr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c index 3982787d20..875a97788c 100644 --- a/app/test-pmd/cmdline_mtr.c +++ b/app/test-pmd/cmdline_mtr.c @@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table) while (1) { if (strcmp(token, "G") == 0 || strcmp(token, "g") == 0) - *dscp_table[i++] = RTE_COLOR_GREEN; + (*dscp_table)[i++] = RTE_COLOR_GREEN; else if (strcmp(token, "Y") == 0 || strcmp(token, "y") == 0) - *dscp_table[i++] = RTE_COLOR_YELLOW; + (*dscp_table)[i++] = RTE_COLOR_YELLOW; else if (strcmp(token, "R") == 0 || strcmp(token, "r") == 0) - *dscp_table[i++] = RTE_COLOR_RED; + (*dscp_table)[i++] = RTE_COLOR_RED; else { free(*dscp_table); return -1; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:09.133465378 +0800 +++ 0162-app-testpmd-fix-access-to-DSCP-table-entries.patch 2021-11-10 14:17:01.970745273 +0800 @@ -1 +1 @@ -From b314a4a664266f691167c29de6bc5ce728346c02 Mon Sep 17 00:00:00 2001 +From 453cbd4bf4ca21246e25e12c3b9d3d9518bb7e9a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b314a4a664266f691167c29de6bc5ce728346c02 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index b5dcfdadcf..ad7ef6ad98 100644 +index 3982787d20..875a97788c 100644 @@ -27 +29 @@ -@@ -101,13 +101,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table) +@@ -92,13 +92,13 @@ parse_dscp_table_entries(char *str, enum rte_color **dscp_table)