These are some minimal changes required to get the base code to work with our forwarding extension. These changes are licensed under Apache License, Version 2.0.
Co-Authored-By: Eitan Eliahu <elia...@vmware.com> Signed-off-by: Eitan Eliahu <elia...@vmware.com> Co-Authored-By: Guolin Yang <gy...@vmware.com> Signed-off-by: Guolin Yang <gy...@vmware.com> Co-Authored-By: Linda Sun <l...@vmware.com> Signed-off-by: Linda Sun <l...@vmware.com> Co-Authored-By: Nithin Raju <nit...@vmware.com> Signed-off-by: Nithin Raju <nit...@vmware.com> Signed-off-by: Saurabh Shah <ssaur...@vmware.com> --- datapath-windows/base/SxApi.h | 4 ++-- datapath-windows/base/SxBase.c | 18 ++++++------------ datapath-windows/base/SxBase.h | 4 +++- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/datapath-windows/base/SxApi.h b/datapath-windows/base/SxApi.h index 6ee52c9..8d564e0 100644 --- a/datapath-windows/base/SxApi.h +++ b/datapath-windows/base/SxApi.h @@ -61,7 +61,7 @@ Routine Description: An extension should allocate/initalize all global data in this function. Arguments: - NULL + sxDriverHandle - Filter driver handle. Return Value: NDIS_STATUS_SUCCESS succeeds driver entry. @@ -70,7 +70,7 @@ Return Value: --*/ NDIS_STATUS -SxExtInitialize(); +SxExtInitialize(NDIS_HANDLE sxDriverHandle); /*++ diff --git a/datapath-windows/base/SxBase.c b/datapath-windows/base/SxBase.c index 57fabd8..db8a478 100644 --- a/datapath-windows/base/SxBase.c +++ b/datapath-windows/base/SxBase.c @@ -60,15 +60,6 @@ DriverEntry( UNREFERENCED_PARAMETER(RegistryPath); - // - // Initialize extension specific data. - // - status = SxExtInitialize(); - if (status != NDIS_STATUS_SUCCESS) - { - goto Cleanup; - } - RtlInitUnicodeString(&serviceName, SxExtServiceName); RtlInitUnicodeString(&SxExtensionFriendlyName, SxExtFriendlyName); RtlInitUnicodeString(&SxExtensionGuid, SxExtUniqueName); @@ -118,7 +109,12 @@ DriverEntry( &fChars, &SxDriverHandle); -Cleanup: + // + // Initialize extension specific data. + // + if (status == NDIS_STATUS_SUCCESS) { + status = SxExtInitialize(SxDriverHandle); + } if (status != NDIS_STATUS_SUCCESS) { @@ -129,8 +125,6 @@ Cleanup: } NdisFreeSpinLock(&SxExtensionListLock); - - SxExtUninitialize(); } return status; diff --git a/datapath-windows/base/SxBase.h b/datapath-windows/base/SxBase.h index 98bcf01..0e208f5 100644 --- a/datapath-windows/base/SxBase.h +++ b/datapath-windows/base/SxBase.h @@ -15,6 +15,8 @@ Abstract: --*/ +#ifndef __SX_BASE_H_ +#define __SX_BASE_H_ 1 extern NDIS_STRING SxExtensionFriendlyName; extern NDIS_STRING SxExtensionGuid; @@ -165,4 +167,4 @@ extern ULONG SxDebugLevel; #endif - +#endif /* __SX_BASE_H_ */ -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev