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 C0AD9A0542; Mon, 6 Jun 2022 13:47:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 858F2427F6; Mon, 6 Jun 2022 13:47:30 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2079.outbound.protection.outlook.com [40.107.95.79]) by mails.dpdk.org (Postfix) with ESMTP id 9C49B406B4; Mon, 6 Jun 2022 13:47:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HyhFuYYqg288ze9z9nqN4A/5q7bH5EhA9/6cayiOAnS1/5BuVjDesjbKYNsX3eZZEsqlmu+0Dbe99oUKpBTQwA1PIuWQ559BWGqfLtqjFNipVYlKgq5CIFDzZH2sXliBA9cBxiSxQTw9yD3ESrCCl0ztcqbMihlbf+7pfH4mzYBqmRPbl84bqKxMs0uCz82QIZDAfBhexviOrVInOfgLQxoB0HVXU39AAV396NSUlaAB4AiKqja5boNORAV9OQWXryF5dGEgMuDfQlyURdGJsHJWKkiypT/Sjg4KNF44VfqEzwzooWPm8H6Q7yRzwEV5T/oWPEFmLt2+7A8IAK6VJA== 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=+ZPVU+1n/X1Ej6xmkv+FiB/jRHtSB9weFEKHydo0p+I=; b=R+SlpIbHmIZEHo7sBj6wyS6pJMy6ybQq6SL6aPDm/9SYREHeqVtlv2wMr85eJvwKHJqwoxlQeFbpnPqOtX4rNKx7n/x6iyGg9cYvzOnlfBdM1obu2NPNrbcJddYLWDSEfitr9KiVN7QhcbGpkzBAQTqY6UahUiZ7+9g7eiVk0nIJdf0SWXLikiK47jnCsUv0+P8W753L+JIkFYuR8phTImpFA038tT3nmm+AZjy71LoF3ADEXF549+A0hCqwKOZieeLxvL2hyw29ITwP3Mig345LFovCZVzEfbNW9Ug6XxxkqiRYMUKZxEVBaEgoCnQbv5qrastx6eP7HQ/4ynMdAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.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=+ZPVU+1n/X1Ej6xmkv+FiB/jRHtSB9weFEKHydo0p+I=; b=Pu39KVzOYOmCCO/h7WxVSQl3iR5aTKhG5Cs/keaaULHTiO33UAdpI+G1yX8RA//p/VBR1qzYZWs6blYIDj5PCYh6tOfc3g7Z1zGVPzTjsXBVPQ8GAn021+P0vj4XuNP+h6QkehwHeQY+W2Ohv9QWIw9xSBUyevUrIbp4b8lP+aa8rUyzFJWICQEmk9D6Klh7ahrhuP3WIeGbj+qUv4OKjaU25hFxY8LAlAZMUbpsIf8Ph6YWRc00MHlP1UVt1OuLLxDiYsqJdxijUHns2Gxd9Ee9BsjV4Q5ih8bfCw3pPoSADNSeHNH/n1boAqVrQr1++LAeLWMAuLAUyEaXUJmfqw== Received: from BN0PR03CA0020.namprd03.prod.outlook.com (2603:10b6:408:e6::25) by BL0PR12MB2530.namprd12.prod.outlook.com (2603:10b6:207:43::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.15; Mon, 6 Jun 2022 11:47:26 +0000 Received: from BN8NAM11FT011.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e6:cafe::e1) by BN0PR03CA0020.outlook.office365.com (2603:10b6:408:e6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.18 via Frontend Transport; Mon, 6 Jun 2022 11:47:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT011.mail.protection.outlook.com (10.13.176.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5314.12 via Frontend Transport; Mon, 6 Jun 2022 11:47:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 6 Jun 2022 11:47:25 +0000 Received: from nvidia.com (10.126.231.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.22; Mon, 6 Jun 2022 04:47:20 -0700 From: Li Zhang To: , , , , Maxime Coquelin , "Chenbo Xia" , Chengchang Tang CC: , , , , Yajun Wu , Subject: [PATCH v1 03/17] examples/vdpa: fix devices cleanup Date: Mon, 6 Jun 2022 14:46:36 +0300 Message-ID: <20220606114650.209612-4-lizh@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220606114650.209612-1-lizh@nvidia.com> References: <20220408075606.33056-1-lizh@nvidia.com> <20220606114650.209612-1-lizh@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] 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-Office365-Filtering-Correlation-Id: 13462693-1ef9-40f7-f578-08da47b253ab X-MS-TrafficTypeDiagnostic: BL0PR12MB2530:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NjiDqxEUUVEMj7oZkAbPpiZNxUFntvfJ+LqYLQRKThK0zeI+q2K++G7h7XMTUNXuRundbz5vhiooyqAfkQeAuGbRGmoui49PR57r8V3ZdZ1GhyfekMS/csJPUSlbLWK+63vPlFlzEbxAC9lFDpOIIOi8slMkz/uAGQhtq3aVXoAOLZwrUouh1QNB61c3vHPCgXvt6BPzFoS5lzyN5ELSq0H232tnxmHNfKBlHMXMD5yO/OJTYlEOOpaGG4q39qXQehOu1SxWfQhLXlnrKE/fijL7jVLHriQkCS4msYUR265w2kdI5lL/OgD7WEV9m605AGEfQYLYpNkiGMOgQuhonexzVgw+u3uAeZGgPHpuZszZeUSOdVOp1rpFnqzeBdCNkEyM1mBwVusdPxcT3ic7aNLVPGnYugkmtI7O1txUU7PFZcXgzBOSmpSo25nHjqO2KgLm+UOgvQyhAtxyApafEK1pduDL/IXFpotzYxb49mncnuOdO7/0ljmsdtjlNCuv6kPZD6LDFlw0FNBlHHYfejXhbTdMvJL6Cvkh9ciTJZIQOv9mS82gfvaB4w7tL3eIVbFRLsSwp1hik1eBgnWphVKeu81KuoWOksxgXOVKJl8/f1hbUi64RzzcSgQCPzwqwtaU8x0MDmav5fVwtXIypg2c0zPjcNRaaq/jyiW4F8rh6e+ZlSEKEirRCosfsxCFfjD4Q99p8zuU6YzGW/ANSA== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(186003)(2906002)(81166007)(2616005)(86362001)(47076005)(4326008)(426003)(1076003)(7696005)(336012)(6666004)(316002)(82310400005)(70586007)(8676002)(70206006)(54906003)(6286002)(26005)(4744005)(55016003)(110136005)(36756003)(36860700001)(83380400001)(40460700003)(356005)(508600001)(5660300002)(8936002)(16526019)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 11:47:25.8157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13462693-1ef9-40f7-f578-08da47b253ab X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT011.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2530 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Yajun Wu Move rte_eal_cleanup to function vdpa_sample_quit which handling all example app quit. Otherwise rte_eal_cleanup won't be called on receiving signal like SIGINT(control + c). Fixes: 10aa3757 ("examples: add eal cleanup to examples") Cc: stable@dpdk.org Signed-off-by: Yajun Wu --- examples/vdpa/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c index 7e11ef4e26..62e32b633d 100644 --- a/examples/vdpa/main.c +++ b/examples/vdpa/main.c @@ -286,6 +286,8 @@ vdpa_sample_quit(void) if (vports[i].ifname[0] != '\0') close_vdpa(&vports[i]); } + /* clean up the EAL */ + rte_eal_cleanup(); } static void @@ -632,8 +634,5 @@ main(int argc, char *argv[]) vdpa_sample_quit(); } - /* clean up the EAL */ - rte_eal_cleanup(); - return 0; } -- 2.31.1