Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
67 changes: 43 additions & 24 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,6 +287,9 @@ IMLow = "Low"
IMMedium = "Medium"
TransmitBuffers = "Transmit Buffers"

LSOv2Ipv4 = "Large Send Offload v2 (IPv4)"
LSOv2Ipv6 = "Large Send Offload v2 (IPv6)"

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"

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
25 changes: 13 additions & 12 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 @@ -34,15 +26,15 @@
<TargetVersion>Windows10</TargetVersion>
<NetAdapterDriver>true</NetAdapterDriver>
<NETADAPTER_VERSION_MAJOR>2</NETADAPTER_VERSION_MAJOR>
<NETADAPTER_VERSION_MINOR>0</NETADAPTER_VERSION_MINOR>
<NETADAPTER_VERSION_MINOR>3</NETADAPTER_VERSION_MINOR>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>23</KMDF_VERSION_MINOR>
<UseDebugLibraries Condition="'$(Configuration)'=='Debug'">True</UseDebugLibraries>
<UseDebugLibraries Condition="'$(Configuration)'=='Release'">False</UseDebugLibraries>
<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" />
Expand All @@ -65,19 +57,26 @@
</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
<!-- The WrappedTaskItems label is used by the conversion tool to identify the location where items
associated with wrapped tasks will reside.-->
<ItemGroup Label="WrappedTaskItems">
<ClInclude Include="adapter.h" />
<ClInclude Include="common.h" />
<ClInclude Include="configuration.h" />
<ClInclude Include="device.h" />
<ClInclude Include="eeprom.h" />
Expand All @@ -93,6 +92,8 @@
<ClInclude Include="statistics.h" />
<ClInclude Include="trace.h" />
<ClInclude Include="txqueue.h" />
<ClInclude Include="wistd_config.h" />
<ClInclude Include="wistd_type_traits.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="adapter.cpp" />
Expand Down
21 changes: 12 additions & 9 deletions RtEthSample/RtEthSample.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<ClInclude Include="adapter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="common.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="device.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -68,28 +71,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 +104,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 Down
Loading