From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 78C3CA054F;
	Tue, 18 Feb 2020 22:44:34 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 4D4421BFFF;
	Tue, 18 Feb 2020 22:44:33 +0100 (CET)
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by dpdk.org (Postfix) with ESMTP id BEC781BFF7
 for <dev@dpdk.org>; Tue, 18 Feb 2020 22:44:31 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 18 Feb 2020 13:44:30 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.70,458,1574150400"; d="scan'208";a="436001158"
Received: from rmenon-mobl.amr.corp.intel.com (HELO [134.134.172.78])
 ([134.134.172.78])
 by fmsmga006.fm.intel.com with ESMTP; 18 Feb 2020 13:44:30 -0800
From: Ranjit Menon <ranjit.menon@intel.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: Pallavi Kadam <pallavi.kadam@intel.com>,
 Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>, dev@dpdk.org
References: <20200208114546.546db2d0@Sovereign>
 <9a3fca13-bebc-cc87-d955-06b41fdbcdfe@intel.com>
 <20200210091426.17b215db@Sovereign> <20200217041424.22afb6dc@Sovereign>
Message-ID: <13c23300-f41f-4e9a-c830-a81ace3593c8@intel.com>
Date: Tue, 18 Feb 2020 13:44:30 -0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <20200217041424.22afb6dc@Sovereign>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] Windows Draft Build
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On 2/16/2020 5:14 PM, Dmitry Kozlyuk wrote:
> Hi,
>
> > "Dpdk.sln" builds OK, will try launching sample apps
> > a bit later.
>
> Netuio driver consistently fails to install on Windows 10 in QEMU with
> virtio-net (modern interface). Described below is my attempt to install the
> driver from clean "windpdk-v18.08-clang" branch of "dpdk-draft-windows" repo.
> The only change is hardware ID in INF file. What am I doing wrong here?
>
> 1. QEMU version: 4.2.0
>
> QEMU command line:
>
>      qemu-system-x86_64 \
>          -enable-kvm \
>          -cpu host -smp 'cores=4,sockets=1,threads=1' \
>          -m 6G \
>          -drive "file=$disk,format=qcow2" \
>          -nic "user,id=winnet,model=e1000,smb=$HOME/src/dpdk" \
>          -netdev 'socket,listen=:10000,id=dp0' -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp0' \
>          -netdev 'socket,listen=:10001,id=dp1' -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp1' \
>          \
>          -vga qxl
>
>
> 2. Loading unsigned drivers is enabled as follows:
>
>       Microsoft Windows [Version 10.0.18363.418]
>       (c) 2019 Microsoft Corporation. All rights reserved.
>
>       Z:\>bcdedit.exe -set loadoptions DISABLE_INTEGRITY_CHECKS
>       The operation completed successfully.
>
>       Z:\>bcdedit.exe -set TESTSIGNING ON
>       The operation completed successfully.
>
>       Z:\>shutdown -r -t 0
>
> After that, the desktop message shows:
>
>       Test Mode
>       Windows 10 Pro
>       Build 18362.19h1_release.190318-1202
>
> Including this step FTR, it works for other drivers.
>
>
> 3. Device status (no conflicting drivers):
>
>       The drivers for this device are not installed. (Code 28)
>
>       There are no compatible drivers for this device.
>
>
>       To find a driver for this device, click Update Driver.
>
> Device event log (note the hardware ID part):
>
>       Device PCI\VEN_1AF4&DEV_1041&SUBSYS_11001AF4&REV_01\3&13c0b0c5&0&20
>       requires further installation.
>
>
> 4. INF file is modified to include corresponding hardware ID:
>
> diff --git a/kernel/windows/netuio/netuio.inf b/kernel/windows/netuio/netuio.inf
> index b1696cc50..b6fd2c798 100644
> --- a/kernel/windows/netuio/netuio.inf
> +++ b/kernel/windows/netuio/netuio.inf
> @@ -55,6 +55,7 @@ DriverVer=
>   %F158B.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_158B   ; I40E_DEV_ID_25G_SFP28
>   %F37D0.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_37D0
>   %F153B.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_153B
> +%virtio.netuio.Description%=netuio_Device, PCI\VEN_1AF4&DEV_1041&SUBSYS_11001AF4&REV_01
>
>   [netuio_Device.NT]
>   CopyFiles=Drivers_Dir
> @@ -121,5 +122,6 @@ F158A.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Network Adapter XX
>   F158B.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Network Adapter XXV710-DA1"
>   F37D0.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Connection X722"
>   F153B.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Connection I217-V"
> +virtio.netuio.Description = "DPDK netUIO for virtio-net (modern)"
>   netuio.DeviceDesc = "netuio Device"
>   netuio.SVCDESC = "netuio Service"
>
>
> 5. Installation command fails after waiting for several minutes:
>
>       Z:\>pnputil /add-driver Z:\windows\x64\Debug\netuio\netuio\netuio.inf /install
>       Microsoft PnP Utility
>
>       Adding driver package:  netuio.inf
>       Driver package added successfully.
>       Published Name:         oem2.inf
>       Unable to install driver package: This operation returned because the timeout period expired.
>
>       Total driver packages:  1
>       Added driver packages:  0
>
>       Z:\>
>
> Please find "C:\Windows\INF\setupapi.dev.log" attached as "clean_setupapi.dev.log".
> Using devcon.exe from DDK yields similar result and log.
>
> I also tried to add event tracing to the driver, but the driver doesn't even
> get loaded, that is, DriverEntry is never called, so the cause shouldn't be
> in driver code.
>
>
> > I'm planning to use QEMU and virtio PMD (modern interface,
> > because legacy uses PIO, which is not implemented by netuio) by adding a
> > project similar to existing "librte_pmd_i40e".
>
> Also tried doing this, attaching patches. Got the same result.
>
> I start every new attempt to install a driver variant from clean system
> restored from disk snapshot. "Userpci" driver from my port installs and binds
> OK, so this is not an QEMU/Windows incompatibility issue.
>
Oh boy! If DriverEntry() is not being called, the loader is finding something wrong and is unable to load the driver.

@Harini: Can Jeffrey (@MS) help here?

thanks,

Ranjit