Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2303 #13

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 45 additions & 26 deletions RtEthSample/RtEthSample.inx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ CatalogFile.NT = RtEthSample.cat
[RTL8168.ndi.NT]
FeatureScore = 0xFE

CopyFiles = RtEthSample.CopyFiles

Characteristics = 0x04 ; NCF_PHYSICAL

; TODO: Update with the type of bus (PCI, USB, or custom) your device uses.
Expand All @@ -65,7 +67,6 @@ BusType = 5 ; PCIBus
*AccessType = 2 ; NET_IF_ACCESS_BROADCAST
*HardwareLoopback = 0 ; false

CopyFiles = MyCopyFiles
AddReg = ndi.reg

; To make it easier to share common keywords across different devices, we have
Expand All @@ -79,6 +80,8 @@ AddReg = InterruptModeration.kw
AddReg = InterruptModerationLevel.kw
AddReg = OffloadChecksum.kw
AddReg = PriorityVlanTag.kw
AddReg = LSO.kw
AddReg = ReceiveSideScaling.kw

[ndi.reg]
; TODO: Update these if your device is not Ethernet.
Expand All @@ -103,25 +106,18 @@ StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
; TODO: Update the name of your binary.
ServiceBinary = %13%\RtEthSample.sys
AddReg = RtEthSample.Service.Reg

[RtEthSample.Service.Reg]
HKR,, BootFlags, 0x00010001, 1 ; CM_SERVICE_NETWORK_BOOT_LOAD
[RtEthSample.CopyFiles]
RtEthSample.sys

[Service.EventLog]
AddReg = Service.AddEventLog.reg

[Service.AddEventLog.reg]
HKR,, EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll"
HKR,, TypesSupported, 0x00010001, 7

; TODO: List off all the binaries that are part of your driver package.
; Typically this is just the .sys file.
[MyCopyFiles]
RtEthSample.sys

[DestinationDirs]
MyCopyFiles = 13
RtEthSample.CopyFiles = 13

[SourceDisksNames]
1 = %DiskDescription%
Expand Down Expand Up @@ -224,17 +220,36 @@ HKR,Ndi\params\*UDPChecksumOffloadIPv6\enum, "2", 0, %RxEnabled%
HKR,Ndi\params\*UDPChecksumOffloadIPv6\enum, "3", 0, %RxTxEnabled%

[PriorityVlanTag.kw]
HKR,Ndi\Params\*PriorityVlanTag, ParamDesc, 0, %PriorityVLAN%
HKR,Ndi\Params\*PriorityVlanTag, Default, 0, "3"
HKR,Ndi\Params\*PriorityVlanTag, Type, 0, "enum"
HKR,Ndi\Params\*PriorityVlanTag\enum, "0", 0, %PriorityVLANDisabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "1", 0, %PriorityEnabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "2", 0, %VLANEnabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "3", 0, %PriorityVLANEnabled%
HKR,Ndi\Params\*PriorityVlanTag, ParamDesc, 0, %PriorityVLAN%
HKR,Ndi\Params\*PriorityVlanTag, Default, 0, "3"
HKR,Ndi\Params\*PriorityVlanTag, Type, 0, "enum"
HKR,Ndi\Params\*PriorityVlanTag\enum, "0", 0, %PriorityVLANDisabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "1", 0, %PriorityEnabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "2", 0, %VLANEnabled%
HKR,Ndi\Params\*PriorityVlanTag\enum, "3", 0, %PriorityVLANEnabled%

[LSO.kw]
HKR,Ndi\Params\*LsoV2Ipv4, ParamDesc, 0, %LSOv2Ipv4%
HKR,Ndi\Params\*LsoV2Ipv4, Type, 0, "enum"
HKR,Ndi\Params\*LsoV2Ipv4, Default, 0, "1"
HKR,Ndi\Params\*LsoV2Ipv4\enum, "0", 0, %Disabled%
HKR,Ndi\Params\*LsoV2Ipv4\enum, "1", 0, %Enabled%

HKR,Ndi\Params\*LsoV2Ipv6, ParamDesc, 0, %LSOv2Ipv6%
HKR,Ndi\Params\*LsoV2Ipv6, Type, 0, "enum"
HKR,Ndi\Params\*LsoV2Ipv6, Default, 0, "1"
HKR,Ndi\Params\*LsoV2Ipv6\enum, "0", 0, %Disabled%
HKR,Ndi\Params\*LsoV2Ipv6\enum, "1", 0, %Enabled%

[ReceiveSideScaling.kw]
HKR,Ndi\Params\*RSS, ParamDesc, 0, "%ReceiveSideScaling%"
HKR,Ndi\Params\*RSS, default, 0, "1"
HKR,Ndi\Params\*RSS, type, 0, "enum"
HKR,Ndi\Params\*RSS, optional, 0, "0"
HKR,Ndi\Params\*RSS\enum, "0", 0, %Disabled%"
HKR,Ndi\Params\*RSS\enum, "1", 0, %Enabled%"
HKR, "", *RSS, 0, "1"

;
; Localized strings
;
[Strings]
Provider = "Realtek"
AutoDetect = "Auto Negotiation"
Expand All @@ -257,11 +272,12 @@ TxEnabled = "Tx Enabled"
RxEnabled = "Rx Enabled"
RxTxEnabled = "Rx & Tx Enabled"
FlowControl = "Flow Control"
PriorityVLAN = "Packet Priority & VLAN"
PriorityVLANDisabled = "Packet Priority & VLAN Disabled"
PriorityVLAN = "Priority & VLAN"
PriorityVLANDisabled = "Priority & VLAN Disabled"
PriorityVLANEnabled = "Priority & VLAN Enabled"
PriorityEnabled = "Packet Priority Enabled"
ReceiveSideScaling = "Receive Side Scaling"
VLANEnabled = "VLAN Enabled"
PriorityVLANEnabled = "Packet Priority & VLAN Enabled"
InterruptModeration = "Interrupt Moderation"
InterruptModerationLevel = "Interrupt Moderation Level"
ReceiveBuffers = "Receive Buffers"
Expand All @@ -271,8 +287,11 @@ IMLow = "Low"
IMMedium = "Medium"
TransmitBuffers = "Transmit Buffers"

RTL8168.DeviceDesc = "Realtek PCIe GBE Family Controller NetAdapter Sample Driver"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized that the DeviceDesc and DisplayName should not have been changed. Fixed it.

Service.DisplayName = "Realtek PCIe GBE Family Controller NetAdapter Sample Driver"
LSOv2Ipv4 = "Large Send Offload v2 (IPv4)"
LSOv2Ipv6 = "Large Send Offload v2 (IPv6)"

RTL8168.DeviceDesc = "Realtek PCIe GBE Family Controller Flight"
Service.DisplayName = "Realtek PCIe GBE Family Controller Flight"

DiskDescription = "Realtek Driver Disk 1"

Expand Down
62 changes: 27 additions & 35 deletions RtEthSample/RtEthSample.sln
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtEthSample", "RtEthSample.vcxproj", "{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.ActiveCfg = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.Build.0 = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.Deploy.0 = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x86.ActiveCfg = Debug|Win32
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x86.Build.0 = Debug|Win32
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x86.Deploy.0 = Debug|Win32
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.ActiveCfg = Release|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.Build.0 = Release|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.Deploy.0 = Release|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x86.ActiveCfg = Release|Win32
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x86.Build.0 = Release|Win32
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C69DEFBE-663E-4A9D-872B-FEB337FBF98E}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33516.290
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtEthSample", "RtEthSample.vcxproj", "{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.ActiveCfg = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.Build.0 = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Debug|x64.Deploy.0 = Debug|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.ActiveCfg = Release|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.Build.0 = Release|x64
{EAC78963-C6D0-4C8C-918D-5B5996AE80AC}.Release|x64.Deploy.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C69DEFBE-663E-4A9D-872B-FEB337FBF98E}
EndGlobalSection
EndGlobal
28 changes: 18 additions & 10 deletions RtEthSample/RtEthSample.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="PropertySheets">
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
Expand All @@ -42,14 +34,15 @@
<DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NetAdapterDriverPreview>true</NetAdapterDriverPreview>
<NetAdapterDriverPreview>false</NetAdapterDriverPreview>
</PropertyGroup>
<!-- Needed by any VcxProj -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
Expand All @@ -65,14 +58,20 @@
</ClCompile>
<ClCompile>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\km\netcx\kmdf\adapter\2.2\</AdditionalIncludeDirectories>
</ClCompile>
<Inf>
<VersionHeaderPath>
</VersionHeaderPath>
<SpecifyDriverVerDirectiveVersion>true</SpecifyDriverVerDirectiveVersion>
<TimeStamp>1.0</TimeStamp>
</Inf>
<DriverSign>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/fd SHA256 %(AdditionalOptions)</AdditionalOptions>
</DriverSign>
<DriverSign>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/fd SHA256 %(AdditionalOptions)</AdditionalOptions>
</DriverSign>
</ItemDefinitionGroup>
<!-- The WrappedTaskItems label is used by the conversion tool to identify the location where items
associated with wrapped tasks will reside.-->
Expand Down Expand Up @@ -119,6 +118,15 @@
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<!-- /Necessary to pick up proper files from local directory when in the IDE-->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NuGet is used to get the Windows Implementation Library which include the common.h file that is now necessary for this project. It is also the reason for the import on line 45 and for the packages.config file that was added. Not sure if all these changes are necessary or if common.h could have just been included instead.

<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.ImplementationLibrary.1.0.230202.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
</Target>
</Project>
24 changes: 15 additions & 9 deletions RtEthSample/RtEthSample.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,28 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="driver.cpp">
<ClCompile Include="txqueue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="adapter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="device.cpp">
<ClCompile Include="configuration.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="eeprom.cpp">
<ClCompile Include="device.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="txqueue.cpp">
<ClCompile Include="driver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="rxqueue.cpp">
<ClCompile Include="eeprom.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="txqueue.cpp">
<ClCompile Include="gigamac.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="configuration.cpp">
<ClCompile Include="interrupt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="link.cpp">
Expand All @@ -101,10 +101,10 @@
<ClCompile Include="power.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="interrupt.cpp">
<ClCompile Include="rxqueue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="gigamac.cpp">
<ClCompile Include="txqueue.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand All @@ -118,4 +118,10 @@
<Filter>Setup Files</Filter>
</Inf>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
</ItemGroup>
</Project>
Loading