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 712F6A04B5; Tue, 29 Sep 2020 19:29:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6C9E1DA5F; Tue, 29 Sep 2020 19:29:33 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6C5451DA30 for ; Tue, 29 Sep 2020 19:29:30 +0200 (CEST) IronPort-SDR: 5Hh2PWY/JWxL1us0xjmZPon0EqImHjtR20jKldFHPRJKmtsihsTHBRHMpMBuA+BtFkDzkzDnO+ PVD1f6skSsSA== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="163121342" X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="163121342" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 10:29:27 -0700 IronPort-SDR: 7sMaKZEdLPC+3nbeXLMGIPAo6wbogPIX83DsavndsU0lm9CyemtMze7h60ue9MZHRfwiCPHFb7 DolWO42IMZ6g== X-IronPort-AV: E=Sophos;i="5.77,319,1596524400"; d="scan'208";a="457354419" Received: from rmenon-desk.amr.corp.intel.com (HELO [10.166.30.253]) ([10.166.30.253]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 10:29:27 -0700 To: Tal Shnaiderman , Pallavi Kadam , "dev@dpdk.org" , NBU-Contact-Thomas Monjalon Cc: "John.Alexander@datapath.co.uk" , "dmitry.kozliuk@gmail.com" , "Narcisa.Vasile@microsoft.com" References: <20200922030531.6928-1-pallavi.kadam@intel.com> <20200925015327.2916-1-pallavi.kadam@intel.com> From: Ranjit Menon Message-ID: Date: Tue, 29 Sep 2020 10:29:27 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v5] bus/pci: netuio interface for 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" Hi Tal, On 9/29/2020 1:28 AM, Tal Shnaiderman wrote: [snip] > In general: > > Regarding the issue Ranjit mentioned in the last community call on duplicated detection of netuio devices both as GUID_DEVCLASS_NETUIO and GUID_DEVCLASS_NET, in pci_scan_one there is actually code that take cares of duplicated detection by leaving only one in the device list, up until nor I saw it in action only in virtualization where BDF of several devices was equal. > > Assuming this is resolved with the addition of segment id as domain id the change we need is to give precedence to GUID_DEVCLASS_NETUIO, something like: > > @@ -372,11 +372,15 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data) > } else if (ret < 0) { > rte_pci_insert_device(dev2, dev); > } else { /* already registered */ > + if (IsEqualGUID(&(device_info_data.ClassGuid), > + &GUID_DEVCLASS_NETUIO) { > dev2->kdrv = dev->kdrv; > dev2->max_vfs = dev->max_vfs; > memmove(dev2->mem_resource, dev->mem_resource, > sizeof(dev->mem_resource)); > + } > free(dev); > } > return 0; > } The issue I raised is slightly different: How do we distinguish between different GUID_DEVCLASS_NET class devices - those that can support DPDK and those that can't? For instance, say we have 3 NICs in the system - MLX5 NIC, Intel i40e NIC and Intel ice NIC - all loaded with standard ethernet (NDIS) drivers. Now if I load and bind the netuio driver to the Intel ice NIC, I have one GUID_DEVCLASS_NETUIO class device and two GUID_DEVCLASS_NET class devices. If I run the pci scan now, it will detect all 3 devices and add them to the list. However, the Intel i40e NIC which is correctly detected as a GUID_DEVCLASS_NET class and is bound to the standard NDIS driver cannot support DPDK and should be excluded from the list. I think the suggestion at the community meeting was to define a DEV interface which can be queried for confirming DPDK support. In such a case, the MLX5 driver should support this interface, where as our standard i40e (NDIS) driver will not. This check can be used to exclude this device from the list. ranjit m.