Re: [dpdk-dev] [kmods PATCH v2 4/4] windows/virt2phys: add tracing
From: Menon, Ranjit <hidden>
Date: 2021-09-30 22:08:15
Hi Dmitry, On 5/26/2021 2:01 PM, Dmitry Kozlyuk wrote:
WPP tracing [1] allows kernel drivers to print logs that can be viewed without attaching a debugger to the running system. Traces are colelcted only when enabled. Instrument virt2phys with traces: * ERROR: failures that prevent the driver from working. * WARNING: incorrect calls to the driver. * INFO: starting or completing operations with memory. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/wpp-software-tracing Signed-off-by: Dmitry Kozlyuk <redacted> --- <snip!>
diff --git a/windows/virt2phys/virt2phys.vcxproj b/windows/virt2phys/virt2phys.vcxproj
quoted hunk ↗ jump to hunk
index b462493..c9f884a 100644--- a/windows/virt2phys/virt2phys.vcxproj +++ b/windows/virt2phys/virt2phys.vcxproj@@ -41,6 +41,7 @@ <ItemGroup> <ClInclude Include="virt2phys.h" /> <ClInclude Include="virt2phys_logic.h" /> + <ClInclude Include="virt2phys_trace.h" /> </ItemGroup> <ItemGroup> <Inf Include="virt2phys.inf" />@@ -169,9 +170,9 @@ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> - <WppEnabled>false</WppEnabled> + <WppEnabled>true</WppEnabled> <WppRecorderEnabled>true</WppRecorderEnabled> - <WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData> + <WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">virt2phys_trace.h</WppScanConfigurationData>
This change is also required for the 'Release|x64' configuration, otherwise 'Release' builds fail. <snip!> Also, it appears the newer version of the compiler (combined with the new version of WDK/SDK), requires that the driver signing process mandate a File Digest Algorithm (using the /fd option). It is a warning today, but they claim it could become a requirement in the future. To fix this, we can include the following in the project file: <DriverSign> <FileDigestAlgorithm>SHA256</FileDigestAlgorithm> </DriverSign> Or set the above, using project 'Properties'->Driver Signing->File Digest Algorithm = 256. (This will need to be fixed in the netuio driver project also) thanks, ranjit m.