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 478F4431D5 for ; Sun, 22 Oct 2023 16:35:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 312BC410FD; Sun, 22 Oct 2023 16:35:36 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2058.outbound.protection.outlook.com [40.107.96.58]) by mails.dpdk.org (Postfix) with ESMTP id 94269402D0 for ; Sun, 22 Oct 2023 16:35:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K1+QXGS1r48Pcp4RJxUMFwJ9vN6nQGbykgemGYYQyX86aNM22IQJvXvnIX9uuf637Ws4FhfIOIa/jnwvcrz1i5N+h0TJ5A4OATRN3KQSk91crUQTu4uGN+ucNczCxcwFoor5d/okRyzA4kSdmzaSWnMZWcpz5p6OpXQmzA5VTMus5eASvHl9rRe/05BG9uq4bj9rGmwqWbAhhYFWeJG4MpuZfXq/TNylD2VIZbr+2PJkROXvTu96surQx+zjeOasvXqzyxORcaWh9PlGEu5/yb4PPaH6MY3QFG5lVNL/nyHxOkH0qMiasUeg01qefEU364uLs4bJiQ59V13IgVc5JA== 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=VDCkM9qwtxWMQif4wAVEx9qfWcwSX84DYeJPbrxSdQU=; b=AyPXYO7jj/UyeuP5XTi/khhK9goD7/EE5f4sqtsbrep1aKqN0ly6tOfpHwEzXW3IAfBwHiTxGbXVbO+OB0qQdpXp0SXmPGUAoh3c1GIVkMJ0wUKgCK1qr7SaeNx8jqfmTZ2S7m33YmUkCS822Mbg4svjV0DYscCPIS2rUMbRavSmF7kSmIi8oJo8GwLthLiX2OlYA13B7gVwULZjEzOufHKu1F2h6lA9m7CGu6tX6sm1F9swJglbd5ie3jAZ5SR4bCGBUfXnVvM+QYcTIKQ/KB+/g9XkqQNQIeSyFQJYnc85FiSMtpzYQnbGB/KWV8USsvJh1TM9ttDZ4eUwLyN42A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=networkplumber.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=VDCkM9qwtxWMQif4wAVEx9qfWcwSX84DYeJPbrxSdQU=; b=hrMP2zVhMIoZ+tFK93odSs19C8GEOQozn/TI3Hq5RtlZotWmDFyLfzaYDCuKiGdq2+LKbiALpHXgb+hotsIL80rzYZ8U02hdsceWqsvTfoVY92gLoh1+gTWXrdclwQ07n+soSR+x4JnATlI0m0F8GKc3r0mNDbHljm+OvSrnvTg2DkmP2HiQTTbkvH7k2qu9FA9VLnWy9r/OEc9evr3xjT3RLSnxxIKbfvu3Q6ke70zeA1vvsT38M8OrV9IvgF7n3pFaMoZJCdepfbJm8NgjDn1/whMlzI4u3OKUDxC6FcvNT0liZ4aSD2V3cMzSYeoW7coZshoTiglw/54Hc+9Rnw== Received: from MN2PR14CA0008.namprd14.prod.outlook.com (2603:10b6:208:23e::13) by CYYPR12MB8962.namprd12.prod.outlook.com (2603:10b6:930:c4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Sun, 22 Oct 2023 14:35:32 +0000 Received: from BL02EPF0001A0FE.namprd03.prod.outlook.com (2603:10b6:208:23e:cafe::ce) by MN2PR14CA0008.outlook.office365.com (2603:10b6:208:23e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33 via Frontend Transport; Sun, 22 Oct 2023 14:35:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0001A0FE.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:35:32 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:35:17 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:35:15 -0700 From: Xueming Li To: Stephen Hemminger CC: Chengwen Feng , dpdk stable Subject: patch 'app/procinfo: remove unnecessary rte_malloc' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:22:50 +0800 Message-ID: <20231022142250.10324-142-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FE:EE_|CYYPR12MB8962:EE_ X-MS-Office365-Filtering-Correlation-Id: cfc4d8df-75a6-459e-de2a-08dbd30c25aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1lz/F7C3jmE3m8YERTr9CPvPkOWIRJvuqBt6YrE+F8VCzcqLUT7wLQ0vPd4vwgj6WoRyQE8kHLB4nMBvcnt5rSmjcZon6sJU9hcfXzDi3rIFUPS/kE9N2hN4XftmXnRJOb1EsVNGEQCQwtrjiiH4vK5B9AdNsC7gCJ07JZWS0Vy8p96PcHHzxOKReo6A8pL2zacdY+R5ZRoElj3sSSifonk24VXaBq4giuWQtN51wms3spt+xGS+pPI/vR74u7Dp6HaGgjRj71PrzN5ZKjKo+Tm2f/ZMy7+GYSwhUZs9Bcjdzwx4sYKpGXNHbjP6J/fSBjSGjX76YApoXbfY9Dn/HXlMRRzGEJWfZDQU16KcHaSqtj8j8a2BukXF0HoJSTWeKWsho2Egneg9yLC/ICSwKj70yqVzvlryJxQUt6z1n0eSmOWA3RYE5dD+o2xaQKBzbdSIOyMOtOnX7Q4T2+n/dsaPfbxNfokcm80NYeJhktK/DrV/vYfZ63m7JlFGLna/GKqT36EArJPh5EucPgsHg+JYAANFiWm8MOPUZ7IFeKW67M4kCls1FneW24ZGnIja1eV0tcooiSEiW+/R7PkB4ssL+DLkg8UTOxwxfqJcTfA/0Q6Ru0V8iXRHzi4Dp7aHPu480BbV8stIa+kJ6rxehnOvhEpkIu8xPvlRp/zUUbzd6ZQfr9ZJXLblEFg/nUuIbbGkGYotovL22EyrgObAjHeTHVMjI6ZbHGRSlvVn14kLiaIcuFB8Dt/Od72s48H X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(376002)(39860400002)(136003)(396003)(230922051799003)(451199024)(82310400011)(64100799003)(186009)(1800799009)(46966006)(36840700001)(55016003)(40480700001)(70586007)(70206006)(54906003)(41300700001)(86362001)(5660300002)(6916009)(316002)(7696005)(6666004)(966005)(478600001)(36756003)(4326008)(8676002)(8936002)(2906002)(4001150100001)(36860700001)(356005)(7636003)(16526019)(6286002)(2616005)(426003)(336012)(26005)(1076003)(53546011)(47076005)(82740400003)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:35:32.6049 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cfc4d8df-75a6-459e-de2a-08dbd30c25aa X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8962 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.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/15/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=f42884a20c25f4ce9e4daaee0e26c25e9962df91 Thanks. Xueming Li --- >From f42884a20c25f4ce9e4daaee0e26c25e9962df91 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 7 Aug 2023 13:43:10 -0700 Subject: [PATCH] app/procinfo: remove unnecessary rte_malloc Cc: Xueming Li [ upstream commit cfe29906c69bedb5f87dadcc02703ce46e80f37e ] Better to use malloc() which is faster than rte_malloc() and has more error checking, as is done already for statistics. Fixes: 077c546704da ("app/proc_info: add metrics displaying") Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng --- app/proc-info/main.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 53e852a07c..50871c92a0 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -719,24 +718,23 @@ metrics_display(int port_id) return; } - metrics = rte_malloc("proc_info_metrics", - sizeof(struct rte_metric_value) * len, 0); + metrics = malloc(sizeof(struct rte_metric_value) * len); if (metrics == NULL) { printf("Cannot allocate memory for metrics\n"); return; } - names = rte_malloc(NULL, sizeof(struct rte_metric_name) * len, 0); + names = malloc(sizeof(struct rte_metric_name) * len); if (names == NULL) { printf("Cannot allocate memory for metrics names\n"); - rte_free(metrics); + free(metrics); return; } if (len != rte_metrics_get_names(names, len)) { printf("Cannot get metrics names\n"); - rte_free(metrics); - rte_free(names); + free(metrics); + free(names); return; } @@ -748,8 +746,8 @@ metrics_display(int port_id) ret = rte_metrics_get_values(port_id, metrics, len); if (ret < 0 || ret > len) { printf("Cannot get metrics values\n"); - rte_free(metrics); - rte_free(names); + free(metrics); + free(names); return; } @@ -758,8 +756,8 @@ metrics_display(int port_id) printf("%s: %"PRIu64"\n", names[i].name, metrics[i].value); printf("%s############################\n", nic_stats_border); - rte_free(metrics); - rte_free(names); + free(metrics); + free(names); } #endif -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:39.382566600 +0800 +++ 0141-app-procinfo-remove-unnecessary-rte_malloc.patch 2023-10-22 22:17:34.436723700 +0800 @@ -1 +1 @@ -From cfe29906c69bedb5f87dadcc02703ce46e80f37e Mon Sep 17 00:00:00 2001 +From f42884a20c25f4ce9e4daaee0e26c25e9962df91 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit cfe29906c69bedb5f87dadcc02703ce46e80f37e ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index af4c1d8bcb..ce53bc30df 100644 +index 53e852a07c..50871c92a0 100644 @@ -30 +32 @@ -@@ -909,24 +908,23 @@ metrics_display(int port_id) +@@ -719,24 +718,23 @@ metrics_display(int port_id) @@ -60 +62 @@ -@@ -938,8 +936,8 @@ metrics_display(int port_id) +@@ -748,8 +746,8 @@ metrics_display(int port_id) @@ -71 +73 @@ -@@ -948,8 +946,8 @@ metrics_display(int port_id) +@@ -758,8 +756,8 @@ metrics_display(int port_id)