This patch optionally extends the "Fix Win10 build with VS2022" patch 
with a new ovsext.inf:

The inf file has been rewritten according to current Microsoft recommendations. 
This enables the use of "run from driver store", 
however for some reason not fully clear run from driver store does 
not work on Windows Server 2019.
With the updated inf file, the driver is almost compatible 
with the "Windows Driver" target platform requirements - 
at the latest when Windows Server 2019 is deprecated. 

The fallback section ensures compatibility with older versions.

Signed-off-by: Frank Wagner <frank.wag...@dbosoft.eu>
Co-authored-by: Christopher Mann <christopher.m...@dbosoft.eu>
Signed-off-by: Christopher Mann <christopher.m...@dbosoft.eu>

---
 datapath-windows/ovsext/ovsext.inf | 79 ++++++++++++++++++++----------
 1 file changed, 53 insertions(+), 26 deletions(-)

diff --git a/datapath-windows/ovsext/ovsext.inf 
b/datapath-windows/ovsext/ovsext.inf
index 59ae5304b..89efd469a 100644
--- a/datapath-windows/ovsext/ovsext.inf
+++ b/datapath-windows/ovsext/ovsext.inf
@@ -12,44 +12,57 @@ DriverVer   = 10/10/2013,1.0
 PnpLockdown = 1
 
 [Manufacturer]
-%OVS%=OVS,NTx86,NTia64,NTamd64
-
-[OVS.NTx86]
-%OVSExt_Desc%=Install, OVSExt
-
-[OVS.NTia64]
-%OVSExt_Desc%=Install, OVSExt
-
+%OVS%=OVS,NTamd64,NTamd64.10.0...19044
+
+; Model section for Windows 10 21H2 (build 19044) or newer. This also includes
+; Server 2022 and Windows 11. These OS will use run from driver store (DIRID 
13).
+; 
+; According to the documentation, run from driver store (DIRID 13) should work
+; with build 16299 or 17134 or later. In reality, the service installation 
fails
+; on Server 2019 (build 17763). Windows 10 21H2 (build 19044) is the oldest 
non-LTSC
+; build which is still supported.
+[OVS.NTamd64.10.0...19044]
+%OVSExt_Desc% = OVS_Install, OVSExt
+
+; Model section for older versions of Windows
 [OVS.NTamd64]
-%OVSExt_Desc%=Install, OVSExt
+%OVSExt_Desc% = OVS_Install_Fallback, OVSExt
 
 ;-------------------------------------------------------------------------
 ; Installation Section
 ;-------------------------------------------------------------------------
-[Install]
-AddReg=Inst_Ndi
-Characteristics=0x40000
-NetCfgInstanceId="{583CC151-73EC-4A6A-8B47-578297AD7623}"
-Copyfiles = OVSExt.copyfiles.sys
+[OVS_Install]
+AddReg           = OVS_Install_Ndi
+Characteristics  = 0x40000
+NetCfgInstanceId = "{583CC151-73EC-4A6A-8B47-578297AD7623}"
+Copyfiles        = OVS_Install_Files
+
+[OVS_Install_Fallback]
+AddReg           = OVS_Install_Ndi
+Characteristics  = 0x40000
+NetCfgInstanceId = "{583CC151-73EC-4A6A-8B47-578297AD7623}"
+Copyfiles        = OVS_Install_Fallback_Files
 
 [SourceDisksNames]
-1=%OVSExt_Desc%,"",,
+1 = %OVSExt_Desc%
 
 [SourceDisksFiles]
-OVSExt.sys=1
+OVSExt.sys = 1
 
 [DestinationDirs]
-DefaultDestDir=12
-OVSExt.copyfiles.sys=12
+OVS_Install_Files          = 13
+OVS_Install_Fallback_Files = 12
 
-[OVSExt.copyfiles.sys]
+[OVS_Install_Files]
 OVSExt.sys,,,2
 
+[OVS_Install_Fallback_Files]
+OVSExt.sys,,,2
 
 ;-------------------------------------------------------------------------
 ; Ndi installation support
 ;-------------------------------------------------------------------------
-[Inst_Ndi]
+[OVS_Install_Ndi]
 HKR, Ndi,Service,,"OVSExt"
 HKR, Ndi,CoServices,0x00010000,"OVSExt"
 HKR, Ndi,HelpText,,%OVSExt_HelpText%
@@ -61,13 +74,27 @@ HKR, Ndi\Interfaces, FilterMediaTypes,,"vmnetextension"
 HKR, Ndi,FilterRunType, 0x00010001, 2 ; optional
 
 ;-------------------------------------------------------------------------
-; Service installation support, common.EventLog here is to demonstrate how to
-; write an enent log
+; Service installation
 ;-------------------------------------------------------------------------
-[Install.Services]
-AddService=OVSExt,,OVSExt_Service_Inst;, common.EventLog
+[OVS_Install.Services]
+AddService = OVSExt,,OVS_Install_AddService
+
+[OVS_Install_AddService]
+DisplayName     = %OVSExt_Desc%
+ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
+StartType       = 1 ;SERVICE_SYSTEM_START
+ErrorControl    = 1 ;SERVICE_ERROR_NORMAL
+ServiceBinary   = %13%\OVSExt.sys
+LoadOrderGroup  = NDIS
+Description     = %OVSExt_Desc%
+
+[OVS_Install.Remove.Services]
+DelService=OVSExt,0x200
+
+[OVS_Install_Fallback.Services]
+AddService = OVSExt,,OVS_Install_Fallback_AddService
 
-[OVSExt_Service_Inst]
+[OVS_Install_Fallback_AddService]
 DisplayName     = %OVSExt_Desc%
 ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
 StartType       = 1 ;SERVICE_SYSTEM_START
@@ -76,7 +103,7 @@ ServiceBinary   = %12%\OVSExt.sys
 LoadOrderGroup  = NDIS
 Description     = %OVSExt_Desc%
 
-[Install.Remove.Services]
+[OVS_Install_Fallback.Remove.Services]
 DelService=OVSExt,0x200
 
 [Strings]
-- 
2.48.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to