Hi Sorin,
This change applies only for 6.40 drivers. Unless we bump the driver version
this code has no effect.
You may want to bump the minor version.
#define NDIS_FILTER_MAJOR_VERSION 6
#define NDIS_FILTER_MINOR_VERSION 30 <------------ 40
driverChars.MajorNdisVersion = NDIS_FILTER_MAJOR_VERSION;
driverChars.MinorNdisVersion = NDIS_FILTER_MINOR_VERSION;
Thanks,
Eitan
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Sorin Vinturis
Sent: Friday, November 21, 2014 8:16 AM
To: [email protected]
Subject: [ovs-dev] [PATCH] datapath-windows: Support for hybrid forwarding
In a hybrid forwarding environment, there are two types of packets that enter
and leave the Hyper-V extensible switch: NVGRE packets and non-NVGRE packets.
Hybrid forwarding involves filtering the incoming traffic based on packet type.
Thus, we must split the incoming traffic into NVGRE and non-NVGRE packets.
All non-NVGRE traffic is forwarded by the OVS extension and processed as usual,
and the NVGRE traffic is passed to NDIS to be handled by the HNV module.
Currently, the OVS extension supports only NDIS 6.30, but hybrid forwarding
involves supporting NDIS 6.40. Thus, I have changed the necessary compiler
settings to reflect this.
More details about hybrid forwarding and the necessary NDIS 6.40 support is
provided in issue #52.
Signed-off-by: Sorin Vinturis <[email protected]>
Reported-by: Nithin Raju <[email protected]>
Reported-at:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openvswitch_ovs-2Dissues_issues_52&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=CWsgHUxi6ExLXY798tmo3LJ4e3geGYp56lkcH-5cLCY&m=IF9N0kgUMpt8gOjYSq3_AJkSJSQlF85oyI1sxDSezaE&s=KskXnDJSk-dizBlmk1XJga2EXqtmL6-7g7HTZF0rElo&e=
---
datapath-windows/ovsext/PacketIO.c | 33 +++++++++++++++++++++++++++++++--
datapath-windows/ovsext/ovsext.vcxproj | 6 +++---
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/datapath-windows/ovsext/PacketIO.c
b/datapath-windows/ovsext/PacketIO.c
index 1af391b..d022c45 100644
--- a/datapath-windows/ovsext/PacketIO.c
+++ b/datapath-windows/ovsext/PacketIO.c
@@ -193,6 +193,10 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
LIST_ENTRY missedPackets;
UINT32 num = 0;
OvsCompletionList completionList;
+ PNET_BUFFER_LIST extForwardedNbls = NULL;
+ PNET_BUFFER_LIST nativeForwardedNbls = NULL;
+ PNET_BUFFER_LIST *nextExtForwardNbl = &extForwardedNbls;
+ PNET_BUFFER_LIST *nextNativeForwardedNbl = &nativeForwardedNbls;
dispatch = NDIS_TEST_SEND_AT_DISPATCH_LEVEL(SendFlags)?
NDIS_RWL_AT_DISPATCH_LEVEL : 0; @@
-201,8 +205,27 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
InitializeListHead(&missedPackets);
OvsInitCompletionList(&completionList, switchContext, sendCompleteFlags);
-
- for (curNbl = netBufferLists; curNbl != NULL; curNbl = nextNbl) {
+
+ /*
+ * Split NBL list into NBLs to be forwarded by us, and those that require
+ * native forwarding. */
+ for (curNbl = netBufferLists; curNbl != NULL; curNbl = nextNbl) {
+ nextNbl = curNbl->Next;
+ curNbl->Next = NULL;
+ fwdDetail = NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(curNbl);
+
+ if (fwdDetail->NativeForwardingRequired) {
+ *nextNativeForwardedNbl = curNbl;
+ nextNativeForwardedNbl = &(curNbl->Next);
+ }
+ else
+ {
+ *nextExtForwardNbl = curNbl;
+ nextExtForwardNbl = &(curNbl->Next);
+ }
+ }
+
+ for (curNbl = extForwardedNbls; curNbl != NULL; curNbl = nextNbl) {
POVS_VPORT_ENTRY vport;
UINT32 portNo;
OVS_DATAPATH *datapath = &switchContext->datapath; @@ -315,6 +338,12
@@ dropit:
}
}
+ if (nativeForwardedNbls) {
+ /* This is NVGRE encapsulated traffic and is forwarded to NDIS
+ * in order to be handled by the HNV module. */
+ OvsSendNBLIngress(switchContext, nativeForwardedNbls, SendFlags);
+ }
+
/* Queue the missed packets. */
OvsQueuePackets(&missedPackets, num);
OvsFinalizeCompletionList(&completionList);
diff --git a/datapath-windows/ovsext/ovsext.vcxproj
b/datapath-windows/ovsext/ovsext.vcxproj
index 88c9122..2a34f5d 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -104,13 +104,13 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
-
<PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions>
+
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640
+ =1</PreprocessorDefinitions>
</ClCompile>
<Midl>
-
<PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions>
+
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640
+ =1</PreprocessorDefinitions>
</Midl>
<ResourceCompile>
-
<PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS630=1</PreprocessorDefinitions>
+
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);NDIS_WDM=1;NDIS640
+ =1</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
--
1.9.0.msysgit.0
_______________________________________________
dev mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailman_listinfo_dev&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=CWsgHUxi6ExLXY798tmo3LJ4e3geGYp56lkcH-5cLCY&m=IF9N0kgUMpt8gOjYSq3_AJkSJSQlF85oyI1sxDSezaE&s=gLcssaa2d-FEMQfPBl10t1wrpfxl3P-Pm55B3TT7T_s&e=
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev