[ovs-dev] [PATCH v2] datapath-windows: Solved BSOD when adding OVS ports

Sorin Vinturis svinturis at cloudbasesolutions.com
Thu Jul 2 11:39:14 UTC 2015


This BSOD occurred in the context of a packet (NBL) with multiple
NET_BUFFER(s) (NBs). The reason for the BSOD is due to the marking
of NBLs created by OVS as being external and wrongly completing them.

Signed-off-by: Sorin Vinturis <svinturis at cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis at cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/82
---
This patch should be applied both on master and branch 2.4.
---
 datapath-windows/ovsext/BufferMgmt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/datapath-windows/ovsext/BufferMgmt.c b/datapath-windows/ovsext/BufferMgmt.c
index 83d6cde..3550e20 100644
--- a/datapath-windows/ovsext/BufferMgmt.c
+++ b/datapath-windows/ovsext/BufferMgmt.c
@@ -560,7 +560,8 @@ OvsInitExternalNBLContext(PVOID ovsContext,
 
     poolHandle = NdisGetPoolFromNetBufferList(nbl);
 
-    if (poolHandle == context->ovsPool.ndisHandle) {
+    if (poolHandle == context->ovsPool.ndisHandle ||
+        nbl->SourceHandle == context->ovsPool.ndisHandle) {
         return (POVS_BUFFER_CONTEXT)NET_BUFFER_LIST_CONTEXT_DATA_START(nbl);
     }
     status = NdisAllocateNetBufferListContext(nbl, sizeof (OVS_BUFFER_CONTEXT),
@@ -801,6 +802,7 @@ OvsPartialCopyNBL(PVOID ovsContext,
                       OVS_DEFAULT_PORT_NO);
 
     InterlockedIncrement((LONG volatile *)&srcCtx->refCount);
+
 #ifdef DBG
     OvsDumpNetBufferList(nbl);
     OvsDumpForwardingDetails(nbl);
@@ -808,6 +810,7 @@ OvsPartialCopyNBL(PVOID ovsContext,
     OvsDumpNetBufferList(newNbl);
     OvsDumpForwardingDetails(newNbl);
 #endif
+
     OVS_LOG_LOUD("Partial Copy new NBL: %p", newNbl);
     return newNbl;
 
-- 
1.9.0.msysgit.0



More information about the dev mailing list