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 04B68A034F for ; Wed, 10 Nov 2021 07:52:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F22FC40142; Wed, 10 Nov 2021 07:52:55 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2086.outbound.protection.outlook.com [40.107.93.86]) by mails.dpdk.org (Postfix) with ESMTP id 23C57410E0 for ; Wed, 10 Nov 2021 07:52:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NG9KHwILTk8Rbw4c3mJeUENdRKZPjIBp7GJUfiiJclkBAx6Oxb/RX8K7rngdiuITH6901+uPdOHb6deOu2Bp3rmV71ozfyvtBmMa50wGA7YKBxlNmC1q7aOZEsvOfn9/ZMEAKWw43iKQieicJfkwuutBWuWnkgtdH77poNXAWl8+pPV9JKEv0WauVNzYD8TE+4/MlHOC38TJ6zUP1lbgQeMjySYypeQAQoCEGEqbKbNsAHNLdUIcR6dfsnS3LQscBpXNvHzPRFat/RCXYUbv92/5eN+Al1O3kTUE/HzHsnkW13CWBQm8QMDFln7hJ0HkuDEwE3E/cXAd9q5fryDZBA== 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=qo3TlHQb5uesUa1NX2afV3e6Uxw5AhUMW3jQbM2Ux2k=; b=EDuice0A+WHZ9P2tkyXUX11geEljocUVvFn1wQ3RselXSf6GD9c4nIV2E5HsJ8A1Ke5gZ3CVqqh8ouuMSdeGovY5hzssT72a9A7HtjMfLV6T+R5hmT0fZNQwO8CA2tEK41gzgXpccXzntCVznfzllseOXWLgyYLSmlGyZk0O7FputqoPDIxjosg4buLk4c9iobofAwsNYXMToFht9j7N5QlNE3kUGM7DFDrVeaFMvaAxiGKmfs08jBJ1x/BUvyb0x0OLjSOk/fZaOG1yQyISx2yfk1XwadzDA7k7qLGevLhfbvtifWa/SSulsGpkO/WZ9ELzm8OrUhPGP48/JuvOTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org 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=qo3TlHQb5uesUa1NX2afV3e6Uxw5AhUMW3jQbM2Ux2k=; b=Z3VgwXR0Bgt7Daz90flZZdpinpI/jXZbpknCyXHPP7AoYcGfFKxDhGFxGFw7ntwp6+4Sq9HgyP6HJaukIKPEmKaNazuTm4mRoLH80A44wVluJju55OuO2PrliAwt3KywAumIe0U0zDwhf0iLsyIkXTcNJiXn36Zhr7foiBxzsAH/oBKytdQsu+7TnfX2nv+vwmlRNxBBcxelk6PkTmyCsZTzl6alPb4AQ84cYtj1B8hUXi223ha0UxeusUD/iKQuxrtoOL9bsSDbWt+6dZsVFglPCeRWslluMyCOn0x6GIH+hqq00GRduxlfqKV0XrM5Vp1NMH83BKXtqWVo6ECaWg== Received: from BN9PR03CA0801.namprd03.prod.outlook.com (2603:10b6:408:13f::26) by MWHPR12MB1487.namprd12.prod.outlook.com (2603:10b6:301:3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Wed, 10 Nov 2021 06:52:51 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13f:cafe::82) by BN9PR03CA0801.outlook.office365.com (2603:10b6:408:13f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:52:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;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 BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) 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:52:51 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:52:48 +0000 From: Xueming Li To: Eli Britstein CC: Luca Boccassi , Matan Azrad , "Ferruh Yigit" , dpdk stable Date: Wed, 10 Nov 2021 14:31:08 +0800 Message-ID: <20211110063216.2744012-185-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.6] 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: c2b6d280-3c8f-4622-ba8a-08d9a416b6e2 X-MS-TrafficTypeDiagnostic: MWHPR12MB1487: 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: 37GwU2WiKx087LRUxS0wVXBUOZQpfeBNDZVcF23sErZ/TfUxUpblUSR9kR/4zlBkzM88iVKcvjS8CnwSDyC/h8bMD5RiVWZMzJ61D7oY/o86z8hD9+LaOOuEwtYeuyX9Qvt1vF+msSP0cJ+C+1xhhrMDtvbQ6e1ytgOyaqaxRis5Na6QFiSfARahTTMS70Hj2yyVJ4Mjg1Cc7JNNwUwH1RdvSXFtQFIMygAChZdyUX3RrsP71RTqcyqwnTRl0eH2wxkGdBdfOymyu8Mc39jBTHubjho4tdE0pDxvQ49AHJ3MS+AVNuDG0Q+TujAdXC6PSDqNmOSWQ7ocMA4S0ev8hylkJPT4Y/EiDoROC6Fw7fPompy99A4FflszVZR1XXzcnREwBca2pJ7XvD+l2g/pq9gT2C5u52/F6S97h5sPt+dHxBUb1a7964hwPTGc1CJ5GK6+GEzUFPoAysLxeIG95fId1olX7nOZIPZstVqyQzO8UTw7HCJdqbMSoqelD1CNADU358J2t1PFY5bRAZqjDZIdoL1qsPtS/69emZlxr5CbrTwZFYf2Px3kmckE5M9qXU5QzFkgdS8emKtBA0oPUMymwB+PExomewI/+N01ZFaoW/WE77EL/ZZWin/ReBSwds+XBkeJbGbI63zGQOfLuK9Tf6gAC+wo2daSuFhJGBcFycfOYAers8Q7UDDHol6TtgRbWANfkhQ/sAc2f3qcLU68XyE4O7WlANEmHQ0mh49nTmshuFk+gg9/8aiUzrUoVByHL2VM0PzPoQVZW8Y+Le8tnmCuNvDXjO3DU8YNRwjPjPwmEEg63uGPqfyWlFrUxgjK1ZTytyonzBwMRAU2BA== 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)(55016002)(508600001)(36860700001)(356005)(26005)(2616005)(4326008)(36906005)(36756003)(966005)(54906003)(4001150100001)(7696005)(7636003)(316002)(47076005)(37006003)(6862004)(86362001)(53546011)(16526019)(70206006)(8936002)(1076003)(426003)(6286002)(6666004)(336012)(70586007)(83380400001)(186003)(82310400003)(2906002)(5660300002)(8676002)(6636002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:52:51.2434 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2b6d280-3c8f-4622-ba8a-08d9a416b6e2 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: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1487 Subject: [dpdk-stable] patch 'app/testpmd: fix packet burst spreading stats' 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/034da63e88bba2e1e765cb7ba2107a53213ca27c Thanks. Xueming Li --- >From 034da63e88bba2e1e765cb7ba2107a53213ca27c Mon Sep 17 00:00:00 2001 From: Eli Britstein Date: Thu, 21 Oct 2021 16:20:02 +0300 Subject: [PATCH] app/testpmd: fix packet burst spreading stats Cc: Xueming Li [ upstream commit 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 ] RX/TX functions (rte_eth_rx_burst/rte_eth_tx_burst) get 'nb_pkts' argument, which specifies the maximum number to receive/transmit. It can be 0..nb_pkts, meaning nb_pkts+1 options. Testpmd can provide statistics of the burst sizes ('set record-burst-stats on') by incrementing an array cell of index . This array is mistakenly [MAX_PKT_BURST] size. Receiving the maximum burst will cause out of bound write. Enlarge the spread stats array by one cell to fix it. Fixes: af75078fece3 ("first public release") Signed-off-by: Eli Britstein Reviewed-by: Matan Azrad Acked-by: Ferruh Yigit --- app/test-pmd/testpmd.c | 2 +- app/test-pmd/testpmd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 466df37a2a..35a48e39cc 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1709,7 +1709,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) pktnb_stats[0] = 0; /* Find the next 2 burst sizes with highest occurrences. */ - for (nb_pkt = 1; nb_pkt < MAX_PKT_BURST; nb_pkt++) { + for (nb_pkt = 1; nb_pkt < MAX_PKT_BURST + 1; nb_pkt++) { nb_burst = pbs->pkt_burst_spread[nb_pkt]; if (nb_burst == 0) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index b54958165a..43e49a8069 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -92,7 +92,7 @@ enum { * that are recorded for each forwarding stream. */ struct pkt_burst_stats { - unsigned int pkt_burst_spread[MAX_PKT_BURST]; + unsigned int pkt_burst_spread[MAX_PKT_BURST + 1]; }; /** Information for a given RSS type. */ -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:10.089725948 +0800 +++ 0184-app-testpmd-fix-packet-burst-spreading-stats.patch 2021-11-10 14:17:01.994078415 +0800 @@ -1 +1 @@ -From 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 Mon Sep 17 00:00:00 2001 +From 034da63e88bba2e1e765cb7ba2107a53213ca27c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6a8b64fd5e9e8f5572ea4d9de40a1cff23498246 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index 6d5bbc8240..2b835a27bc 100644 +index 466df37a2a..35a48e39cc 100644 @@ -30 +32 @@ -@@ -1879,7 +1879,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) +@@ -1709,7 +1709,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs) @@ -40 +42 @@ -index bf3669134a..071e4e7d63 100644 +index b54958165a..43e49a8069 100644 @@ -43 +45 @@ -@@ -96,7 +96,7 @@ enum { +@@ -92,7 +92,7 @@ enum {