windows/netuio: add netuio driver for Windows
cover windows/netuio: add netuio driver for Windows
From: Narcisa Vasile <[email protected]>
The NetUIO driver for Windows allows the usermode application
to directly access the hardware and allocates the memory that gets mapped in usermode.
Anand Rawat (1):
Updated Source and Project files to use Clang toolset
Harini Ramakrishnan (10):
Windows DPDK libraries and applications have now been updated to the
latest public release v18.08, of the main DPDK source.
doc: remove embedded buffer from Windows UIO ioctl Windows DPDK libraries and applications have now been updated to the
latest public release v18.08, of the main DPDK source.
doc: change the Windows UIO driver's default security descriptor to
admin only
doc: remove lower bound on mapped address from Windows UIO driver
doc: remove embedded buffer from Windows UIO ioctl
uio: move SDDL string to INF on Windows
uio: Fix 64 bit BARs mapping
license: update headers with BSD 3-clause license:
doc: updating REAME for NetUIO driver
Jason Messer (2):
Initial commit of UIO driver for Windows
Added new core libraries for Windows
Narcisa Vasile (8):
Update .gitignore and create .gitattributes
uio: Use local time when verifying INF DriverVer
uio: Remove co-installers section from inf
uio: Wrap call into try/except block
uio: Use request handler that guarantees execution in correct context
uio: Change the device setup class to a custom one
Enable DMA remapping through INF directive
Move all files under windows folder
Thomas Monjalon (1):
init DPDK repository
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 1/22 init DPDK repository
From: Thomas Monjalon <[email protected]>
--- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore
.gitignore new file +0 -0
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 01/22] init DPDK repository
.gitignore
Quoted 10 lines · Narcisa Ana Maria Vasile
From: Thomas Monjalon <[email protected]>
--- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore.gitignore new file +0
-0
This commit is not needed.
PATCH 2/22 Initial commit of UIO driver for Windows
In reply to Narcisa Ana Maria VasileFrom: Jason Messer <[email protected]>
--- mk/exec-env/windows/netuio/netuio.sln | 24 ++++ mk/exec-env/windows/netuio/netuio.vcxproj | 108 ++++++++++++++++++ .../windows/netuio/netuio.vcxproj.filters | 59 ++++++++++ .../windows/netuio/netuio.vcxproj.user | 11 ++ 4 files changed, 202 insertions(+) create mode 100644 mk/exec-env/windows/netuio/netuio.sln create mode 100644 mk/exec-env/windows/netuio/netuio.vcxproj create mode 100644 mk/exec-env/windows/netuio/netuio.vcxproj.filters create mode 100644 mk/exec-env/windows/netuio/netuio.vcxproj.user
mk/exec-env/windows/netuio/netuio.sln new file +24 -0
@@ -0,0 +1,24 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netuio", "netuio.vcxproj", "{66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Debug|x64.ActiveCfg = Debug|x64 + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Debug|x64.Build.0 = Debug|x64 + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Debug|x64.Deploy.0 = Debug|x64 + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Release|x64.ActiveCfg = Release|x64 + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Release|x64.Build.0 = Release|x64 + {66EC91EF-AC5B-4D1E-8314-9B3E2855CCF6}.Release|x64.Deploy.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal
mk/exec-env/windows/netuio/netuio.vcxproj new file +108 -0
109 lines not on this page · raw message
mk/exec-env/windows/netuio/netuio.vcxproj.filters new file +59 -0
60 lines not on this page · raw message
mk/exec-env/windows/netuio/netuio.vcxproj.user new file +11 -0
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <TestCertificate> + </TestCertificate> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <TestCertificate> + </TestCertificate> + </PropertyGroup> +</Project>
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 3/22 Added new core libraries for Windows
In reply to Narcisa Ana Maria VasileFrom: Jason Messer <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mk/exec-env/windows/netuio/netuio.vcxproj +2 -2
@@ -66,7 +66,7 @@ <WppMinimalRebuildFromTracking>false</WppMinimalRebuildFromTracking> </ClCompile> <Inf> - <TimeStamp>0.6.0.2</TimeStamp> + <TimeStamp>0.6.0.5</TimeStamp> </Inf> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -78,7 +78,7 @@ <WppMinimalRebuildFromTracking>false</WppMinimalRebuildFromTracking> </ClCompile> <Inf> - <TimeStamp>0.6.0.2</TimeStamp> + <TimeStamp>0.6.0.5</TimeStamp> </Inf> </ItemDefinitionGroup> <ItemGroup>
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 03/22] Added new core libraries for Windows
Quoted 20 lines · Narcisa Ana Maria Vasile
From: Jason Messer <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)mk/exec-env/windows/netuio/netuio.vcxproj +1
-1@@ -66,7 +66,7 @@ <WppMinimalRebuildFromTracking>false</WppMinimalRebuildFromTracking> </ClCompile> <Inf> - <TimeStamp>0.6.0.2</TimeStamp> + <TimeStamp>0.6.0.5</TimeStamp> </Inf> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
mk/exec-env/windows/netuio/netuio.vcxproj line 84
Quoted 8 lines
mk/exec-env/windows/netuio/netuio.vcxproj +1
-1@@ -78,7 +78,7 @@ <WppMinimalRebuildFromTracking>false</WppMinimalRebuildFromTracking> </ClCompile> <Inf> - <TimeStamp>0.6.0.2</TimeStamp> + <TimeStamp>0.6.0.5</TimeStamp> </Inf> </ItemDefinitionGroup> <ItemGroup>
Commit subject does not match content. Is this commit even needed?
PATCH 4/22 Windows DPDK libraries and applications have now been updated to the latest public release v18.08, of the main DPDK source.
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 20 +++++++++---------- .../windows/netuio/netuio.vcxproj.filters | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-)
mk/exec-env/windows/netuio/netuio.vcxproj +10 -10
@@ -85,22 +85,22 @@ <FilesToPackage Include="$(TargetPath)" /> </ItemGroup> <ItemGroup> - <Inf Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio.inf" /> + <Inf Include="..\..\..\..\kernel\windows\netuio\netuio.inf" /> </ItemGroup> <ItemGroup> - <ResourceCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio.rc" /> + <ResourceCompile Include="..\..\..\..\kernel\windows\netuio\netuio.rc" /> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_dev.h" /> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_drv.h" /> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_interface.h" /> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_queue.h" /> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\resource.h" /> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_dev.h" /> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_drv.h" /> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_interface.h" /> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_queue.h" /> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\resource.h" /> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_dev.c" /> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_drv.c" /> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_queue.c" /> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_dev.c" /> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_drv.c" /> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_queue.c" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets">
mk/exec-env/windows/netuio/netuio.vcxproj.filters +10 -10
@@ -19,40 +19,40 @@ </Filter> </ItemGroup> <ItemGroup> - <Inf Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio.inf"> + <Inf Include="..\..\..\..\kernel\windows\netuio\netuio.inf"> <Filter>Driver Files</Filter> </Inf> </ItemGroup> <ItemGroup> - <ResourceCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio.rc"> + <ResourceCompile Include="..\..\..\..\kernel\windows\netuio\netuio.rc"> <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_interface.h"> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_interface.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_dev.h"> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_dev.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_drv.h"> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_drv.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_queue.h"> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\netuio_queue.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="..\..\..\..\lib\librte_eal\windows\netuio\resource.h"> + <ClInclude Include="..\..\..\..\kernel\windows\netuio\resource.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_queue.c"> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_queue.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_dev.c"> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_dev.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="..\..\..\..\lib\librte_eal\windows\netuio\netuio_drv.c"> + <ClCompile Include="..\..\..\..\kernel\windows\netuio\netuio_drv.c"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup>
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 5/22 doc: remove embedded buffer from Windows UIO ioctl
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 6 ++++++ 1 file changed, 6 insertions(+)
mk/exec-env/windows/netuio/netuio.vcxproj +6 -0
@@ -68,6 +68,9 @@ <Inf> <TimeStamp>0.6.0.5</TimeStamp> </Inf> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile>
@@ -80,6 +83,9 @@ <Inf> <TimeStamp>0.6.0.5</TimeStamp> </Inf> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemGroup> <FilesToPackage Include="$(TargetPath)" />
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 05/22] doc: remove embedded buffer from Windows UIO ioctl
Quoted 21 lines · Narcisa Ana Maria Vasile
From: Harini Ramakrishnan <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 6 ++++++ 1 file changed, 6 insertions(+)mk/exec-env/windows/netuio/netuio.vcxproj +3
-0@@ -68,6 +68,9 @@ <Inf> <TimeStamp>0.6.0.5</TimeStamp> </Inf> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile>
mk/exec-env/windows/netuio/netuio.vcxproj line 91
Quoted 9 lines
mk/exec-env/windows/netuio/netuio.vcxproj +3
-0@@ -80,6 +83,9 @@ <Inf> <TimeStamp>0.6.0.5</TimeStamp> </Inf> + <Link> + <AdditionalDependencies>%(AdditionalDependencies);$(KernelBufferOverflowLib);$(DDK_LIB_PATH)ntoskrnl.lib;$(DDK_LIB_PATH)hal.lib;$(DDK_LIB_PATH)wmilib.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfLdr.lib;$(KMDF_LIB_PATH)$(KMDF_VER_PATH)\WdfDriverEntry.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies> + </Link> </ItemDefinitionGroup> <ItemGroup> <FilesToPackage Include="$(TargetPath)" />
Commit subject doesn't match content. It this commit needed as standalone?
PATCH 6/22 Windows DPDK libraries and applications have now been updated to the latest public release v18.08, of the main DPDK source.
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio.inf | 118 +++++++++ kernel/windows/netuio/netuio.rc | Bin 0 -> 4772 bytes kernel/windows/netuio/netuio_dev.c | 306 +++++++++++++++++++++++ kernel/windows/netuio/netuio_dev.h | 65 +++++ kernel/windows/netuio/netuio_drv.c | 142 +++++++++++ kernel/windows/netuio/netuio_drv.h | 33 +++ kernel/windows/netuio/netuio_interface.h | 69 +++++ kernel/windows/netuio/netuio_queue.c | 271 ++++++++++++++++++++ kernel/windows/netuio/netuio_queue.h | 30 +++ kernel/windows/netuio/resource.h | 14 ++ 10 files changed, 1048 insertions(+) create mode 100644 kernel/windows/netuio/netuio.inf create mode 100644 kernel/windows/netuio/netuio.rc create mode 100644 kernel/windows/netuio/netuio_dev.c create mode 100644 kernel/windows/netuio/netuio_dev.h create mode 100644 kernel/windows/netuio/netuio_drv.c create mode 100644 kernel/windows/netuio/netuio_drv.h create mode 100644 kernel/windows/netuio/netuio_interface.h create mode 100644 kernel/windows/netuio/netuio_queue.c create mode 100644 kernel/windows/netuio/netuio_queue.h create mode 100644 kernel/windows/netuio/resource.h
kernel/windows/netuio/netuio.inf new file +118 -0
@@ -0,0 +1,118 @@ +; +; BSD LICENSE +; +; Copyright(c) 2010-2018 Intel Corporation. All rights reserved. +; All rights reserved. +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +; +; +; netuio.inf +; + +[Version] +Signature="$WINDOWS NT$" +Class=Net +ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} +Provider=%ManufacturerName% +CatalogFile=netuio.cat +DriverVer= + +;***************************************** +; Install Section +;***************************************** + +[Manufacturer] +%ManufacturerName%=Standard,NT$ARCH$ + +[Standard.NT$ARCH$] +%F1583.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_1583 +%F158A.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_158A ; I40E_DEV_ID_25G_B +%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 + +[netuio_Device.NT] +CopyFiles=Drivers_Dir + +[Drivers_Dir] +netuio.sys + +;-------------- Service installation +[netuio_Device.NT.Services] +AddService = netuio,%SPSVCINST_ASSOCSERVICE%, netuio_Service_Inst + +; -------------- netuio driver install sections +[netuio_Service_Inst] +DisplayName = %netuio.SVCDESC% +ServiceType = 1 ; SERVICE_KERNEL_DRIVER +StartType = 3 ; SERVICE_DEMAND_START +ErrorControl = 1 ; SERVICE_ERROR_NORMAL +ServiceBinary = %12%\netuio.sys + +; +;--- netuio_Device Coinstaller installation ------ +; + +[DestinationDirs] +DefaultDestDir = 12 +netuio_Device_CoInstaller_CopyFiles = 11 + +[netuio_Device.NT.CoInstallers] +AddReg=netuio_Device_CoInstaller_AddReg +CopyFiles=netuio_Device_CoInstaller_CopyFiles + +[netuio_Device_CoInstaller_AddReg] +HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" + +[netuio_Device_CoInstaller_CopyFiles] +WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll + +[SourceDisksNames] +1 = %DiskName%,,,"" + +[SourceDisksFiles] +netuio.sys = 1,, +WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames + +[netuio_Device.NT.Wdf] +KmdfService = netuio, netuio_wdfsect +[netuio_wdfsect] +KmdfLibraryVersion = $KMDFVERSION$ + +[Strings] +SPSVCINST_ASSOCSERVICE= 0x00000002 +ManufacturerName="Intel" +ClassName = "Intel(R) DPDK netUIO Driver" +DiskName = "DPDK netUIO Installation Disk" +F1583.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Converged Network Adapter XL710-Q2" +F158A.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Network Adapter XXV710 for 25GbE backplane" +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" +netuio.DeviceDesc = "netuio Device" +netuio.SVCDESC = "netuio Service"
kernel/windows/netuio/netuio.rc new file binary +0 -0
kernel/windows/netuio/netuio_dev.c new file +306 -0
306 lines not on this page · raw message
kernel/windows/netuio/netuio_dev.h new file +65 -0
65 lines not on this page · raw message
kernel/windows/netuio/netuio_drv.c new file +142 -0
142 lines not on this page · raw message
kernel/windows/netuio/netuio_drv.h new file +33 -0
@@ -0,0 +1,33 @@ +/*- +* +* Copyright(c) 2017 Intel Corporation. All rights reserved. +* +*/ + + +#ifndef NETUIO_DRV_H +#define NETUIO_DRV_H + +#define INITGUID + +#include <ntddk.h> +#include <wdf.h> + +#include "netuio_dev.h" +#include "netuio_queue.h" + +EXTERN_C_START + +// Print output constants +#define DPFLTR_NETUIO_INFO_LEVEL 35 + +// WDFDRIVER Events +DRIVER_INITIALIZE DriverEntry; +EVT_WDF_DRIVER_DEVICE_ADD netuio_evt_device_add; +EVT_WDF_OBJECT_CONTEXT_CLEANUP netuio_evt_driver_context_cleanup; +EVT_WDF_DEVICE_PREPARE_HARDWARE netuio_evt_prepare_hw; +EVT_WDF_DEVICE_RELEASE_HARDWARE netuio_evt_release_hw; + +EXTERN_C_END + +#endif // NETUIO_DRV_H
kernel/windows/netuio/netuio_interface.h new file +69 -0
69 lines not on this page · raw message
kernel/windows/netuio/netuio_queue.c new file +271 -0
271 lines not on this page · raw message
kernel/windows/netuio/netuio_queue.h new file +30 -0
@@ -0,0 +1,30 @@ +/*- +* +* Copyright(c) 2017 Intel Corporation. All rights reserved. +* +*/ + + +#ifndef NETUIO_QUEUE_H +#define NETUIO_QUEUE_H + +EXTERN_C_START + +// This is the context that can be placed per queue and would contain per queue information. +typedef struct _QUEUE_CONTEXT { +ULONG PrivateDeviceData;// just a placeholder +}QUEUE_CONTEXT , *PQUEUE_CONTEXT ; + +WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(QUEUE_CONTEXT, QueueGetContext) + + +NTSTATUS +netuio_queue_initialize(_In_ WDFDEVICE hDevice); + +// Events from the IoQueue object +EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL netuio_evt_IO_device_control; +EVT_WDF_IO_QUEUE_IO_STOP netuio_evt_IO_stop; + +EXTERN_C_END + +#endif // NETUIO_QUEUE_H
kernel/windows/netuio/resource.h new file +14 -0
@@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by netuio.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 7/22 doc: change the Windows UIO driver's default security descriptor to admin only
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio_dev.c | 54 +++++++++++++++++------------- 1 file changed, 30 insertions(+), 24 deletions(-)
kernel/windows/netuio/netuio_dev.c +30 -24
@@ -32,37 +32,43 @@ netuio_create_device(_Inout_ PWDFDEVICE_INIT DeviceInit)NTSTATUS status;PAGED_CODE (); -WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); -// Set the device context cleanup callback. -// This function will be called when the WDF Device Object associated to the current device is destroyed - deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; +// Ensure that only administrators can access our device object. + status =WdfDeviceInitAssignSDDLString (DeviceInit, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL ); - status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device); +if (NT_SUCCESS (status)) { +WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); -if (NT_SUCCESS (status)) { -// Create a device interface so that applications can find and talk to us. - status =WdfDeviceCreateDeviceInterface (device, &GUID_DEVINTERFACE_netUIO,NULL ); +// Set the device context cleanup callback. +// This function will be called when the WDF Device Object associated to the current device is destroyed + deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; -if (NT_SUCCESS (status)) { -// Retrieve and store PCI information - status =get_pci_device_info (device); - } + status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device); + } -if (NT_SUCCESS (status)) { -// Create a symbolic link name for user-space access - status =create_device_specific_symbolic_link (device); - } +if (NT_SUCCESS (status)) { +// Create a device interface so that applications can find and talk to us. + status =WdfDeviceCreateDeviceInterface (device, &GUID_DEVINTERFACE_netUIO,NULL ); + } -if (NT_SUCCESS (status)) { -// Initialize the I/O Package and any Queues - status =netuio_queue_initialize (device); - } +if (NT_SUCCESS (status)) { +// Retrieve and store PCI information + status =get_pci_device_info (device); + } -if (NT_SUCCESS (status)) { -// Allocate physically contiguous memory for user process use. We'll map it later - status =allocate_usermemory_segment (device); - } +if (NT_SUCCESS (status)) { +// Create a symbolic link name for user-space access + status =create_device_specific_symbolic_link (device); + } + +if (NT_SUCCESS (status)) { +// Initialize the I/O Package and any Queues + status =netuio_queue_initialize (device); + } + +if (NT_SUCCESS (status)) { +// Allocate physically contiguous memory for user process use. We'll map it later + status =allocate_usermemory_segment (device); }return status;
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 8/22 doc: remove lower bound on mapped address from Windows UIO driver
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio_dev.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
kernel/windows/netuio/netuio_dev.c +11 -11
@@ -28,23 +28,23 @@ NTSTATUS netuio_create_device(_Inout_ PWDFDEVICE_INIT DeviceInit) {WDF_OBJECT_ATTRIBUTES deviceAttributes; -WDFDEVICE device; +WDFDEVICE device =NULL ;NTSTATUS status;PAGED_CODE (); -// Ensure that only administrators can access our device object. - status =WdfDeviceInitAssignSDDLString (DeviceInit, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL ); +// Ensure that only administrators can access our device object. + status =WdfDeviceInitAssignSDDLString (DeviceInit, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL ); -if (NT_SUCCESS (status)) { -WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); +if (NT_SUCCESS (status)) { +WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); -// Set the device context cleanup callback. -// This function will be called when the WDF Device Object associated to the current device is destroyed - deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; +// Set the device context cleanup callback. +// This function will be called when the WDF Device Object associated to the current device is destroyed + deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; - status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device); - } + status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device); + }if (NT_SUCCESS (status)) {// Create a device interface so that applications can find and talk to us.
@@ -263,7 +263,7 @@ allocate_usermemory_segment(_In_ WDFOBJECT device)PHYSICAL_ADDRESS highest_acceptable_address;PHYSICAL_ADDRESS boundary_address_multiple; - lowest_acceptable_address.QuadPart =0x0000000000800000 ; + lowest_acceptable_address.QuadPart =0x0000000000000000 ; highest_acceptable_address.QuadPart =0xFFFFFFFFFFFFFFFF ; boundary_address_multiple.QuadPart =0 ;
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 9/22 doc: remove embedded buffer from Windows UIO ioctl
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio_interface.h | 9 ++++- kernel/windows/netuio/netuio_queue.c | 43 ++++++++++++++++++------ 2 files changed, 40 insertions(+), 12 deletions(-)
kernel/windows/netuio/netuio_interface.h +8 -1
@@ -59,9 +59,16 @@ struct dpdk_private_infostruct dpdk_pci_config_io {struct dev_addr dev_addr; -PVOID buf;UINT32 offset;enum pci_io op; +UINT32 access_size;// 1, 2, 4, or 8 bytes + +union dpdk_pci_config_io_data { +UINT8 u8; +UINT16 u16; +UINT32 u32; +UINT64 u64; + } data; };#pragma pack(pop)
kernel/windows/netuio/netuio_queue.c +32 -11
80 lines not on this page · raw message
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 10/22 uio: move SDDL string to INF on Windows
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio.inf | 7 +++++++ kernel/windows/netuio/netuio_dev.c | 15 +++++---------- 2 files changed, 12 insertions(+), 10 deletions(-)
kernel/windows/netuio/netuio.inf +7 -0
@@ -62,6 +62,13 @@ CopyFiles=Drivers_Dir [Drivers_Dir] netuio.sys +[netuio_Device.NT.HW] +AddReg=Device.HW.Registry + +[Device.HW.Registry] +; Ensure that only administrators can access our device object. +HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" + ;-------------- Service installation [netuio_Device.NT.Services] AddService = netuio,%SPSVCINST_ASSOCSERVICE%, netuio_Service_Inst
kernel/windows/netuio/netuio_dev.c +5 -10
@@ -33,18 +33,13 @@ netuio_create_device(_Inout_ PWDFDEVICE_INIT DeviceInit)PAGED_CODE (); -// Ensure that only administrators can access our device object. - status =WdfDeviceInitAssignSDDLString (DeviceInit, &SDDL_DEVOBJ_SYS_ALL_ADM_ALL ); +WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); -if (NT_SUCCESS (status)) { -WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); - -// Set the device context cleanup callback. -// This function will be called when the WDF Device Object associated to the current device is destroyed - deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; +// Set the device context cleanup callback. +// This function will be called when the WDF Device Object associated to the current device is destroyed + deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; - status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device); - } + status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device);if (NT_SUCCESS (status)) {// Create a device interface so that applications can find and talk to us.
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 11/22 Updated Source and Project files to use Clang toolset
In reply to Narcisa Ana Maria VasileFrom: Anand Rawat <[email protected]>
Updated the code for using LLVM toolset. The code still uses msbuild and VS2017. Some header files and windows specific utility functions are removed due to conflicts with Clang intrinsic functions. Project files have been updated to use LLVM and additional project settings for Clang.
--- kernel/windows/netuio/netuio_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/windows/netuio/netuio_queue.c +2 -2
@@ -156,8 +156,8 @@ netuio_evt_IO_device_control(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request,break ; } -// Zero out the physically contiguous block -RtlZeroMemory (netuio_contextdata->dpdk_seg.mem.virt_addr, netuio_contextdata->dpdk_seg.mem.size); +// Zero out the physically contiguous block +RtlZeroMemory (netuio_contextdata->dpdk_seg.mem.virt_addr, netuio_contextdata->dpdk_seg.mem.size);// Return relevant data to the caller status =WdfRequestRetrieveOutputBuffer (Request,sizeof (struct dpdk_private_info ), &output_buf, &output_buf_size);
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 11/22] Updated Source and Project files to use Clang toolset
Quoted 9 lines · Narcisa Ana Maria Vasile
From: Anand Rawat <[email protected]>
Updated the code for using LLVM toolset. The code still uses msbuild and VS2017. Some header files and windows specific utility functions are removed due to conflicts with Clang intrinsic functions. Project files have been updated to use LLVM and additional project settings for Clang.
Change-Id: I274de21379287c664e072f58e94271c654afe603
Not sure what this means for DPDK.
Quoted 10 lines
Signed-off-by Anand Rawat <[email protected]>--- kernel/windows/netuio/netuio_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/windows/netuio/netuio_queue.c +0
-0
kernel/windows/netuio/netuio_queue.c netuio_evt_IO_device_control(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, · line 163
Quoted 10 lines
kernel/windows/netuio/netuio_queue.c +2
-2@@ -156,8 +156,8 @@ netuio_evt_IO_device_control(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request,break ; } -// Zero out the physically contiguous block -RtlZeroMemory (netuio_contextdata->dpdk_seg.mem.virt_addr, netuio_contextdata->dpdk_seg.mem.size); +// Zero out the physically contiguous block +RtlZeroMemory (netuio_contextdata->dpdk_seg.mem.virt_addr, netuio_contextdata->dpdk_seg.mem.size);// Return relevant data to the caller status =WdfRequestRetrieveOutputBuffer (Request,sizeof (struct dpdk_private_info ), &output_buf, &output_buf_size);
Subject does not match content. Is this commit needed as standalone?
PATCH 12/22 uio: Fix 64 bit BARs mapping
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio.inf | 12 +- kernel/windows/netuio/netuio_dev.c | 181 +++++++++++++++++------ kernel/windows/netuio/netuio_dev.h | 15 +- kernel/windows/netuio/netuio_drv.c | 43 +++--- kernel/windows/netuio/netuio_drv.h | 1 + kernel/windows/netuio/netuio_interface.h | 10 +- kernel/windows/netuio/netuio_queue.c | 176 ++++++++++++++-------- kernel/windows/netuio/netuio_queue.h | 2 + 8 files changed, 297 insertions(+), 143 deletions(-)
kernel/windows/netuio/netuio.inf +9 -3
@@ -38,7 +38,7 @@ Signature="$WINDOWS NT$" Class=Net ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} -Provider=%ManufacturerName% +Provider=%Intel% CatalogFile=netuio.cat DriverVer=
@@ -47,7 +47,8 @@ DriverVer= ;***************************************** [Manufacturer] -%ManufacturerName%=Standard,NT$ARCH$ +%Intel%=Standard,NT$ARCH$ +%Broadcom%=Broadcom,NT$ARCH$ [Standard.NT$ARCH$] %F1583.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_1583
@@ -56,6 +57,9 @@ DriverVer= %F37D0.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_37D0 %F153B.netuio.Description%=netuio_Device, PCI\VEN_8086&DEV_153B +[Broadcom.NT$ARCH$] +%F16D7.netuio.Description%=netuio_Device, PCI\VEN_14E4&DEV_16D7 + [netuio_Device.NT] CopyFiles=Drivers_Dir
@@ -113,7 +117,8 @@ KmdfLibraryVersion = $KMDFVERSION$ [Strings] SPSVCINST_ASSOCSERVICE= 0x00000002 -ManufacturerName="Intel" +Intel = "Intel" +Broadcom = "Broadcom Corporation" ClassName = "Intel(R) DPDK netUIO Driver" DiskName = "DPDK netUIO Installation Disk" F1583.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Converged Network Adapter XL710-Q2"
@@ -121,5 +126,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" +F16D7.netuio.Description = "DPDK netUIO for Broadcom P225p NetXtreme-E Dual-port 10Gb/25Gb Ethernet PCIe Adapter" netuio.DeviceDesc = "netuio Device" netuio.SVCDESC = "netuio Service"
kernel/windows/netuio/netuio_dev.c +132 -49
255 lines not on this page · raw message
kernel/windows/netuio/netuio_dev.h +7 -8
@@ -12,7 +12,6 @@ EXTERN_C_START#include "netuio_interface.h" // Constants -#define PCI_MAX_BAR 3#define USER_MEMORY_SEGMENT_SIZE (256ULL * 1024ULL * 1024ULL) // 256MBstruct pci_bar {
@@ -29,13 +28,13 @@ struct mem_map_region {// The device context performs the same job as a WDM device extension in the driver frameworks typedef struct _NETUIO_CONTEXT_DATA { -WDFDEVICE wdf_device;// WDF device handle to the FDO -BUS_INTERFACE_STANDARD bus_interface;// Bus interface for config space access -struct pci_bar bar[PCI_MAX_BAR ];// device BARs -struct dev_addr addr;// B:D:F details of device -USHORT dev_numa_node;// The NUMA node of the device -struct mem_map_region dpdk_hw;// mapped region for the device's register space -struct mem_map_region dpdk_seg;// mapped region allocated for DPDK process use +WDFDEVICE wdf_device;// WDF device handle to the FDO +BUS_INTERFACE_STANDARD bus_interface;// Bus interface for config space access +struct pci_bar bar[PCI_MAX_BAR ];// device BARs +struct dev_addr addr;// B:D:F details of device +USHORT dev_numa_node;// The NUMA node of the device +struct mem_map_region dpdk_hw[PCI_MAX_BAR ];// mapped region for the device's register space +struct mem_map_region dpdk_seg;// mapped region allocated for DPDK process use }NETUIO_CONTEXT_DATA , *PNETUIO_CONTEXT_DATA ;
kernel/windows/netuio/netuio_drv.c +25 -18
53 lines not on this page · raw message
kernel/windows/netuio/netuio_drv.h +1 -0
@@ -27,6 +27,7 @@ EVT_WDF_DRIVER_DEVICE_ADD netuio_evt_device_add;EVT_WDF_OBJECT_CONTEXT_CLEANUP netuio_evt_driver_context_cleanup;EVT_WDF_DEVICE_PREPARE_HARDWARE netuio_evt_prepare_hw;EVT_WDF_DEVICE_RELEASE_HARDWARE netuio_evt_release_hw; +EVT_WDF_FILE_CLOSE netuio_evt_file_cleanup;EXTERN_C_END
kernel/windows/netuio/netuio_interface.h +5 -5
@@ -22,8 +22,8 @@ DEFINE_GUID (GUID_DEVINTERFACE_netUIO, 0x08336f60,0x0679,0x4c6c,0x85,0xd2,0xae,0#define NETUIO_DRIVER_NAME _T("netuio")// IOCTL code definitions -#define IOCTL_NETUIO_GET_HW_DATA CTL_CODE(FILE_DEVICE_NETWORK, 51, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_NETUIO_PCI_CONFIG_IO CTL_CODE(FILE_DEVICE_NETWORK, 52, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define IOCTL_NETUIO_MAP_HW_INTO_USERMODE CTL_CODE(FILE_DEVICE_NETWORK, 51, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) +#define IOCTL_NETUIO_PCI_CONFIG_IO CTL_CODE(FILE_DEVICE_NETWORK, 52, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)struct mem_region {UINT64 size;// memory region size
@@ -43,13 +43,13 @@ enum pci_io {PCI_IO_WRITE =1 }; +#define PCI_MAX_BAR 6 +struct dpdk_private_info { -struct mem_region hw; +struct mem_region hw[PCI_MAX_BAR ];struct mem_region ms;struct dev_addr dev_addr; -struct mem_region bar1; -// struct mem_region bar2; UINT16 dev_id;UINT16 sub_dev_id;USHORT dev_numa_node;
kernel/windows/netuio/netuio_queue.c +116 -60
231 lines not on this page · raw message
kernel/windows/netuio/netuio_queue.h +2 -0
@@ -17,6 +17,8 @@ typedef struct _QUEUE_CONTEXT { WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(QUEUE_CONTEXT, QueueGetContext) +VOID +netuio_unmap_address_from_user_process(_In_ PNETUIO_CONTEXT_DATA netuio_contextdata);NTSTATUS netuio_queue_initialize(_In_ WDFDEVICE hDevice);
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 13/22 Update .gitignore and create .gitattributes
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
Add build folders and .vs/ to .gitignore. Create .gitattributes to handle line endings correctly.
--- .gitattributes | 4 ++++ .gitignore | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 .gitattributes
.gitattributes new file +4 -0
@@ -0,0 +1,4 @@ +* text=auto + +*.sln text eol=crlf +*.vcxproj text eol=crlf
.gitignore +2 -0
@@ -0,0 +1,2 @@ +x64/ +.vs/
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 14/22 uio: Use local time when verifying INF DriverVer
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
--- mk/exec-env/windows/netuio/netuio.vcxproj | 2 ++ 1 file changed, 2 insertions(+)
mk/exec-env/windows/netuio/netuio.vcxproj +2 -0
@@ -51,11 +51,13 @@ <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <OutDir>$(SolutionDir)..\..\..\..\$(Platform)\$(ConfigurationName)\$(MSBuildProjectName)\</OutDir> <IntDir>$(SolutionDir)..\$(Platform)\$(ConfigurationName)\$(MSBuildProjectName)\</IntDir> + <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> <OutDir>$(SolutionDir)..\..\..\..\$(Platform)\$(ConfigurationName)\$(MSBuildProjectName)\</OutDir> <IntDir>$(SolutionDir)..\$(Platform)\$(ConfigurationName)\$(MSBuildProjectName)\</IntDir> + <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile>
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 15/22 uio: Remove co-installers section from inf
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
Co-installers are no longer needed.
--- kernel/windows/netuio/netuio.inf | 16 ---------------- 1 file changed, 16 deletions(-)
kernel/windows/netuio/netuio.inf +0 -16
@@ -85,30 +85,14 @@ StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\netuio.sys -; -;--- netuio_Device Coinstaller installation ------ -; - [DestinationDirs] DefaultDestDir = 12 -netuio_Device_CoInstaller_CopyFiles = 11 - -[netuio_Device.NT.CoInstallers] -AddReg=netuio_Device_CoInstaller_AddReg -CopyFiles=netuio_Device_CoInstaller_CopyFiles - -[netuio_Device_CoInstaller_AddReg] -HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" - -[netuio_Device_CoInstaller_CopyFiles] -WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll [SourceDisksNames] 1 = %DiskName%,,,"" [SourceDisksFiles] netuio.sys = 1,, -WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames [netuio_Device.NT.Wdf] KmdfService = netuio, netuio_wdfsect
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 16/22 uio: Wrap call into try/except block
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
MmMapLockedPagesSpecifyCache can raise an exception when it cannot map the specified pages.
--- kernel/windows/netuio/netuio_queue.c | 36 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-)
kernel/windows/netuio/netuio_queue.c +23 -13
@@ -53,13 +53,18 @@ netuio_map_address_into_user_process(_In_ PNETUIO_CONTEXT_DATA netuio_contextdat// Map the scratch memory regions to the user's process context MmBuildMdlForNonPagedPool (netuio_contextdata->dpdk_seg.mdl); - netuio_contextdata->dpdk_seg.mem.user_mapped_virt_addr = -MmMapLockedPagesSpecifyCache ( - netuio_contextdata->dpdk_seg.mdl, UserMode, MmCached, -NULL , FALSE, (NormalPagePriority | MdlMappingNoExecute)); + __try { + netuio_contextdata->dpdk_seg.mem.user_mapped_virt_addr = +MmMapLockedPagesSpecifyCache (netuio_contextdata->dpdk_seg.mdl, UserMode, + MmCached,NULL , FALSE, NormalPagePriority); -if (netuio_contextdata->dpdk_seg.mem.user_mapped_virt_addr ==NULL ) { - status =STATUS_INSUFFICIENT_RESOURCES ; +if (netuio_contextdata->dpdk_seg.mem.user_mapped_virt_addr ==NULL ) { + status =STATUS_INSUFFICIENT_RESOURCES ; + goto end; + } + } + __except (EXCEPTION_EXECUTE_HANDLER ) { + status =GetExceptionCode (); goto end; }
@@ -70,13 +75,18 @@ netuio_map_address_into_user_process(_In_ PNETUIO_CONTEXT_DATA netuio_contextdat }MmBuildMdlForNonPagedPool (netuio_contextdata->dpdk_hw[idx].mdl); - netuio_contextdata->dpdk_hw[idx].mem.user_mapped_virt_addr = -MmMapLockedPagesSpecifyCache ( - netuio_contextdata->dpdk_hw[idx].mdl, UserMode, MmCached, -NULL , FALSE, (NormalPagePriority | MdlMappingNoExecute)); - -if (netuio_contextdata->dpdk_hw[idx].mem.user_mapped_virt_addr ==NULL ) { - status =STATUS_INSUFFICIENT_RESOURCES ; + __try { + netuio_contextdata->dpdk_hw[idx].mem.user_mapped_virt_addr = +MmMapLockedPagesSpecifyCache (netuio_contextdata->dpdk_hw[idx].mdl, UserMode, + MmCached,NULL , FALSE, NormalPagePriority); + +if (netuio_contextdata->dpdk_hw[idx].mem.user_mapped_virt_addr ==NULL ) { + status =STATUS_INSUFFICIENT_RESOURCES ; + goto end; + } + } + __except (EXCEPTION_EXECUTE_HANDLER ) { + status =GetExceptionCode (); goto end; } }
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 17/22 uio: Use request handler that guarantees execution in correct context
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
Use EvtIoInCallerContext to assure the requests are handled in the right user thread context. If the request does not need to be handled in a specific context, send it back to framework.
--- kernel/windows/netuio/netuio_dev.c | 1 + kernel/windows/netuio/netuio_dev.h | 1 - kernel/windows/netuio/netuio_queue.c | 242 ++++++++++++++++----------- kernel/windows/netuio/netuio_queue.h | 2 + 4 files changed, 145 insertions(+), 101 deletions(-)
kernel/windows/netuio/netuio_dev.c +1 -0
@@ -50,6 +50,7 @@ netuio_create_device(_Inout_ PWDFDEVICE_INIT DeviceInit)// This function will be called when the WDF Device Object associated to the current device is destroyed WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE (&deviceAttributes,NETUIO_CONTEXT_DATA ); deviceAttributes.EvtCleanupCallback = netuio_evt_device_context_cleanup; +WdfDeviceInitSetIoInCallerContextCallback (DeviceInit, netuio_evt_IO_in_caller_context); status =WdfDeviceCreate (&DeviceInit, &deviceAttributes, &device);
kernel/windows/netuio/netuio_dev.h +0 -1
@@ -58,7 +58,6 @@ static NTSTATUS create_device_specific_symbolic_link(_In_ WDFOBJECT device); static NTSTATUS allocate_usermemory_segment(_In_ WDFOBJECT device); static VOID free_usermemory_segment(_In_ WDFOBJECT device); - EXTERN_C_END#endif // NETUIO_DEV_H
kernel/windows/netuio/netuio_queue.c +142 -100
277 lines not on this page · raw message
kernel/windows/netuio/netuio_queue.h +2 -0
@@ -27,6 +27,8 @@ netuio_queue_initialize(_In_ WDFDEVICE hDevice);EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL netuio_evt_IO_device_control;EVT_WDF_IO_QUEUE_IO_STOP netuio_evt_IO_stop; +EVT_WDF_IO_IN_CALLER_CONTEXT netuio_evt_IO_in_caller_context; + EXTERN_C_END#endif // NETUIO_QUEUE_H
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 18/22 uio: Change the device setup class to a custom one
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
The netuio driver doesn't meet the necessary criteria to be in the Net class. Update Class to a custom defined value.
--- kernel/windows/netuio/netuio.inf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
kernel/windows/netuio/netuio.inf +10 -3
@@ -36,12 +36,19 @@ [Version] Signature="$WINDOWS NT$" -Class=Net -ClassGuid={4d36e972-e325-11ce-bfc1-08002be10318} +Class=%ClassName% +ClassGuid={78912BC1-CB8E-4B28-A329-F322EBADBE0F} Provider=%Intel% CatalogFile=netuio.cat DriverVer= +[ClassInstall32] +Addreg=netuioClassReg + +[netuioClassReg] +HKR,,,0,%ClassName% +HKR,,Icon,,-5 + ;***************************************** ; Install Section ;*****************************************
@@ -103,7 +110,7 @@ KmdfLibraryVersion = $KMDFVERSION$ SPSVCINST_ASSOCSERVICE= 0x00000002 Intel = "Intel" Broadcom = "Broadcom Corporation" -ClassName = "Intel(R) DPDK netUIO Driver" +ClassName = "Windows UIO" DiskName = "DPDK netUIO Installation Disk" F1583.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Converged Network Adapter XL710-Q2" F158A.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Network Adapter XXV710 for 25GbE backplane"
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 19/22 Enable DMA remapping through INF directive
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
--- kernel/windows/netuio/netuio.inf | 4 ++++ 1 file changed, 4 insertions(+)
kernel/windows/netuio/netuio.inf +4 -0
@@ -91,6 +91,7 @@ ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\netuio.sys +AddReg = DMAr.reg [DestinationDirs] DefaultDestDir = 12
@@ -120,3 +121,6 @@ F153B.netuio.Description = "DPDK netUIO for Intel(R) Ethernet Connection I217-V" F16D7.netuio.Description = "DPDK netUIO for Broadcom P225p NetXtreme-E Dual-port 10Gb/25Gb Ethernet PCIe Adapter" netuio.DeviceDesc = "netuio Device" netuio.SVCDESC = "netuio Service" + +[DMAr.reg] +HKR,Parameters,DmaRemappingCompatible,0x00010001,1
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
PATCH 20/22 license: update headers with BSD 3-clause license:
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/windows/netuio/netuio.inf | 3 +- kernel/windows/netuio/netuio.rc | Bin 4772 -> 8098 bytes kernel/windows/netuio/netuio_dev.c | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_dev.h | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_drv.c | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_drv.h | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_interface.h | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_queue.c | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_queue.h | 34 ++++++++++++++++++++--- 9 files changed, 208 insertions(+), 27 deletions(-)
kernel/windows/netuio/netuio.inf +1 -2
@@ -1,8 +1,7 @@ ; ; BSD LICENSE ; -; Copyright(c) 2010-2018 Intel Corporation. All rights reserved. -; All rights reserved. +; Copyright (c) Microsoft Corporation. All rights reserved ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions
kernel/windows/netuio/netuio.rc binary +0 -0
kernel/windows/netuio/netuio_dev.c +29 -3
@@ -1,7 +1,33 @@/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
kernel/windows/netuio/netuio_dev.h +29 -3
@@ -1,7 +1,33 @@/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef NETUIO_DEV_H
kernel/windows/netuio/netuio_drv.c +30 -4
@@ -1,7 +1,33 @@ -/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +/* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
kernel/windows/netuio/netuio_drv.h +29 -3
@@ -1,7 +1,33 @@/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
kernel/windows/netuio/netuio_interface.h +30 -4
@@ -1,7 +1,33 @@ -/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +/* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
kernel/windows/netuio/netuio_queue.c +30 -4
@@ -1,7 +1,33 @@ -/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +/* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
kernel/windows/netuio/netuio_queue.h +30 -4
@@ -1,7 +1,33 @@ -/*- -* -* Copyright(c) 2017 Intel Corporation. All rights reserved. -* +/* +; BSD LICENSE +; +; Copyright (c) Microsoft Corporation. All rights reserved +; +; Redistribution and use in source and binary forms, with or without +; modification, are permitted provided that the following conditions +; are met: +; +; * Redistributions of source code must retain the above copyright +; notice, this list of conditions and the following disclaimer. +; * Redistributions in binary form must reproduce the above copyright +; notice, this list of conditions and the following disclaimer in +; the documentation and/or other materials provided with the +; distribution. +; * Neither the name of Intel Corporation nor the names of its +; contributors may be used to endorse or promote products derived +; from this software without specific prior written permission. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 20/22] license: update headers with BSD 3-clause license:
Quoted 14 lines · Narcisa Ana Maria Vasile
From: Harini Ramakrishnan <[email protected]>
Signed-off-by Harini Ramakrishnan <[email protected]>--- kernel/windows/netuio/netuio.inf | 3 +- kernel/windows/netuio/netuio.rc | Bin 4772 -> 8098 bytes kernel/windows/netuio/netuio_dev.c | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_dev.h | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_drv.c | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_drv.h | 32 +++++++++++++++++++-- kernel/windows/netuio/netuio_interface.h | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_queue.c | 34 ++++++++++++++++++++--- kernel/windows/netuio/netuio_queue.h | 34 ++++++++++++++++++++--- 9 files changed, 208 insertions(+), 27 deletions(-)
Why not use proper license from the commit each file is introduced? I'm not even sure it is allowed to add files under unapproved license.
Please use "SPDX-License-Identifier: BSD-3-Clause" line to indicate licensing. In fact, there was a cleanup of license boilerplate in DPDK some time ago.
Lastly, commit topic should be "windows/netuio" and there's an colon in the end (a typo?).
PATCH 21/22 doc: updating REAME for NetUIO driver
In reply to Narcisa Ana Maria VasileFrom: Harini Ramakrishnan <[email protected]>
--- kernel/README_NetUIO.rst | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 kernel/README_NetUIO.rst
kernel/README_NetUIO.rst new file +63 -0
@@ -0,0 +1,63 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2020 Microsoft Corporation. + +Compiling the NetUIO Driver from Source +======================================= + +Operating System +~~~~~~~~~~~~~~~~ + +The NetUIO source has been validated against the following operating systems: + +* Windows Server 2016 +* Windows Server 2019 + +Hardware Requirements +~~~~~~~~~~~~~~~~~~~~~ +The NetUIO driver has been validated using the following network adapters on the Windows platform: + +* +* + +Software Requirements +~~~~~~~~~~~~~~~~~~~~~ + +* Install Microsoft Visual Studio 2017 or Visual Stuido Studio 2019 Enterprise from https://visualstudio.microsoft.com/downloads/ + * During installation ensure following components are selected: + Windows 10 SDK (10.0.15063.0) + Windows 10 SDK (10.0.17763.0) + Windows Drivers Kit + +* Install WDK for Windows 10 (10.0.17763.1) from https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk + +Building the NetUIO Driver +-------------------------- +Follow the steps below to build the NetUIO driver and install the driver for the network adapter. + +* Clone the dpdk-kmods repository: git clone git://dpdk.org/dpdk-kmods +* Navigate to \dpdk-kmods\windows\netuio\mk\exec-env\windows\netuio +* Load netuio.sln in Microsoft Visual Studio 2017 or 2019 +* Choose Release as the configuration mode and Build the solution +* The resultant output files can be found in \dpdk-kmods\windows\netuio\x64\Release\netuio + +Installing netuio.sys Driver for development +-------------------------------------------- +NOTE: In a development environment, NetUIO driver can be loaded by enabling test-signing. +Please implement adequate precautionary measures before installing a test-signed driver, replacing a signed-driver. + +To ensure test-signed kernel-mode drivers can load on Windows, enable test-signing, using the following BCDEdit command. + +C:\windows\system32>Bcdedit.exe -set TESTSIGNING ON + +Windows displays the text “Test Mode” to remind users the system has test-signing enabled. +Refer to the MSDN documentation on how to Test-Sign a Driver Package. + +To procure a WHQL signed NetUIO driver for Windows, please reach out to [email protected] + +* Go to Device Manager -> Network Adapters. +* Right Click on target network adapter -> Select Update Driver. +* Select “Browse my computer for driver software”. +* In the resultant Window, select “Let me pick from a list of available drivers on my computer”. +* Select “DPDK netUIO for Network Adapter” from the list of drivers. +* The NetUIO.sys driver is successfully installed. +
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Re: [dpdk-dev] [PATCH 21/22] doc: updating REAME for NetUIO driver
Quoted 24 lines · Narcisa Ana Maria Vasile
From: Harini Ramakrishnan <[email protected]>
Signed-off-by Harini Ramakrishnan <[email protected]>--- kernel/README_NetUIO.rst | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 kernel/README_NetUIO.rstkernel/README_NetUIO.rst new file +10
-0@@ -0,0 +1,63 @@ +.. SPDX-License-Identifier: BSD-3-Clause + Copyright(c) 2020 Microsoft Corporation. + +Compiling the NetUIO Driver from Source +======================================= + +Operating System +~~~~~~~~~~~~~~~~ + +The NetUIO source has been validated against the following operating systems:
kernel/README_NetUIO.rst line 20
Quoted 10 lines
kernel/README_NetUIO.rst new file +10
-0+ +* Windows Server 2016 +* Windows Server 2019 + +Hardware Requirements +~~~~~~~~~~~~~~~~~~~~~ +The NetUIO driver has been validated using the following network adapters on the Windows platform: + +* +*
NICs missing.
kernel/README_NetUIO.rst line 25
Quoted 5 lines
kernel/README_NetUIO.rst new file +5
-0+ +Software Requirements +~~~~~~~~~~~~~~~~~~~~~ + +* Install Microsoft Visual Studio 2017 or Visual Stuido Studio 2019 Enterprise from https://visualstudio.microsoft.com/downloads/
AFAIK, Visual Studio 2019 Community Edition is sufficient.
Quoted 11 lines
kernel/README_NetUIO.rst new file +11
-0+ * During installation ensure following components are selected: + Windows 10 SDK (10.0.15063.0) + Windows 10 SDK (10.0.17763.0) + Windows Drivers Kit + +* Install WDK for Windows 10 (10.0.17763.1) from https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk + +Building the NetUIO Driver +-------------------------- +Follow the steps below to build the NetUIO driver and install the driver for the network adapter. +
kernel/README_NetUIO.rst line 46
Quoted 10 lines
kernel/README_NetUIO.rst new file +10
-0+* Clone the dpdk-kmods repository: git clone git://dpdk.org/dpdk-kmods +* Navigate to \dpdk-kmods\windows\netuio\mk\exec-env\windows\netuio +* Load netuio.sln in Microsoft Visual Studio 2017 or 2019 +* Choose Release as the configuration mode and Build the solution +* The resultant output files can be found in \dpdk-kmods\windows\netuio\x64\Release\netuio + +Installing netuio.sys Driver for development +-------------------------------------------- +NOTE: In a development environment, NetUIO driver can be loaded by enabling test-signing. +Please implement adequate precautionary measures before installing a test-signed driver, replacing a signed-driver.
reStructured Text syntax for banners (note, warning) is as follows:
.. note::
Banner text.
kernel/README_NetUIO.rst line 53
Quoted 7 lines
kernel/README_NetUIO.rst new file +7
-0+ +To ensure test-signed kernel-mode drivers can load on Windows, enable test-signing, using the following BCDEdit command. + +C:\windows\system32>Bcdedit.exe -set TESTSIGNING ON + +Windows displays the text “Test Mode” to remind users the system has test-signing enabled. +Refer to the MSDN documentation on how to Test-Sign a Driver Package.
There are similar instructions in windows/README.rst. You might choose to point there, but this is not a strong opinion.
kernel/README_NetUIO.rst line 60
Quoted 7 lines
kernel/README_NetUIO.rst new file +7
-0+ +To procure a WHQL signed NetUIO driver for Windows, please reach out to [email protected] + +* Go to Device Manager -> Network Adapters. +* Right Click on target network adapter -> Select Update Driver. +* Select “Browse my computer for driver software”. +* In the resultant Window, select “Let me pick from a list of available drivers on my computer”.
s/Window/window/
kernel/README_NetUIO.rst line 63
Quoted 4 lines
kernel/README_NetUIO.rst new file +3
-0+* Select “DPDK netUIO for Network Adapter” from the list of drivers. +* The NetUIO.sys driver is successfully installed. +
No newline at end of file.
PATCH 22/22 Move all files under windows folder
In reply to Narcisa Ana Maria VasileFrom: Narcisa Vasile <[email protected]>
---
{kernel => windows/netuio/kernel}/README_NetUIO.rst | 0
.../netuio/kernel}/windows/netuio/netuio.inf | 0
.../netuio/kernel}/windows/netuio/netuio.rc | Bin
.../netuio/kernel}/windows/netuio/netuio_dev.c | 0
.../netuio/kernel}/windows/netuio/netuio_dev.h | 0
.../netuio/kernel}/windows/netuio/netuio_drv.c | 0
.../netuio/kernel}/windows/netuio/netuio_drv.h | 0
.../kernel}/windows/netuio/netuio_interface.h | 0
.../netuio/kernel}/windows/netuio/netuio_queue.c | 0
.../netuio/kernel}/windows/netuio/netuio_queue.h | 0
.../netuio/kernel}/windows/netuio/resource.h | 0
.../netuio/mk}/exec-env/windows/netuio/netuio.sln | 0
.../mk}/exec-env/windows/netuio/netuio.vcxproj | 0
.../exec-env/windows/netuio/netuio.vcxproj.filters | 0
.../mk}/exec-env/windows/netuio/netuio.vcxproj.user | 0
15 files changed, 0 insertions(+), 0 deletions(-)
rename {kernel => windows/netuio/kernel}/README_NetUIO.rst (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio.inf (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio.rc (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_dev.c (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_dev.h (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_drv.c (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_drv.h (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_interface.h (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_queue.c (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/netuio_queue.h (100%)
rename {kernel => windows/netuio/kernel}/windows/netuio/resource.h (100%)
rename {mk => windows/netuio/mk}/exec-env/windows/netuio/netuio.sln (100%)
rename {mk => windows/netuio/mk}/exec-env/windows/netuio/netuio.vcxproj (100%)
rename {mk => windows/netuio/mk}/exec-env/windows/netuio/netuio.vcxproj.filters (100%)
rename {mk => windows/netuio/mk}/exec-env/windows/netuio/netuio.vcxproj.user (100%)windows/netuio/kernel/README_NetUIO.rst renamed from kernel/README_NetUIO.rst +0 -0
windows/netuio/kernel/windows/netuio/netuio.inf renamed from kernel/windows/netuio/netuio.inf +0 -0
windows/netuio/kernel/windows/netuio/netuio.rc renamed from kernel/windows/netuio/netuio.rc +0 -0
windows/netuio/kernel/windows/netuio/netuio_dev.c renamed from kernel/windows/netuio/netuio_dev.c +0 -0
windows/netuio/kernel/windows/netuio/netuio_dev.h renamed from kernel/windows/netuio/netuio_dev.h +0 -0
windows/netuio/kernel/windows/netuio/netuio_drv.c renamed from kernel/windows/netuio/netuio_drv.c +0 -0
windows/netuio/kernel/windows/netuio/netuio_drv.h renamed from kernel/windows/netuio/netuio_drv.h +0 -0
windows/netuio/kernel/windows/netuio/netuio_interface.h renamed from kernel/windows/netuio/netuio_interface.h +0 -0
windows/netuio/kernel/windows/netuio/netuio_queue.c renamed from kernel/windows/netuio/netuio_queue.c +0 -0
windows/netuio/kernel/windows/netuio/netuio_queue.h renamed from kernel/windows/netuio/netuio_queue.h +0 -0
windows/netuio/kernel/windows/netuio/resource.h renamed from kernel/windows/netuio/resource.h +0 -0
windows/netuio/mk/exec-env/windows/netuio/netuio.sln renamed from mk/exec-env/windows/netuio/netuio.sln +0 -0
windows/netuio/mk/exec-env/windows/netuio/netuio.vcxproj renamed from mk/exec-env/windows/netuio/netuio.vcxproj +0 -0
windows/netuio/mk/exec-env/windows/netuio/netuio.vcxproj.filters renamed from mk/exec-env/windows/netuio/netuio.vcxproj.filters +0 -0
windows/netuio/mk/exec-env/windows/netuio/netuio.vcxproj.user renamed from mk/exec-env/windows/netuio/netuio.vcxproj.user +0 -0
Signature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Quoted 38 lines · Narcisa Ana Maria Vasile
From: Narcisa Vasile <[email protected]>
The NetUIO driver for Windows allows the usermode application
to directly access the hardware and allocates the memory that gets mapped in usermode.Anand Rawat (1):
Updated Source and Project files to use Clang toolsetHarini Ramakrishnan (10):
Windows DPDK libraries and applications have now been updated to the
latest public release v18.08, of the main DPDK source.
doc: remove embedded buffer from Windows UIO ioctl Windows DPDK libraries and applications have now been updated to the
latest public release v18.08, of the main DPDK source.
doc: change the Windows UIO driver's default security descriptor to
admin only
doc: remove lower bound on mapped address from Windows UIO driver
doc: remove embedded buffer from Windows UIO ioctl
uio: move SDDL string to INF on Windows
uio: Fix 64 bit BARs mapping
license: update headers with BSD 3-clause license:
doc: updating REAME for NetUIO driverJason Messer (2):
Initial commit of UIO driver for Windows
Added new core libraries for WindowsNarcisa Vasile (8):
Update .gitignore and create .gitattributes
uio: Use local time when verifying INF DriverVer
uio: Remove co-installers section from inf
uio: Wrap call into try/except block
uio: Use request handler that guarantees execution in correct context
uio: Change the device setup class to a custom one
Enable DMA remapping through INF directive
Move all files under windows folder
Quoted 5 lines
Thomas Monjalon (1):
init DPDK repositorySignature · 1 line
2.23.0.vfs.1.1.63.g5a5ad7f
Quoted 6 lines · Narcisa Ana Maria Vasile
From: Narcisa Vasile <[email protected]>
The NetUIO driver for Windows allows the usermode application to directly access the hardware
and allocates the memory that gets mapped in usermode.
It doesn't allocate the buffer anymore, does it?
As far as I understand, you're importing history from dpdk-draft-repo and then changing file layout. Not sure how this is beneficial, especially since there are bugfixes along the way. Or are there legal reasons?
Please follow the guidelines on commit formatting, in particular:
* Subject must have a topic ("windows/netuio"?), its length is limited.
* Description is mandatory and should explain the changes.
Quoted 6 lines · Dmitry Kozlyuk
Quoted 4 lines · Narcisa Ana Maria Vasile
From: Narcisa Vasile <[email protected]>
The NetUIO driver for Windows allows the usermode application to directly access the hardware
Quoted 8 lines
Quoted 1 line
and allocates the memory that gets mapped in usermode.
It doesn't allocate the buffer anymore, does it?
As far as I understand, you're importing history from dpdk-draft-repo and then changing file layout. Not sure how this is beneficial, especially since there are bugfixes along the way. Or are there legal reasons?
Harini, Omar, please advise if we need to preserve history. If not, I think it's better to just squash all commits and send the netuio code as one patch. In this way, I can easily make sure that this one patch has the right signoff, description, subject formatting etc.
Dmitry, would pushing the netuio code as one patch be ok?
Quoted 4 lines
Please follow the guidelines on commit formatting, in particular:
* Subject must have a topic ("windows/netuio"?), its length is limited.
* Description is mandatory and should explain the changes.
Hi Naty,
IMHO this is small and sufficiently scoped where history (individual buildable patches) are not necessary. We'd prefer to avoid that overhead here.
DmitryK,
Please let us know if otherwise.
-----Original Message-----
From: Narcisa Ana Maria Vasile <[email protected]>
Sent: Friday, August 14, 2020 1:26 PM
To: Dmitry Kozlyuk <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Omar Cardona <[email protected]>; [email protected]; [email protected]; Dmitry Malloy (MESHCHANINOV) <[email protected]>; Narcisa Ana Maria Vasile <[email protected]>
Subject: Re: [PATCH 00/22] windows/netuio: add netuio driver for Windows
Quoted 6 lines · Dmitry Kozlyuk
Quoted 4 lines · Narcisa Ana Maria Vasile
From: Narcisa Vasile <[email protected]>
The NetUIO driver for Windows allows the usermode application to directly access the hardware
Quoted 8 lines
Quoted 1 line
and allocates the memory that gets mapped in usermode.
It doesn't allocate the buffer anymore, does it?
As far as I understand, you're importing history from dpdk-draft-repo and then changing file layout. Not sure how this is beneficial, especially since there are bugfixes along the way. Or are there legal reasons?
Harini, Omar, please advise if we need to preserve history. If not, I think it's better to just squash all commits and send the netuio code as one patch. In this way, I can easily make sure that this one patch has the right signoff, description, subject formatting etc.
Dmitry, would pushing the netuio code as one patch be ok?
Quoted 4 lines
Please follow the guidelines on commit formatting, in particular:
* Subject must have a topic ("windows/netuio"?), its length is limited.
* Description is mandatory and should explain the changes.
Quoted 2 lines · Narcisa Ana Maria Vasile
Quoted 1 line · Dmitry Kozlyuk
On Thu, 13 Aug 2020 16:21:23 -0700, Narcisa Ana Maria Vasile wrote:
[...]
Quoted 10 lines
Quoted 4 lines
As far as I understand, you're importing history from dpdk-draft-repo and then changing file layout. Not sure how this is beneficial, especially since there are bugfixes along the way. Or are there legal reasons?
Harini, Omar, please advise if we need to preserve history. If not, I think it's better to just squash all commits and send the netuio code as one patch. In this way, I can easily make sure that this one patch has the right signoff, description, subject formatting etc.
Dmitry, would pushing the netuio code as one patch be ok?
Yes, I think so.
Quoted 8 lines · Dmitry Kozlyuk
Quoted 2 lines · Narcisa Ana Maria Vasile
Quoted 1 line · Dmitry Kozlyuk
On Thu, 13 Aug 2020 16:21:23 -0700, Narcisa Ana Maria Vasile wrote:
[...]
Quoted 4 lines
Quoted 4 lines
As far as I understand, you're importing history from dpdk-draft-repo and then changing file layout. Not sure how this is beneficial, especially since there are bugfixes along the way. Or are there legal reasons?
Quoted 7 lines
Quoted 6 lines
Harini, Omar, please advise if we need to preserve history. If not, I think it's better to just squash all commits and send the netuio code as one patch. In this way, I can easily make sure that this one patch has the right signoff, description, subject formatting etc.
Dmitry, would pushing the netuio code as one patch be ok?
Yes, I think so.
I agree too. This code is going to be committed into a new repo (kmods), so there is no real benefit in maintaining prior history.
ranjit m.