Hi Sorin, Thank you for debugging this issue. I think that the NBL context signature is used for code validation only (think about a signature we put in an object for the purpose of validating this object when executing in a different context). Can you think about another way to fix this issue (e.g. a status/flag)? Thanks, Eitan
-----Original Message----- From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Sorin Vinturis Sent: Wednesday, July 01, 2015 7:02 AM To: dev@openvswitch.org Subject: [ovs-dev] [PATCH] datapath-windows: Solved BSOD when adding OVS ports 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. This patch should be applied both on master and branch 2.4. Signed-off-by: Sorin Vinturis <svintu...@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svintu...@cloudbasesolutions.com> Reported-at: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openvswitch_ovs-2Dissues_issues_82&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=CWsgHUxi6ExLXY798tmo3LJ4e3geGYp56lkcH-5cLCY&m=yx7HeX13135X7eeWKg3s73H3l711NpzfUes52_NsBqQ&s=3pshLMQB4SoTOb8sZncux7Bi6G5ADQwH7I0TlH9Is2U&e= --- datapath-windows/ovsext/BufferMgmt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datapath-windows/ovsext/BufferMgmt.c b/datapath-windows/ovsext/BufferMgmt.c index 83d6cde..d36dfa2 100644 --- a/datapath-windows/ovsext/BufferMgmt.c +++ b/datapath-windows/ovsext/BufferMgmt.c @@ -558,6 +558,12 @@ OvsInitExternalNBLContext(PVOID ovsContext, NDIS_STATUS status; UINT16 flags; + ctx = (POVS_BUFFER_CONTEXT)NET_BUFFER_LIST_CONTEXT_DATA_START(nbl); + if (ctx && ctx->magic == OVS_CTX_MAGIC) { + OVS_LOG_INFO("nbl context already initialized/allocated by OVS."); + return ctx; + } + poolHandle = NdisGetPoolFromNetBufferList(nbl); if (poolHandle == context->ovsPool.ndisHandle) { @@ -801,6 +807,7 @@ OvsPartialCopyNBL(PVOID ovsContext, OVS_DEFAULT_PORT_NO); InterlockedIncrement((LONG volatile *)&srcCtx->refCount); + #ifdef DBG OvsDumpNetBufferList(nbl); OvsDumpForwardingDetails(nbl); @@ -808,6 +815,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 _______________________________________________ dev mailing list dev@openvswitch.org https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailman_listinfo_dev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=CWsgHUxi6ExLXY798tmo3LJ4e3geGYp56lkcH-5cLCY&m=yx7HeX13135X7eeWKg3s73H3l711NpzfUes52_NsBqQ&s=M6NSK31Vva4-yAxaCNBMGVI5d9vESZHrNxsIVtrjJEE&e= _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev