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 4C2BA41D8D for ; Mon, 27 Feb 2023 08:17:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 43A7641148; Mon, 27 Feb 2023 08:17:17 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by mails.dpdk.org (Postfix) with ESMTP id 1FFA540ED6 for ; Mon, 27 Feb 2023 08:17:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GkKMSjGDGxvv+v8QY5sUvWTmfRa1sMiUbDb5vHMR9J8DIFtE5sbVV3BK2eSnfP4vOMzp5DJi2jGwbOu0/OnRdNYCmzWXDnQM5Wf9YNNqhVpRHmK7hDOEM5yFpPjbcke7hz7AMqZ05w8GTa3UFA1zw70V1VPCAZ6GflF3NjKxtVp3MuXiSc47skm5LjWuRkEcD9JPulX4tk5uraZSDrxZV0RBWogRiPf9SLOUe/sYdEekibY4S52H8aAynqnulJFCjZvEiHqcBUweLEyNdEaoD1peeabU5e8/ESk6v0HI5bkkUSkzfwRfEVwC+IApGenX7p6llftdFvr+rtFlxHw7hg== 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=NIebhj2Fw2UBqMglvt19q10L732LB4RFauWHaCJDajI=; b=gAu9KpdeCjCEyMFS0VZZJbXVkj1ZkKEHDOFdrsPRSUadUc30Z5lsuWHfhV4eAlwwlULues5eq3BEgHj2Zhd3e7+KqdWOus93i3e0y7uO+3QTaHupkAVK7be9+zNyVRUj21gxPS/zxoJTIa2VO9rYS9sgXesw1zEYlh1CLSPZBas5LpNEyBfe7ZSSr6DvcMSbLcscYrpn5jyv4bIH0rRslMqMJ/YQUz60wDF2t0FisU5H/ERyjP9B1aL9ChZGEqUtKs3nAxfKaUC/di++v88yl70cSH9W7TxjBhmgyEqA0T7FWkzqsgGlGIyylkjuI91Be16kGNRvvIgIod8hUoUhrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com 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=NIebhj2Fw2UBqMglvt19q10L732LB4RFauWHaCJDajI=; b=Vdn07ZBTsqPlFKyykLY6rqG7ocAV3cO607N1/cKcScXHur3C0UBp84hS+HfZfnBcPMDPvzYcoejywC0lS+MJ4FnWsZ0hByCQKCOTU4v54oiBJqN1G9x57/w5ir7Gk+InIXeDUUy9XvhHK6Q7lnpjoVEtpodcBcD5pIiOAxlJe75SEbNqT9H/ER1GCBTDLrvW/rHxr/4iHD8s3UlQV+pGze2QcaGsQ+Mh6WFd6nkFBqVMgrg9CEkm5yGI0FvlUJsjJgi+e7/o7UpxB/Un0MJzcHK0/mIP6qcnGcaKkTH3aLWent63fEFymEOCNhYYhcOM/X/JKjkAq5RUAFLgwRyQcQ== Received: from DM6PR18CA0013.namprd18.prod.outlook.com (2603:10b6:5:15b::26) by SA3PR12MB7808.namprd12.prod.outlook.com (2603:10b6:806:31b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.27; Mon, 27 Feb 2023 07:17:13 +0000 Received: from DM6NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::a5) by DM6PR18CA0013.outlook.office365.com (2603:10b6:5:15b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:17:13 +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 DM6NAM11FT080.mail.protection.outlook.com (10.13.173.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:17:13 +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.36; Sun, 26 Feb 2023 23:17:04 -0800 Received: from nvidia.com (10.126.231.37) 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.37; Sun, 26 Feb 2023 23:17:02 -0800 From: Xueming Li To: David Marchand CC: Aman Singh , dpdk stable Subject: patch 'app/testpmd: fix crash on cleanup' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:00:56 +0800 Message-ID: <20230227070107.15664-148-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT080:EE_|SA3PR12MB7808:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d74941d-d562-42a9-1f0f-08db1892a628 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: prm4i3YQHJtjMY7LjetTc7nCf6AGdbGcB3qa5G6bHYyLn7nWzVs3LQDDkBldBdYRwVsLTwE94osBeCvmVEUqAJXyJWWHOdEFW6l0A3hEDPr0YhnoLs17kwIxeXk6tEtDXQi8vV7NdY+LwjdoUD+SPINDhgfqOX0hoyx0ASFa2KIVUQUMKd+u3T9I6exg+Uu58fjx7PulR0161HTu3Bi1NiXYyd4iuRohck/EHhOt6ddv0cctgSDeK0pPBvxFmXEO6CBLKGvD+Hihs3bSLCZdRIHZZ/3+nTv8H0UVfraUlOVyvZfF2T1+JSj1l5GJGxFWHMNGl3CaDCM5rPRW1iZsIaZG33TueQ9Kl4bXknIgkxnR43h4VM4NAPu9g4FAC4xl/IAoknvIBYPAGGktLJ/QrRZyb+01oCyFUy2buq5Qd4xew3AHJtAD56JEfcg1F/jaaCx7ssI2D3+Shg9nuSv2kCuIadeuXbT16Mrrc4Dp6Tnr/WGo3XOQ0Xh2uKPkMzWmKhlCFg+H6egJ5cESn7spH5Q02iXpRUEhTA1PGd5IKp1AUe5+ggYoYei5ub3w2tX/U4tKYrIzEZP+kTdyG+6+kzBkojhTSMaLYuXrDa1OGPQVnDQI/rHuoEvJAttxFKic7TQ1ynNxZhwukf9CzmNDQPwl2pzpis+dawbs+SXijWxoGqSayR/LrggfdyGizZf9/+WjWiRic9bbOWW3PnCZMOUBoId26wQlmYiHX+UDL5Z6UXukdSogbe1f4RLs6E46j856txR2ehlh5TJBsLQ1SnOKDXPlRkCRgV3DUaXzEkK0InM4yNvfxHeR0mXpZ1G9 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:(13230025)(4636009)(396003)(376002)(39860400002)(136003)(346002)(451199018)(36840700001)(40470700004)(46966006)(40460700003)(186003)(6286002)(16526019)(2906002)(7636003)(82740400003)(83380400001)(356005)(316002)(8676002)(8936002)(6916009)(70586007)(36860700001)(70206006)(5660300002)(41300700001)(34020700004)(336012)(7696005)(55016003)(40480700001)(4326008)(1076003)(426003)(47076005)(478600001)(53546011)(26005)(6666004)(2616005)(966005)(36756003)(86362001)(54906003)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:17:13.3590 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d74941d-d562-42a9-1f0f-08db1892a628 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: DM6NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7808 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.2 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/01/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=38465cec0aaeb7a171a8520b7a6c71b7e3f71f8e Thanks. Xueming Li --- >From 38465cec0aaeb7a171a8520b7a6c71b7e3f71f8e Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 6 Feb 2023 16:49:46 +0100 Subject: [PATCH] app/testpmd: fix crash on cleanup Cc: Xueming Li [ upstream commit 563fbd084b6b8de866d4fad9582f9eb071e6da0a ] If allocating the ports[] array fails, a crash will occur when shutting down testpmd since ethdev emits RTE_ETH_EVENT_DESTROY events. Move init_port() before registering ethdev event handler. Fixes: 85c6571c9103 ("app/testpmd: reset port status on close notification") Signed-off-by: David Marchand Acked-by: Aman Singh --- app/test-pmd/testpmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 538609d890..adf19cfb9e 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -4392,6 +4392,9 @@ main(int argc, char** argv) rte_exit(EXIT_FAILURE, "Cannot init EAL: %s\n", rte_strerror(rte_errno)); + /* allocate port structures, and init them */ + init_port(); + ret = register_eth_event_callback(); if (ret != 0) rte_exit(EXIT_FAILURE, "Cannot register for ethdev events"); @@ -4410,9 +4413,6 @@ main(int argc, char** argv) if (nb_ports == 0) TESTPMD_LOG(WARNING, "No probed ethernet devices\n"); - /* allocate port structures, and init them */ - init_port(); - set_def_fwd_config(); if (nb_lcores == 0) rte_exit(EXIT_FAILURE, "No cores defined for forwarding\n" -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:45.611425100 +0800 +++ 0149-app-testpmd-fix-crash-on-cleanup.patch 2023-02-27 14:08:40.959237000 +0800 @@ -1 +1 @@ -From 563fbd084b6b8de866d4fad9582f9eb071e6da0a Mon Sep 17 00:00:00 2001 +From 38465cec0aaeb7a171a8520b7a6c71b7e3f71f8e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 563fbd084b6b8de866d4fad9582f9eb071e6da0a ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index a6c5dec4c0..0c14325b8d 100644 +index 538609d890..adf19cfb9e 100644 @@ -23 +25 @@ -@@ -4429,6 +4429,9 @@ main(int argc, char** argv) +@@ -4392,6 +4392,9 @@ main(int argc, char** argv) @@ -33 +35 @@ -@@ -4447,9 +4450,6 @@ main(int argc, char** argv) +@@ -4410,9 +4413,6 @@ main(int argc, char** argv)