diff mbox series

[ovs-dev,v2] datapath-windows: Add Win10Analyze target

Message ID 20190403174803.28924-1-aserdean@ovn.org
State Accepted
Headers show
Series [ovs-dev,v2] datapath-windows: Add Win10Analyze target | expand

Commit Message

Alin-Gabriel Serdean April 3, 2019, 5:48 p.m. UTC
This patch adds a new target called `Win10Analyze` to the driver solution.

It enables us to trigger static analysis over the Win10 target.

Since the location of the ruleset of drivers is somewhat random
starting from 1803:
https://www.osr.com/blog/2018/05/21/wdk-1803-ca/

Commit the ruleset inside our repository. This is the same ruleset used for
8,8.1 and 10.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
---
 datapath-windows/Package/package.VcxProj      | 21 ++++-
 datapath-windows/Package/package.VcxProj.user |  5 +-
 datapath-windows/automake.mk                  |  2 +
 .../misc/DriverRecommendedRules.ruleset       | 86 +++++++++++++++++++
 datapath-windows/ovsext.sln                   |  5 ++
 datapath-windows/ovsext/ovsext.vcxproj        | 39 ++++++++-
 datapath-windows/ovsext/ovsext.vcxproj.user   |  5 +-
 7 files changed, 159 insertions(+), 4 deletions(-)
 create mode 100644 datapath-windows/misc/DriverRecommendedRules.ruleset

Comments

Li,Rongqing via dev May 1, 2019, 5:04 p.m. UTC | #1
Thanks for the adding windows 10 analyze target.

Acked-by: Anand Kumar <kumaranand@vmware.com>

Regards,
Anand Kumar

On 4/3/19, 10:48 AM, "Alin Gabriel Serdean" <aserdean@ovn.org> wrote:

    This patch adds a new target called `Win10Analyze` to the driver solution.
    
    It enables us to trigger static analysis over the Win10 target.
    
    Since the location of the ruleset of drivers is somewhat random
    starting from 1803:
    https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.osr.com%2Fblog%2F2018%2F05%2F21%2Fwdk-1803-ca%2F&amp;data=02%7C01%7Ckumaranand%40vmware.com%7C2580925eae8c4b9a4e4608d6b85c8b60%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636899104959730588&amp;sdata=%2FLesq2PWVRbSB55zyEQbRTrsL2W07s6on8SGlhGTg0w%3D&amp;reserved=0
    
    Commit the ruleset inside our repository. This is the same ruleset used for
    8,8.1 and 10.
    
    Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
    ---
     datapath-windows/Package/package.VcxProj      | 21 ++++-
     datapath-windows/Package/package.VcxProj.user |  5 +-
     datapath-windows/automake.mk                  |  2 +
     .../misc/DriverRecommendedRules.ruleset       | 86 +++++++++++++++++++
     datapath-windows/ovsext.sln                   |  5 ++
     datapath-windows/ovsext/ovsext.vcxproj        | 39 ++++++++-
     datapath-windows/ovsext/ovsext.vcxproj.user   |  5 +-
     7 files changed, 159 insertions(+), 4 deletions(-)
     create mode 100644 datapath-windows/misc/DriverRecommendedRules.ruleset
    
    diff --git a/datapath-windows/Package/package.VcxProj b/datapath-windows/Package/package.VcxProj
    index de747eed2..5939a8816 100644
    --- a/datapath-windows/Package/package.VcxProj
    +++ b/datapath-windows/Package/package.VcxProj
    @@ -9,6 +9,10 @@
           <Configuration>Win10 Release</Configuration>
           <Platform>x64</Platform>
         </ProjectConfiguration>
    +    <ProjectConfiguration Include="Win10Analyze|x64">
    +      <Configuration>Win10Analyze</Configuration>
    +      <Platform>x64</Platform>
    +    </ProjectConfiguration>
         <ProjectConfiguration Include="Win8.1 Debug|x64">
           <Configuration>Win8.1 Debug</Configuration>
           <Platform>x64</Platform>
    @@ -71,6 +75,13 @@
         <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
         <DriverTargetPlatform>Desktop</DriverTargetPlatform>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
    +    <TargetVersion />
    +    <UseDebugLibraries>true</UseDebugLibraries>
    +    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
    +    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
    +    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
         <TargetVersion>Windows8</TargetVersion>
         <UseDebugLibraries>true</UseDebugLibraries>
    @@ -113,6 +124,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
    +  </PropertyGroup>
       <PropertyGroup>
         <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
         <EnableDeployment>False</EnableDeployment>
    @@ -148,6 +162,11 @@
           <UseLocalTime>true</UseLocalTime>
         </Inf2Cat>
       </ItemDefinitionGroup>
    +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2Cat>
    +      <UseLocalTime>true</UseLocalTime>
    +    </Inf2Cat>
    +  </ItemDefinitionGroup>
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
         <Inf2Cat>
           <UseLocalTime>true</UseLocalTime>
    @@ -185,4 +204,4 @@
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
       <ImportGroup Label="ExtensionTargets">
       </ImportGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/Package/package.VcxProj.user b/datapath-windows/Package/package.VcxProj.user
    index 6231d93f7..5b0c53539 100644
    --- a/datapath-windows/Package/package.VcxProj.user
    +++ b/datapath-windows/Package/package.VcxProj.user
    @@ -15,6 +15,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <SignMode>TestSign</SignMode>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    @@ -24,4 +27,4 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/automake.mk b/datapath-windows/automake.mk
    index 3820041f6..b8cf5dd95 100644
    --- a/datapath-windows/automake.mk
    +++ b/datapath-windows/automake.mk
    @@ -3,6 +3,7 @@ EXTRA_DIST += \
     	datapath-windows/Package/package.VcxProj.user \
     	datapath-windows/include/OvsDpInterfaceExt.h \
     	datapath-windows/include/OvsDpInterfaceCtExt.h \
    +	datapath-windows/misc/DriverRecommendedRules.ruleset \
     	datapath-windows/misc/OVS.psm1 \
     	datapath-windows/misc/install.cmd \
     	datapath-windows/misc/uninstall.cmd \
    @@ -86,5 +87,6 @@ EXTRA_DIST += \
     	datapath-windows/ovsext/resource.h
     
     datapath_windows_analyze: all
    +	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10Analyze"
     	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1Analyze"
     	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8Analyze"
    diff --git a/datapath-windows/misc/DriverRecommendedRules.ruleset b/datapath-windows/misc/DriverRecommendedRules.ruleset
    new file mode 100644
    index 000000000..0faae599c
    --- /dev/null
    +++ b/datapath-windows/misc/DriverRecommendedRules.ruleset
    @@ -0,0 +1,86 @@
    +<?xml version="1.0" encoding="utf-8"?>
    +<RuleSet Name="Microsoft Driver Recommended Rules" Description="This rule set contains rules recommended for drivers." ToolsVersion="10.0">
    +  <Include Path="NativeRecommendedRules.ruleset" Action="Default" />
    +  <Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
    +    <Rule Id="C28101" Action="Warning" />
    +    <Rule Id="C28110" Action="Warning" />
    +    <Rule Id="C28111" Action="Warning" />
    +    <Rule Id="C28114" Action="Warning" />
    +    <Rule Id="C28120" Action="Warning" />
    +    <Rule Id="C28121" Action="Warning" />
    +    <Rule Id="C28122" Action="Warning" />
    +    <Rule Id="C28123" Action="Warning" />
    +    <Rule Id="C28124" Action="Warning" />
    +    <Rule Id="C28126" Action="Warning" />
    +    <Rule Id="C28127" Action="Warning" />
    +    <Rule Id="C28128" Action="Warning" />
    +    <Rule Id="C28129" Action="Warning" />
    +    <Rule Id="C28131" Action="Warning" />
    +    <Rule Id="C28132" Action="Warning" />
    +    <Rule Id="C28133" Action="Warning" />
    +    <Rule Id="C28134" Action="Warning" />
    +    <Rule Id="C28135" Action="Warning" />
    +    <Rule Id="C28139" Action="Warning" />
    +    <Rule Id="C28141" Action="Warning" />
    +    <Rule Id="C28143" Action="Warning" />
    +    <Rule Id="C28144" Action="Warning" />
    +    <Rule Id="C28145" Action="Warning" />
    +    <Rule Id="C28146" Action="Warning" />
    +    <Rule Id="C28147" Action="Warning" />
    +    <Rule Id="C28150" Action="Warning" />
    +    <Rule Id="C28151" Action="Warning" />
    +    <Rule Id="C28152" Action="Warning" />
    +    <Rule Id="C28153" Action="Warning" />
    +    <Rule Id="C28156" Action="Warning" />
    +    <Rule Id="C28157" Action="Warning" />
    +    <Rule Id="C28158" Action="Warning" />
    +    <Rule Id="C28161" Action="Warning" />
    +    <Rule Id="C28162" Action="Warning" />
    +    <Rule Id="C28165" Action="Warning" />
    +    <Rule Id="C28166" Action="Warning" />
    +    <Rule Id="C28167" Action="Warning" />
    +    <Rule Id="C28168" Action="Warning" />
    +    <Rule Id="C28169" Action="Warning" />
    +    <Rule Id="C28170" Action="Warning" />
    +    <Rule Id="C28171" Action="Warning" />
    +    <Rule Id="C28172" Action="Warning" />
    +    <Rule Id="C28175" Action="Warning" />
    +    <Rule Id="C28176" Action="Warning" />
    +    <Rule Id="C28177" Action="Warning" />
    +    <Rule Id="C28208" Action="Warning" />
    +    <Rule Id="C28260" Action="Warning" />
    +    <Rule Id="C28266" Action="Warning" />
    +    <Rule Id="C28268" Action="Warning" />
    +    <Rule Id="C28601" Action="Warning" />
    +    <Rule Id="C28602" Action="Warning" />
    +    <Rule Id="C28604" Action="Warning" />
    +    <Rule Id="C28615" Action="Warning" />
    +    <Rule Id="C28616" Action="Warning" />
    +    <Rule Id="C28617" Action="Warning" />
    +    <Rule Id="C28623" Action="Warning" />
    +    <Rule Id="C28624" Action="Warning" />
    +    <Rule Id="C28625" Action="Warning" />
    +    <Rule Id="C28636" Action="Warning" />
    +    <Rule Id="C28637" Action="Warning" />
    +    <Rule Id="C28638" Action="Warning" />
    +    <Rule Id="C28639" Action="Warning" />
    +    <Rule Id="C28640" Action="Warning" />
    +    <Rule Id="C28645" Action="Warning" />
    +    <Rule Id="C28648" Action="Warning" />
    +    <Rule Id="C28650" Action="Warning" />
    +    <Rule Id="C28714" Action="Warning" />
    +    <Rule Id="C28715" Action="Warning" />
    +    <Rule Id="C28716" Action="Warning" />
    +    <Rule Id="C28717" Action="Warning" />
    +    <Rule Id="C28719" Action="Warning" />
    +    <Rule Id="C28720" Action="Warning" />
    +    <Rule Id="C28721" Action="Warning" />
    +    <Rule Id="C28726" Action="Warning" />
    +    <Rule Id="C28727" Action="Warning" />
    +    <Rule Id="C28730" Action="Warning" />
    +    <Rule Id="C28735" Action="Warning" />
    +    <Rule Id="C28736" Action="Warning" />
    +    <Rule Id="C28750" Action="Warning" />
    +    <Rule Id="C28751" Action="Warning" />
    +  </Rules>
    +</RuleSet>
    diff --git a/datapath-windows/ovsext.sln b/datapath-windows/ovsext.sln
    index 1000104f1..ab006e84f 100644
    --- a/datapath-windows/ovsext.sln
    +++ b/datapath-windows/ovsext.sln
    @@ -12,6 +12,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ovsext", "ovsext\ovsext.vcx
     EndProject
     Global
     	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    +		Win10Analyze|x64 = Win10Analyze|x64
     		Win10Debug|x64 = Win10Debug|x64
     		Win10Release|x64 = Win10Release|x64
     		Win8.1Analyze|x64 = Win8.1Analyze|x64
    @@ -22,6 +23,8 @@ Global
     		Win8Release|x64 = Win8Release|x64
     	EndGlobalSection
     	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    +		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
    +		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Build.0 = Win10 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
    @@ -42,6 +45,8 @@ Global
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.Build.0 = Win8 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.ActiveCfg = Win8 Release|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.Build.0 = Win8 Release|x64
    +		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
    +		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Build.0 = Win10 Debug|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
    diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
    index 0509b765b..d50a126b4 100644
    --- a/datapath-windows/ovsext/ovsext.vcxproj
    +++ b/datapath-windows/ovsext/ovsext.vcxproj
    @@ -9,6 +9,10 @@
           <Configuration>Win10 Release</Configuration>
           <Platform>x64</Platform>
         </ProjectConfiguration>
    +    <ProjectConfiguration Include="Win10Analyze|x64">
    +      <Configuration>Win10Analyze</Configuration>
    +      <Platform>x64</Platform>
    +    </ProjectConfiguration>
         <ProjectConfiguration Include="Win8.1 Debug|x64">
           <Configuration>Win8.1 Debug</Configuration>
           <Platform>x64</Platform>
    @@ -71,6 +75,13 @@
         <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
         <DriverTargetPlatform>Desktop</DriverTargetPlatform>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
    +    <TargetVersion />
    +    <UseDebugLibraries>True</UseDebugLibraries>
    +    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
    +    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
    +    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    +  </PropertyGroup>
       <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
         <TargetVersion>Windows8</TargetVersion>
         <UseDebugLibraries>True</UseDebugLibraries>
    @@ -131,6 +142,9 @@
       <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="PropertySheets">
         <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
       </ImportGroup>
    +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="PropertySheets">
    +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    +  </ImportGroup>
       <ItemGroup Label="WrappedTaskItems">
         <ClInclude Include="..\include\OvsDpInterfaceCtExt.h" />
         <ClInclude Include="..\include\OvsDpInterfaceExt.h" />
    @@ -182,11 +196,18 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
    +    <RunCodeAnalysis>true</RunCodeAnalysis>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
         <RunCodeAnalysis>true</RunCodeAnalysis>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
       </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
         <RunCodeAnalysis>true</RunCodeAnalysis>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
       </PropertyGroup>
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <ClCompile>
    @@ -276,6 +297,17 @@
           <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
         </ResourceCompile>
       </ItemDefinitionGroup>
    +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <ClCompile>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </ClCompile>
    +    <Midl>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </Midl>
    +    <ResourceCompile>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </ResourceCompile>
    +  </ItemDefinitionGroup>
       <ItemDefinitionGroup>
         <Link>
           <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib;$(DDK_LIB_PATH)\netio.lib</AdditionalDependencies>
    @@ -290,6 +322,7 @@
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
    +      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
    @@ -299,10 +332,12 @@
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">true</MultiProcessorCompilation>
    +      <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">true</MultiProcessorCompilation>
           <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</EnablePREfast>
           <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">true</EnablePREfast>
    +      <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</EnablePREfast>
         </ClCompile>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(Version)</TimeStamp>
    @@ -314,6 +349,7 @@
         </Inf>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">$(Version)</TimeStamp>
    +      <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">$(Version)</TimeStamp>
         </Inf>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(Version)</TimeStamp>
    @@ -375,6 +411,7 @@
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
    +      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
         </ResourceCompile>
       </ItemGroup>
       <ItemGroup>
    @@ -387,4 +424,4 @@
         <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
       </ItemGroup>
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/ovsext/ovsext.vcxproj.user b/datapath-windows/ovsext/ovsext.vcxproj.user
    index 6231d93f7..5b0c53539 100644
    --- a/datapath-windows/ovsext/ovsext.vcxproj.user
    +++ b/datapath-windows/ovsext/ovsext.vcxproj.user
    @@ -15,6 +15,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <SignMode>TestSign</SignMode>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    @@ -24,4 +27,4 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    -- 
    2.21.0.windows.1
Alin-Gabriel Serdean May 9, 2019, 12:39 p.m. UTC | #2
Applied on master.

-----Original Message-----
From: ovs-dev-bounces@openvswitch.org <ovs-dev-bounces@openvswitch.org> On Behalf Of Anand Kumar via dev
Sent: Wednesday, May 1, 2019 8:04 PM
To: Alin Gabriel Serdean <aserdean@ovn.org>; dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH v2] datapath-windows: Add Win10Analyze target

Thanks for the adding windows 10 analyze target.

Acked-by: Anand Kumar <kumaranand@vmware.com>

Regards,
Anand Kumar

On 4/3/19, 10:48 AM, "Alin Gabriel Serdean" <aserdean@ovn.org> wrote:

    This patch adds a new target called `Win10Analyze` to the driver solution.
    
    It enables us to trigger static analysis over the Win10 target.
    
    Since the location of the ruleset of drivers is somewhat random
    starting from 1803:
    https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.osr.com%2Fblog%2F2018%2F05%2F21%2Fwdk-1803-ca%2F&amp;data=02%7C01%7Ckumaranand%40vmware.com%7C2580925eae8c4b9a4e4608d6b85c8b60%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C636899104959730588&amp;sdata=%2FLesq2PWVRbSB55zyEQbRTrsL2W07s6on8SGlhGTg0w%3D&amp;reserved=0
    
    Commit the ruleset inside our repository. This is the same ruleset used for
    8,8.1 and 10.
    
    Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
    ---
     datapath-windows/Package/package.VcxProj      | 21 ++++-
     datapath-windows/Package/package.VcxProj.user |  5 +-
     datapath-windows/automake.mk                  |  2 +
     .../misc/DriverRecommendedRules.ruleset       | 86 +++++++++++++++++++
     datapath-windows/ovsext.sln                   |  5 ++
     datapath-windows/ovsext/ovsext.vcxproj        | 39 ++++++++-
     datapath-windows/ovsext/ovsext.vcxproj.user   |  5 +-
     7 files changed, 159 insertions(+), 4 deletions(-)
     create mode 100644 datapath-windows/misc/DriverRecommendedRules.ruleset
    
    diff --git a/datapath-windows/Package/package.VcxProj b/datapath-windows/Package/package.VcxProj
    index de747eed2..5939a8816 100644
    --- a/datapath-windows/Package/package.VcxProj
    +++ b/datapath-windows/Package/package.VcxProj
    @@ -9,6 +9,10 @@
           <Configuration>Win10 Release</Configuration>
           <Platform>x64</Platform>
         </ProjectConfiguration>
    +    <ProjectConfiguration Include="Win10Analyze|x64">
    +      <Configuration>Win10Analyze</Configuration>
    +      <Platform>x64</Platform>
    +    </ProjectConfiguration>
         <ProjectConfiguration Include="Win8.1 Debug|x64">
           <Configuration>Win8.1 Debug</Configuration>
           <Platform>x64</Platform>
    @@ -71,6 +75,13 @@
         <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
         <DriverTargetPlatform>Desktop</DriverTargetPlatform>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
    +    <TargetVersion />
    +    <UseDebugLibraries>true</UseDebugLibraries>
    +    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
    +    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
    +    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
         <TargetVersion>Windows8</TargetVersion>
         <UseDebugLibraries>true</UseDebugLibraries>
    @@ -113,6 +124,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
    +  </PropertyGroup>
       <PropertyGroup>
         <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
         <EnableDeployment>False</EnableDeployment>
    @@ -148,6 +162,11 @@
           <UseLocalTime>true</UseLocalTime>
         </Inf2Cat>
       </ItemDefinitionGroup>
    +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2Cat>
    +      <UseLocalTime>true</UseLocalTime>
    +    </Inf2Cat>
    +  </ItemDefinitionGroup>
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
         <Inf2Cat>
           <UseLocalTime>true</UseLocalTime>
    @@ -185,4 +204,4 @@
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
       <ImportGroup Label="ExtensionTargets">
       </ImportGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/Package/package.VcxProj.user b/datapath-windows/Package/package.VcxProj.user
    index 6231d93f7..5b0c53539 100644
    --- a/datapath-windows/Package/package.VcxProj.user
    +++ b/datapath-windows/Package/package.VcxProj.user
    @@ -15,6 +15,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <SignMode>TestSign</SignMode>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    @@ -24,4 +27,4 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/automake.mk b/datapath-windows/automake.mk
    index 3820041f6..b8cf5dd95 100644
    --- a/datapath-windows/automake.mk
    +++ b/datapath-windows/automake.mk
    @@ -3,6 +3,7 @@ EXTRA_DIST += \
     	datapath-windows/Package/package.VcxProj.user \
     	datapath-windows/include/OvsDpInterfaceExt.h \
     	datapath-windows/include/OvsDpInterfaceCtExt.h \
    +	datapath-windows/misc/DriverRecommendedRules.ruleset \
     	datapath-windows/misc/OVS.psm1 \
     	datapath-windows/misc/install.cmd \
     	datapath-windows/misc/uninstall.cmd \
    @@ -86,5 +87,6 @@ EXTRA_DIST += \
     	datapath-windows/ovsext/resource.h
     
     datapath_windows_analyze: all
    +	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10Analyze"
     	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1Analyze"
     	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8Analyze"
    diff --git a/datapath-windows/misc/DriverRecommendedRules.ruleset b/datapath-windows/misc/DriverRecommendedRules.ruleset
    new file mode 100644
    index 000000000..0faae599c
    --- /dev/null
    +++ b/datapath-windows/misc/DriverRecommendedRules.ruleset
    @@ -0,0 +1,86 @@
    +<?xml version="1.0" encoding="utf-8"?>
    +<RuleSet Name="Microsoft Driver Recommended Rules" Description="This rule set contains rules recommended for drivers." ToolsVersion="10.0">
    +  <Include Path="NativeRecommendedRules.ruleset" Action="Default" />
    +  <Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
    +    <Rule Id="C28101" Action="Warning" />
    +    <Rule Id="C28110" Action="Warning" />
    +    <Rule Id="C28111" Action="Warning" />
    +    <Rule Id="C28114" Action="Warning" />
    +    <Rule Id="C28120" Action="Warning" />
    +    <Rule Id="C28121" Action="Warning" />
    +    <Rule Id="C28122" Action="Warning" />
    +    <Rule Id="C28123" Action="Warning" />
    +    <Rule Id="C28124" Action="Warning" />
    +    <Rule Id="C28126" Action="Warning" />
    +    <Rule Id="C28127" Action="Warning" />
    +    <Rule Id="C28128" Action="Warning" />
    +    <Rule Id="C28129" Action="Warning" />
    +    <Rule Id="C28131" Action="Warning" />
    +    <Rule Id="C28132" Action="Warning" />
    +    <Rule Id="C28133" Action="Warning" />
    +    <Rule Id="C28134" Action="Warning" />
    +    <Rule Id="C28135" Action="Warning" />
    +    <Rule Id="C28139" Action="Warning" />
    +    <Rule Id="C28141" Action="Warning" />
    +    <Rule Id="C28143" Action="Warning" />
    +    <Rule Id="C28144" Action="Warning" />
    +    <Rule Id="C28145" Action="Warning" />
    +    <Rule Id="C28146" Action="Warning" />
    +    <Rule Id="C28147" Action="Warning" />
    +    <Rule Id="C28150" Action="Warning" />
    +    <Rule Id="C28151" Action="Warning" />
    +    <Rule Id="C28152" Action="Warning" />
    +    <Rule Id="C28153" Action="Warning" />
    +    <Rule Id="C28156" Action="Warning" />
    +    <Rule Id="C28157" Action="Warning" />
    +    <Rule Id="C28158" Action="Warning" />
    +    <Rule Id="C28161" Action="Warning" />
    +    <Rule Id="C28162" Action="Warning" />
    +    <Rule Id="C28165" Action="Warning" />
    +    <Rule Id="C28166" Action="Warning" />
    +    <Rule Id="C28167" Action="Warning" />
    +    <Rule Id="C28168" Action="Warning" />
    +    <Rule Id="C28169" Action="Warning" />
    +    <Rule Id="C28170" Action="Warning" />
    +    <Rule Id="C28171" Action="Warning" />
    +    <Rule Id="C28172" Action="Warning" />
    +    <Rule Id="C28175" Action="Warning" />
    +    <Rule Id="C28176" Action="Warning" />
    +    <Rule Id="C28177" Action="Warning" />
    +    <Rule Id="C28208" Action="Warning" />
    +    <Rule Id="C28260" Action="Warning" />
    +    <Rule Id="C28266" Action="Warning" />
    +    <Rule Id="C28268" Action="Warning" />
    +    <Rule Id="C28601" Action="Warning" />
    +    <Rule Id="C28602" Action="Warning" />
    +    <Rule Id="C28604" Action="Warning" />
    +    <Rule Id="C28615" Action="Warning" />
    +    <Rule Id="C28616" Action="Warning" />
    +    <Rule Id="C28617" Action="Warning" />
    +    <Rule Id="C28623" Action="Warning" />
    +    <Rule Id="C28624" Action="Warning" />
    +    <Rule Id="C28625" Action="Warning" />
    +    <Rule Id="C28636" Action="Warning" />
    +    <Rule Id="C28637" Action="Warning" />
    +    <Rule Id="C28638" Action="Warning" />
    +    <Rule Id="C28639" Action="Warning" />
    +    <Rule Id="C28640" Action="Warning" />
    +    <Rule Id="C28645" Action="Warning" />
    +    <Rule Id="C28648" Action="Warning" />
    +    <Rule Id="C28650" Action="Warning" />
    +    <Rule Id="C28714" Action="Warning" />
    +    <Rule Id="C28715" Action="Warning" />
    +    <Rule Id="C28716" Action="Warning" />
    +    <Rule Id="C28717" Action="Warning" />
    +    <Rule Id="C28719" Action="Warning" />
    +    <Rule Id="C28720" Action="Warning" />
    +    <Rule Id="C28721" Action="Warning" />
    +    <Rule Id="C28726" Action="Warning" />
    +    <Rule Id="C28727" Action="Warning" />
    +    <Rule Id="C28730" Action="Warning" />
    +    <Rule Id="C28735" Action="Warning" />
    +    <Rule Id="C28736" Action="Warning" />
    +    <Rule Id="C28750" Action="Warning" />
    +    <Rule Id="C28751" Action="Warning" />
    +  </Rules>
    +</RuleSet>
    diff --git a/datapath-windows/ovsext.sln b/datapath-windows/ovsext.sln
    index 1000104f1..ab006e84f 100644
    --- a/datapath-windows/ovsext.sln
    +++ b/datapath-windows/ovsext.sln
    @@ -12,6 +12,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ovsext", "ovsext\ovsext.vcx
     EndProject
     Global
     	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    +		Win10Analyze|x64 = Win10Analyze|x64
     		Win10Debug|x64 = Win10Debug|x64
     		Win10Release|x64 = Win10Release|x64
     		Win8.1Analyze|x64 = Win8.1Analyze|x64
    @@ -22,6 +23,8 @@ Global
     		Win8Release|x64 = Win8Release|x64
     	EndGlobalSection
     	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    +		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
    +		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Build.0 = Win10 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
    @@ -42,6 +45,8 @@ Global
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.Build.0 = Win8 Debug|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.ActiveCfg = Win8 Release|x64
     		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.Build.0 = Win8 Release|x64
    +		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
    +		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Build.0 = Win10 Debug|x64
     		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
    diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
    index 0509b765b..d50a126b4 100644
    --- a/datapath-windows/ovsext/ovsext.vcxproj
    +++ b/datapath-windows/ovsext/ovsext.vcxproj
    @@ -9,6 +9,10 @@
           <Configuration>Win10 Release</Configuration>
           <Platform>x64</Platform>
         </ProjectConfiguration>
    +    <ProjectConfiguration Include="Win10Analyze|x64">
    +      <Configuration>Win10Analyze</Configuration>
    +      <Platform>x64</Platform>
    +    </ProjectConfiguration>
         <ProjectConfiguration Include="Win8.1 Debug|x64">
           <Configuration>Win8.1 Debug</Configuration>
           <Platform>x64</Platform>
    @@ -71,6 +75,13 @@
         <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
         <DriverTargetPlatform>Desktop</DriverTargetPlatform>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
    +    <TargetVersion />
    +    <UseDebugLibraries>True</UseDebugLibraries>
    +    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
    +    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
    +    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
    +  </PropertyGroup>
       <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
         <TargetVersion>Windows8</TargetVersion>
         <UseDebugLibraries>True</UseDebugLibraries>
    @@ -131,6 +142,9 @@
       <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="PropertySheets">
         <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
       </ImportGroup>
    +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="PropertySheets">
    +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
    +  </ImportGroup>
       <ItemGroup Label="WrappedTaskItems">
         <ClInclude Include="..\include\OvsDpInterfaceCtExt.h" />
         <ClInclude Include="..\include\OvsDpInterfaceExt.h" />
    @@ -182,11 +196,18 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
    +    <RunCodeAnalysis>true</RunCodeAnalysis>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
         <RunCodeAnalysis>true</RunCodeAnalysis>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
       </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
         <RunCodeAnalysis>true</RunCodeAnalysis>
    +    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
       </PropertyGroup>
       <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <ClCompile>
    @@ -276,6 +297,17 @@
           <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
         </ResourceCompile>
       </ItemDefinitionGroup>
    +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <ClCompile>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </ClCompile>
    +    <Midl>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </Midl>
    +    <ResourceCompile>
    +      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
    +    </ResourceCompile>
    +  </ItemDefinitionGroup>
       <ItemDefinitionGroup>
         <Link>
           <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib;$(DDK_LIB_PATH)\netio.lib</AdditionalDependencies>
    @@ -290,6 +322,7 @@
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
    +      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
           <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
    @@ -299,10 +332,12 @@
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">true</MultiProcessorCompilation>
    +      <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">true</MultiProcessorCompilation>
           <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">true</MultiProcessorCompilation>
           <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</EnablePREfast>
           <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">true</EnablePREfast>
    +      <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</EnablePREfast>
         </ClCompile>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(Version)</TimeStamp>
    @@ -314,6 +349,7 @@
         </Inf>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">$(Version)</TimeStamp>
    +      <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">$(Version)</TimeStamp>
         </Inf>
         <Inf>
           <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(Version)</TimeStamp>
    @@ -375,6 +411,7 @@
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
           <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
    +      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
         </ResourceCompile>
       </ItemGroup>
       <ItemGroup>
    @@ -387,4 +424,4 @@
         <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
       </ItemGroup>
       <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    -</Project>
    +</Project>
    \ No newline at end of file
    diff --git a/datapath-windows/ovsext/ovsext.vcxproj.user b/datapath-windows/ovsext/ovsext.vcxproj.user
    index 6231d93f7..5b0c53539 100644
    --- a/datapath-windows/ovsext/ovsext.vcxproj.user
    +++ b/datapath-windows/ovsext/ovsext.vcxproj.user
    @@ -15,6 +15,9 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
    +    <SignMode>TestSign</SignMode>
    +  </PropertyGroup>
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    @@ -24,4 +27,4 @@
       <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
         <SignMode>TestSign</SignMode>
       </PropertyGroup>
    -</Project>
    +</Project>
    \ No newline at end of file
    -- 
    2.21.0.windows.1
diff mbox series

Patch

diff --git a/datapath-windows/Package/package.VcxProj b/datapath-windows/Package/package.VcxProj
index de747eed2..5939a8816 100644
--- a/datapath-windows/Package/package.VcxProj
+++ b/datapath-windows/Package/package.VcxProj
@@ -9,6 +9,10 @@ 
       <Configuration>Win10 Release</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Win10Analyze|x64">
+      <Configuration>Win10Analyze</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Win8.1 Debug|x64">
       <Configuration>Win8.1 Debug</Configuration>
       <Platform>x64</Platform>
@@ -71,6 +75,13 @@ 
     <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Desktop</DriverTargetPlatform>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
+    <TargetVersion />
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
+    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
     <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
@@ -113,6 +124,9 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
     <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+  </PropertyGroup>
   <PropertyGroup>
     <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
     <EnableDeployment>False</EnableDeployment>
@@ -148,6 +162,11 @@ 
       <UseLocalTime>true</UseLocalTime>
     </Inf2Cat>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <Inf2Cat>
+      <UseLocalTime>true</UseLocalTime>
+    </Inf2Cat>
+  </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
     <Inf2Cat>
       <UseLocalTime>true</UseLocalTime>
@@ -185,4 +204,4 @@ 
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/datapath-windows/Package/package.VcxProj.user b/datapath-windows/Package/package.VcxProj.user
index 6231d93f7..5b0c53539 100644
--- a/datapath-windows/Package/package.VcxProj.user
+++ b/datapath-windows/Package/package.VcxProj.user
@@ -15,6 +15,9 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <SignMode>TestSign</SignMode>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
@@ -24,4 +27,4 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/datapath-windows/automake.mk b/datapath-windows/automake.mk
index 3820041f6..b8cf5dd95 100644
--- a/datapath-windows/automake.mk
+++ b/datapath-windows/automake.mk
@@ -3,6 +3,7 @@  EXTRA_DIST += \
 	datapath-windows/Package/package.VcxProj.user \
 	datapath-windows/include/OvsDpInterfaceExt.h \
 	datapath-windows/include/OvsDpInterfaceCtExt.h \
+	datapath-windows/misc/DriverRecommendedRules.ruleset \
 	datapath-windows/misc/OVS.psm1 \
 	datapath-windows/misc/install.cmd \
 	datapath-windows/misc/uninstall.cmd \
@@ -86,5 +87,6 @@  EXTRA_DIST += \
 	datapath-windows/ovsext/resource.h
 
 datapath_windows_analyze: all
+	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10Analyze"
 	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1Analyze"
 	MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8Analyze"
diff --git a/datapath-windows/misc/DriverRecommendedRules.ruleset b/datapath-windows/misc/DriverRecommendedRules.ruleset
new file mode 100644
index 000000000..0faae599c
--- /dev/null
+++ b/datapath-windows/misc/DriverRecommendedRules.ruleset
@@ -0,0 +1,86 @@ 
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Microsoft Driver Recommended Rules" Description="This rule set contains rules recommended for drivers." ToolsVersion="10.0">
+  <Include Path="NativeRecommendedRules.ruleset" Action="Default" />
+  <Rules AnalyzerId="Microsoft.Analyzers.NativeCodeAnalysis" RuleNamespace="Microsoft.Rules.Native">
+    <Rule Id="C28101" Action="Warning" />
+    <Rule Id="C28110" Action="Warning" />
+    <Rule Id="C28111" Action="Warning" />
+    <Rule Id="C28114" Action="Warning" />
+    <Rule Id="C28120" Action="Warning" />
+    <Rule Id="C28121" Action="Warning" />
+    <Rule Id="C28122" Action="Warning" />
+    <Rule Id="C28123" Action="Warning" />
+    <Rule Id="C28124" Action="Warning" />
+    <Rule Id="C28126" Action="Warning" />
+    <Rule Id="C28127" Action="Warning" />
+    <Rule Id="C28128" Action="Warning" />
+    <Rule Id="C28129" Action="Warning" />
+    <Rule Id="C28131" Action="Warning" />
+    <Rule Id="C28132" Action="Warning" />
+    <Rule Id="C28133" Action="Warning" />
+    <Rule Id="C28134" Action="Warning" />
+    <Rule Id="C28135" Action="Warning" />
+    <Rule Id="C28139" Action="Warning" />
+    <Rule Id="C28141" Action="Warning" />
+    <Rule Id="C28143" Action="Warning" />
+    <Rule Id="C28144" Action="Warning" />
+    <Rule Id="C28145" Action="Warning" />
+    <Rule Id="C28146" Action="Warning" />
+    <Rule Id="C28147" Action="Warning" />
+    <Rule Id="C28150" Action="Warning" />
+    <Rule Id="C28151" Action="Warning" />
+    <Rule Id="C28152" Action="Warning" />
+    <Rule Id="C28153" Action="Warning" />
+    <Rule Id="C28156" Action="Warning" />
+    <Rule Id="C28157" Action="Warning" />
+    <Rule Id="C28158" Action="Warning" />
+    <Rule Id="C28161" Action="Warning" />
+    <Rule Id="C28162" Action="Warning" />
+    <Rule Id="C28165" Action="Warning" />
+    <Rule Id="C28166" Action="Warning" />
+    <Rule Id="C28167" Action="Warning" />
+    <Rule Id="C28168" Action="Warning" />
+    <Rule Id="C28169" Action="Warning" />
+    <Rule Id="C28170" Action="Warning" />
+    <Rule Id="C28171" Action="Warning" />
+    <Rule Id="C28172" Action="Warning" />
+    <Rule Id="C28175" Action="Warning" />
+    <Rule Id="C28176" Action="Warning" />
+    <Rule Id="C28177" Action="Warning" />
+    <Rule Id="C28208" Action="Warning" />
+    <Rule Id="C28260" Action="Warning" />
+    <Rule Id="C28266" Action="Warning" />
+    <Rule Id="C28268" Action="Warning" />
+    <Rule Id="C28601" Action="Warning" />
+    <Rule Id="C28602" Action="Warning" />
+    <Rule Id="C28604" Action="Warning" />
+    <Rule Id="C28615" Action="Warning" />
+    <Rule Id="C28616" Action="Warning" />
+    <Rule Id="C28617" Action="Warning" />
+    <Rule Id="C28623" Action="Warning" />
+    <Rule Id="C28624" Action="Warning" />
+    <Rule Id="C28625" Action="Warning" />
+    <Rule Id="C28636" Action="Warning" />
+    <Rule Id="C28637" Action="Warning" />
+    <Rule Id="C28638" Action="Warning" />
+    <Rule Id="C28639" Action="Warning" />
+    <Rule Id="C28640" Action="Warning" />
+    <Rule Id="C28645" Action="Warning" />
+    <Rule Id="C28648" Action="Warning" />
+    <Rule Id="C28650" Action="Warning" />
+    <Rule Id="C28714" Action="Warning" />
+    <Rule Id="C28715" Action="Warning" />
+    <Rule Id="C28716" Action="Warning" />
+    <Rule Id="C28717" Action="Warning" />
+    <Rule Id="C28719" Action="Warning" />
+    <Rule Id="C28720" Action="Warning" />
+    <Rule Id="C28721" Action="Warning" />
+    <Rule Id="C28726" Action="Warning" />
+    <Rule Id="C28727" Action="Warning" />
+    <Rule Id="C28730" Action="Warning" />
+    <Rule Id="C28735" Action="Warning" />
+    <Rule Id="C28736" Action="Warning" />
+    <Rule Id="C28750" Action="Warning" />
+    <Rule Id="C28751" Action="Warning" />
+  </Rules>
+</RuleSet>
diff --git a/datapath-windows/ovsext.sln b/datapath-windows/ovsext.sln
index 1000104f1..ab006e84f 100644
--- a/datapath-windows/ovsext.sln
+++ b/datapath-windows/ovsext.sln
@@ -12,6 +12,7 @@  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ovsext", "ovsext\ovsext.vcx
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Win10Analyze|x64 = Win10Analyze|x64
 		Win10Debug|x64 = Win10Debug|x64
 		Win10Release|x64 = Win10Release|x64
 		Win8.1Analyze|x64 = Win8.1Analyze|x64
@@ -22,6 +23,8 @@  Global
 		Win8Release|x64 = Win8Release|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
+		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Build.0 = Win10 Debug|x64
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
@@ -42,6 +45,8 @@  Global
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Debug|x64.Build.0 = Win8 Debug|x64
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.ActiveCfg = Win8 Release|x64
 		{911D7389-3E61-449F-B8F3-14AD7EE9A0F2}.Win8Release|x64.Build.0 = Win8 Release|x64
+		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.ActiveCfg = Win10Analyze|x64
+		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Analyze|x64.Build.0 = Win10Analyze|x64
 		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.ActiveCfg = Win10 Debug|x64
 		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Build.0 = Win10 Debug|x64
 		{63FE215D-98BE-4440-8081-C6160EFB80FA}.Win10Debug|x64.Deploy.0 = Win10 Debug|x64
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index 0509b765b..d50a126b4 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -9,6 +9,10 @@ 
       <Configuration>Win10 Release</Configuration>
       <Platform>x64</Platform>
     </ProjectConfiguration>
+    <ProjectConfiguration Include="Win10Analyze|x64">
+      <Configuration>Win10Analyze</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
     <ProjectConfiguration Include="Win8.1 Debug|x64">
       <Configuration>Win8.1 Debug</Configuration>
       <Platform>x64</Platform>
@@ -71,6 +75,13 @@ 
     <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Desktop</DriverTargetPlatform>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="Configuration">
+    <TargetVersion />
+    <UseDebugLibraries>True</UseDebugLibraries>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
+    <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+  </PropertyGroup>
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
     <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
@@ -131,6 +142,9 @@ 
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+  </ImportGroup>
   <ItemGroup Label="WrappedTaskItems">
     <ClInclude Include="..\include\OvsDpInterfaceCtExt.h" />
     <ClInclude Include="..\include\OvsDpInterfaceExt.h" />
@@ -182,11 +196,18 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
     <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
     <RunCodeAnalysis>true</RunCodeAnalysis>
+    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
     <RunCodeAnalysis>true</RunCodeAnalysis>
+    <CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
     <ClCompile>
@@ -276,6 +297,17 @@ 
       <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <ClCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+    </ClCompile>
+    <Midl>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+    </Midl>
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
   <ItemDefinitionGroup>
     <Link>
       <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)\fwpkclnt.lib;$(SDK_LIB_PATH)\uuid.lib;$(DDK_LIB_PATH)\netio.lib</AdditionalDependencies>
@@ -290,6 +322,7 @@ 
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
@@ -299,10 +332,12 @@ 
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">true</MultiProcessorCompilation>
+      <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">true</MultiProcessorCompilation>
       <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">true</EnablePREfast>
       <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">true</EnablePREfast>
+      <EnablePREfast Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">true</EnablePREfast>
     </ClCompile>
     <Inf>
       <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(Version)</TimeStamp>
@@ -314,6 +349,7 @@ 
     </Inf>
     <Inf>
       <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">$(Version)</TimeStamp>
+      <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">$(Version)</TimeStamp>
     </Inf>
     <Inf>
       <TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(Version)</TimeStamp>
@@ -375,6 +411,7 @@ 
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640=1;VersionWithDots=$(Version);VersionWithCommas=$(Version.Replace('.',','))</PreprocessorDefinitions>
     </ResourceCompile>
   </ItemGroup>
   <ItemGroup>
@@ -387,4 +424,4 @@ 
     <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
+</Project>
\ No newline at end of file
diff --git a/datapath-windows/ovsext/ovsext.vcxproj.user b/datapath-windows/ovsext/ovsext.vcxproj.user
index 6231d93f7..5b0c53539 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj.user
+++ b/datapath-windows/ovsext/ovsext.vcxproj.user
@@ -15,6 +15,9 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
+    <SignMode>TestSign</SignMode>
+  </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
@@ -24,4 +27,4 @@ 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
     <SignMode>TestSign</SignMode>
   </PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file