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 DC762A0C4F for ; Tue, 27 Jul 2021 07:43:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC5D6410F7; Tue, 27 Jul 2021 07:43:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B66BB410EC; Tue, 27 Jul 2021 07:43:39 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10057"; a="191968756" X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208,217";a="191968756" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2021 22:43:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,272,1620716400"; d="scan'208,217";a="434610731" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 26 Jul 2021 22:43:38 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 26 Jul 2021 22:43:37 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 26 Jul 2021 22:43:37 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 26 Jul 2021 22:43:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cmxmNXfj76LhpIwXP//wADfL0qGUHJh71Jn7M35ugDgv12c0tkj6LzEn3aWaPwd9ilZUcIlwPlhn21ibgxmd5vfptyR5Ci+owux2M9DngcAOjsOQIEnTF3YNTcdOkO1CTgmhClLcYmMX293CXt92cP9IZO18Lx9UJUqM4txYn5+cEj3lFFOliDCARcOuEkenExrpEZzPT/QFCIVH00o190upduX3affx4Y6GyT/LxEKPUjEB4Ds42hX7Wpr9R3+uZXzC68obtm7S6QJZnua3ukal1VkvaCz14aw9ITXaZVz9g4nN3FPr7zH6WGYTROZ/JG+ErXnnFFEwtQB1uuWRPw== 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-SenderADCheck; bh=zMgNPAMSTSr58GR7JaT/RlUe6r6rC5OU61GyAUm4qjE=; b=TTrMcAGhLxhYs42N8JMyX6JGIaoGdyuN0HT8AX3vHd5e4//K4Q/C0hC2/D+KoDC3iRNptvbw01PNPYmYV2Xlp60aqB1dDqyKBYM/tj0SZdxGEwJR2O4OQw0ElIEcpf4D/XvgB3xyo9AugVKHjuOP5M8gqVdCoSJ3hMYG9NFl0YRP+pghz9RZDxO9iTLHXtzu9+hkIcyCPXAV+Xsc+x+3WmlyqEXC+/si+EDP1xYoSab9G+HB2woinlYsUUW/V6hGjO0JTJXFktCrtKLNO5uPZoifzVP7hX4qwb+SU40IJduL01x3NBTaNHIO/9PgBa4f33+AJm9PiRMFAj1A8s83ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zMgNPAMSTSr58GR7JaT/RlUe6r6rC5OU61GyAUm4qjE=; b=mZTV+hnAhiq0H36QY9fz0dh55JPTmUvxfPIMa4fM94Ql0s+55aSVM2ynH34/mmsu0kCHCpYaI/Fesn+XLqPTF+ciBV5xzZ4He4+E0BWoNzvvN5D7Tv1vTpAQ33KEwn1B9Lj2I7Uk/6BDCZZUJfEqo8JydqjqJfw273AWrF+Y/FA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) by SA0PR11MB4573.namprd11.prod.outlook.com (2603:10b6:806:98::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.26; Tue, 27 Jul 2021 05:43:36 +0000 Received: from SA2PR11MB5210.namprd11.prod.outlook.com ([fe80::62:e9f9:6512:58c9]) by SA2PR11MB5210.namprd11.prod.outlook.com ([fe80::62:e9f9:6512:58c9%3]) with mapi id 15.20.4352.031; Tue, 27 Jul 2021 05:43:36 +0000 To: Dmitry Kozlyuk , CC: , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam References: <20210726213632.143296-1-dmitry.kozliuk@gmail.com> From: "Menon, Ranjit" Message-ID: <2dad194c-dd19-e884-62ce-3dcfec4bf5a1@intel.com> Date: Mon, 26 Jul 2021 22:43:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 In-Reply-To: <20210726213632.143296-1-dmitry.kozliuk@gmail.com> Content-Language: en-US X-ClientProxiedBy: MW4PR03CA0069.namprd03.prod.outlook.com (2603:10b6:303:b6::14) To SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.254.28] (50.39.109.205) by MW4PR03CA0069.namprd03.prod.outlook.com (2603:10b6:303:b6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.28 via Frontend Transport; Tue, 27 Jul 2021 05:43:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2aee89df-14c4-4463-df7d-08d950c17a25 X-MS-TrafficTypeDiagnostic: SA0PR11MB4573: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rF94Y9APVXqvLcROPCHSj7oE8OXKl6aJykU3xOD6JMuQIyXLua/ZisDNu8hGRlST03X3j6K+7kRKIoZRPtJWvfT4U0ylobaWicA9d2WDLn/3L8MTGSMVPQ7EoqBTf35LrABfOiODwFCleHQw3nvDP6JQY4WDdmZfEBNZ/KmTVc77yBYRwxBuoNx9g38Zen7RmpzhOdoeSxHF+UjCVzNwNLVIRSqXFNS0KwBnfU6XSK+r8RrNoPityg2Sq81Dw7MnzW5VrcK3EhWp73xlfLMMXy49efmjyl3ZrDRX+2MSQP7UxSeb4/8NkGEFksuxD10qIiZ6djNdsq5K6aL1jSZwGwRFvW3Vq3lrB/b/HF+Mi/hg6qYIH1zut/OqTXq3XcqlKbcS93gTvIuCcus0iHyH18oilY741dfauW5ZOeKNmTo4l96sDWBtaVcZ5eQYfvVPfDk9YwqQ+VyiuxHxWQG9TM9y+Zasaj4eF18PORAFIzgGFblRQoAhW78XyfXN9kN/lWJpdN6Iuj4YNdlME2CuDU1cNzfUPRccN+glKgQvomctePAIQj8+DI9rA+GPJC1MYSIef6YMH2HW4v2GWXD1LgqDE1kZGOZxH3QBeXs+/VSVQ+qts27QYsKVU4hxZr0y2oUos+drpeR2F9YTmj+xidOhTuCURjCGkQmFXTETgWh+GIQnfuv7j2tPuxgaapZzxVvrxuS1qO8XXWHaIdc43zJd21O6hgnLuy1XC9b/nvI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5210.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(346002)(396003)(376002)(39860400002)(366004)(6666004)(86362001)(478600001)(2906002)(2616005)(8936002)(26005)(107886003)(186003)(31686004)(8676002)(956004)(53546011)(54906003)(316002)(33964004)(66556008)(66946007)(66476007)(16576012)(38100700002)(5660300002)(6486002)(4326008)(31696002)(83380400001)(36756003)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T3UvUXd4dFZ6djJiQndSTW1GZXdOUjA3TTJQT0NGemVha1hReVhtekExbDNB?= =?utf-8?B?Rm1OeDM5TTFaL2dOUFEyK2EwQzRMRGVyTWVlZVAySEw5UExPMVhHOWVSajRW?= =?utf-8?B?VkowUlQ5bU5RMkIwMW9JU29PTUVIZXZaQmsyNXB5UzBlT25jU2lLUTF3Vzg2?= =?utf-8?B?dXpUUjg1dzNBMVJJTmRIdnBQcHdUbXY4QVdrSDNNVXc4aEJPa0czTm9paS9a?= =?utf-8?B?Nm5KV2hnbjVwTVBqcDR3R3JJN01OZHRpWll6dUlERkFPK1dmQklhUDdHMFZz?= =?utf-8?B?a0ZWVDIrS3JpU05WWTN1dnlYdlVpTkhhaUQvcGMyVzB0K0JoMzNhSklLTk96?= =?utf-8?B?a1RmazZJVjIzZjQ1SGZQMmFLUTBIVWpXY3JKRTRIdXNQU0thWGVsWWVPNFdC?= =?utf-8?B?dUlvbmcvSTErZ1JmWlpjeTBvRG1PNzRVMUlUN2lt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ajMzY3ZDLzFjcmhpQWdLemt3?= =?utf-8?B?OEUyQ1pTeXdudGRBbFpicWg5VFppVVZLMGNSL29mdHNNVnR0dm9qVFlHUmxm?= =?utf-8?B?VHRxZDJ6Z2lGcDFjcnA0dU1yQjdKaDhDOXJ5YjhmUklhdVBxNzZCZDA5U284?= =?utf-8?B?NCtLcjdab1p1TlpjbUFxaCtrc3BKQlFYaUwzbktBVUxWSzYxc0ZwWDk2Zldz?= =?utf-8?B?ZWJINGtkR285ckxqMVNVS2twODF2ZURLM0t5bHlYLyt5ZkRQdDhDb1hlL2dr?= =?utf-8?B?RkdINWE3WFZRd3NmcjROMVdTbG5RSE5TTC9mblR0UndPVVdSSlBVR2ZLMzRG?= =?utf-8?B?d21MYnh5WUExR3ZucTBWQ3gvSCtUOXcwWUhFUTdHWFJNeXptNnNvdDV6Y2dF?= =?utf-8?Q?QsYiArH/N1CrwvQ78MSbhvjDxGamtXSjqPx69GL?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2aee89df-14c4-4463-df7d-08d950c17a25 X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5210.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2021 05:43:36.3991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v/lThMPVExg/y6UqjbgOerhWLNlBXxEGxfb6r1NR5UFWR8SMlvvpD5BFm0szpU8eIsG7gri8I1Sll/g3Y1X+QA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4573 X-OriginatorOrg: intel.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] eal/windows: cleanup virt2phys handle 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" On 7/26/2021 2:36 PM, Dmitry Kozlyuk wrote: > eal_mem_virt2phys_init() opens a handle for use by rte_mem_virt2phy(). > Close this handle on EAL cleanup. > > Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management") > Cc: stable@dpdk.org > > Signed-off-by: Dmitry Kozlyuk > --- > lib/eal/windows/eal.c | 1 + > lib/eal/windows/eal_memory.c | 7 +++++++ > lib/eal/windows/eal_windows.h | 5 +++++ > 3 files changed, 13 insertions(+) > > diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c > index 5413d4d87f..3d8c520412 100644 > --- a/lib/eal/windows/eal.c > +++ b/lib/eal/windows/eal.c > @@ -261,6 +261,7 @@ rte_eal_cleanup(void) > eal_get_internal_configuration(); > > eal_intr_thread_cancel(); > + eal_mem_virt2iova_cleanup(); > /* after this point, any DPDK pointers will become dangling */ > rte_eal_memory_detach(); > eal_cleanup_config(internal_conf); > diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c > index 4db048ccb5..71741fc07e 100644 > --- a/lib/eal/windows/eal_memory.c > +++ b/lib/eal/windows/eal_memory.c > @@ -198,6 +198,13 @@ eal_mem_virt2iova_init(void) > return ret; > } > > +void > +eal_mem_virt2iova_cleanup(void) > +{ > + if (virt2phys_device != INVALID_HANDLE_VALUE) > + CloseHandle(virt2phys_device); > +} > + > phys_addr_t > rte_mem_virt2phy(const void *virt) > { > diff --git a/lib/eal/windows/eal_windows.h b/lib/eal/windows/eal_windows.h > index 7cc811485d..23ead6d30c 100644 > --- a/lib/eal/windows/eal_windows.h > +++ b/lib/eal/windows/eal_windows.h > @@ -79,6 +79,11 @@ void eal_intr_thread_cancel(void); > */ > int eal_mem_virt2iova_init(void); > > +/** > + * Cleanup resources used for virtual to physical address translation. > + */ > +void eal_mem_virt2iova_cleanup(void); > + > /** > * Locate Win32 memory management routines in system libraries. > * Acked-by: Ranjit Menon