From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A96F7A04A3; Fri, 1 May 2020 03:08:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3EEDF1DAA2; Fri, 1 May 2020 03:08:43 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 1ACF91D714 for ; Fri, 1 May 2020 03:08:40 +0200 (CEST) IronPort-SDR: mjCwgaSo4iJo53V/eCLynWWIJHXe2BUc39po8cgECq+YXaIJbx/f/Tu1YLXse0Ox7FDZP+Kh6x v+zCqOxAz4DA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2020 18:08:39 -0700 IronPort-SDR: SA6N0WRAtuE5k91CarNqxrzl4c/dN48o5tiYu62FpPSq5X/7xrE+FoDIOWX8epY1AIAW/0FtBs Ch0FXMeTajeQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,337,1583222400"; d="scan'208";a="293756132" Received: from rmenon-mobl.amr.corp.intel.com (HELO [10.212.227.195]) ([10.212.227.195]) by fmsmga002.fm.intel.com with ESMTP; 30 Apr 2020 18:08:39 -0700 To: Dmitry Kozlyuk , Thomas Monjalon Cc: Pallavi Kadam , dev@dpdk.org, Harini.Ramakrishnan@microsoft.com, Narcisa.Vasile@microsoft.com, tbashar@mellanox.com References: <20200429232427.7112-1-pallavi.kadam@intel.com> <20200429232427.7112-3-pallavi.kadam@intel.com> <1826663.L1bRAqqpGC@thomas> <20200430103051.5df8b23a@Sovereign> From: Ranjit Menon Message-ID: <9807143d-1a85-eef9-5ea2-0609b044b147@intel.com> Date: Thu, 30 Apr 2020 18:08:39 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200430103051.5df8b23a@Sovereign> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add fnmatch implementation on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/30/2020 12:30 AM, Dmitry Kozlyuk wrote: > On 2020-04-30 08:52 GMT+0200 Thomas Monjalon wrote: >> 30/04/2020 01:24, Pallavi Kadam: >>> Added fnmatch implementation on Windows to support >>> log level arguments. >>> The source file is with BSD-3-Clause license. >>> https://github.com/lattera/freebsd/blob/master/usr.bin/csup/fnmatch.c >> >> Sorry for the naive question, I don't know Windows programming. >> >> Do we really need this external code? >> Why RtlIsNameInExpression from Windows cannot be used? >> https://docs.microsoft.com/en-us/windows/win32/devnotes/rtlisnameinexpression > > The general reason not to use Win32 API for globbing is poorly documented > contract: what are the exact matching rules? They're definitely incompatible > with fnmatch(3). IMO small external code is better than unknown behavior. > > RtlIsNameInExpression is an internal call for drivers and services with a > cumbersome API. PathMatchSpecA is the user-mode interface, but see above. > > https://docs.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathmatchspeca > I will agree with Dmitry here. The fnmatch external code is shipping, production quality code. So it's better to use it than writing something new. ranjit m.