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 C6D8FA0543; Mon, 6 Jun 2022 13:22:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A26D042B6C; Mon, 6 Jun 2022 13:21:54 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2081.outbound.protection.outlook.com [40.107.244.81]) by mails.dpdk.org (Postfix) with ESMTP id CD71F42905; Mon, 6 Jun 2022 13:21:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l44o5G0LONuGftfOTkXtdR+a789VGYlnwGlMkEb9FjxgDVq0WodQoeHt63OH74q2WHg3lfFjHgiyZkAGwMY/xTv0XpD0+2h8hUEcwp+HT2+zB4h6Wh6pJ3kPUtXFWfgbNm9qS3HJyMdocH7RJwstGjr2i6qhqgwFpGI1SuK9avJXrNLqGDOzwiPsU8s/BNZ65k0LEUotz0Bt8LyuJvKhYTk8zFp8EFyps8SeGgjjhXT+miAy6pDFF4k5zWgWzI4NEMDYIdMh3JZV13eCj6AwEc1kcojn7KX/I1WI61vvv4qOPKND6PuWX2RzJmnBRwUXbP61CDyK8v+G3up7LB1o3w== 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=BWalOTbV6WkadaRmVIM2E9zQoeedsouuxoALIayiWSlRZgOv6R7CCyVTal0WB6QzikRol210xTsdh8XtFKbNOaYX6QIcVAqTBlpT/FfV8jRJ+COIwei/xmWtU+vCSWyWm1jcyKkhc7LqigQnA9kcAOpgrpw4jALIsVLJ/FONT+oHFbXdZPTGxaQSy2iHdcPXAGnOEL1U1JIB6WaYw9cjKDG3K4BxAPuizwaq+AUza9OOfUCXmGzUG89Pf00VcAjoslRlTvNGp2ArejKs0jwCywQ4VjOtXC/Q/CT1TQ2FtD5A/rOR5lurVfiHdzIQOZei6DBhgLr/PCXa68NmnCBfPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) 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=nUhK4cCInF03ooWqcmPDisWy02q2XaAmCz9G83Sz2AaPN6S1ptgbDc0PW+KDJc1AN04JffmuLdE5ShOE97Y2apgDJjjvUJyo/607clETUI2Vb0+0GHxmT4N/c77813KbXBApFNLSd0SxrmHvIwJyc9LawtojqG22yjAg/Aqs1Z+s5i4bFdZFx5RHyaXxeNTYJ/p2Ij0g4uAp5/LAbnF03nuBiFbkz9JCZia7OcPOGaVLVG36DmjG7lW5nUi+Jwl7sRzg5Sl2/X61hzOMSuKXnAh6WOZrzsKH5S7oe8OdbujW0NKmYiiL3grMtFOOJGv4KVY8fKAQioxCHJnzWVfmnw== Received: from CO2PR18CA0051.namprd18.prod.outlook.com (2603:10b6:104:2::19) by BL1PR12MB5032.namprd12.prod.outlook.com (2603:10b6:208:30a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Mon, 6 Jun 2022 11:21:50 +0000 Received: from CO1NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:104:2:cafe::38) by CO2PR18CA0051.outlook.office365.com (2603:10b6:104:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19 via Frontend Transport; Mon, 6 Jun 2022 11:21:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by CO1NAM11FT008.mail.protection.outlook.com (10.13.175.191) 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:21:49 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 6 Jun 2022 11:21:48 +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:21:44 -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:20:41 +0300 Message-ID: <20220606112109.208873-5-lizh@nvidia.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220606112109.208873-1-lizh@nvidia.com> References: <20220408075606.33056-1-lizh@nvidia.com> <20220606112109.208873-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: d30021d4-1984-4c9c-8bef-08da47aebfa2 X-MS-TrafficTypeDiagnostic: BL1PR12MB5032: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: nO73RtsCfZ3CBfJ4s/Q1n+3qVhFKD21kha1Gu6VRg5t0sqdKqNZaclHdBAUTNxL2n3j9O27OkrPO5iY4bcPmjPT6saGdPeKc3i88MU/355Jx83WXj0JqlYf2SUIYAsacxba/NG07GG57YP6kznrmxNecNU+iOa7xDoxgK9o8ynR2nBTHQZ6PiHuNPQImqc8oS0EShKNAj0w3tmFBTAJ/JTUuqhyAQZwhNFLPN/rm7V7FuS4nOajZyl4QsoERJghJYTY9quUTbg6nWZhQcHN201Xx7afvxS9UZQnAYL4t3LKGfKfoDY4EL1wtMcWYq9fGZnyPgCcob/9gjuPIQxckCAAHxYIRgVWKzWcfnCpa3GCGs6ft7B5qDp8FCWmoutOGo9SEtSiTXzlbt49NaM9RLJYUZC6PGqvWSOUP10tv6jJHhSAudqkUI57VeOCJXV3XfMfPOZi1KPULwIO0iE3wWX/9O1UKhNOrcQQu1m3vG46G+LnsTwPjRx9Ex5/U5nD2HLraYMMQ11apni2pqz8h8FkwshEdDZ/A6PNrQBZth2WknlObPKLwx82Zt/DYbY7oAUyOxhnTsfCKrYeNKEuaopHSRdsqx7bhW84uyjeHPWynKOBVRxBhIIlylb7QHeWV3QpIZUI7Uz0TE73HPj4D/Iq/sdOVSOY1tIIproL2zfPPBdPjfD8UQpn6YjUULdbmDDHU7suBFFLWUpp204pOZg== X-Forefront-Antispam-Report: CIP:12.22.5.234; 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)(83380400001)(82310400005)(4326008)(36860700001)(7696005)(1076003)(4744005)(16526019)(508600001)(2906002)(86362001)(186003)(2616005)(40460700003)(6666004)(8676002)(336012)(8936002)(426003)(110136005)(47076005)(36756003)(54906003)(70206006)(26005)(55016003)(6286002)(81166007)(356005)(316002)(5660300002)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2022 11:21:49.0391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d30021d4-1984-4c9c-8bef-08da47aebfa2 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.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5032 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