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

Nithin Raju nithin at vmware.com
Mon Aug 3 15:48:32 UTC 2015


> On Jul 2, 2015, at 4:39 AM, Sorin Vinturis <svinturis at cloudbasesolutions.com> wrote:
> 
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openvswitch_ovs-2Dissues_issues_82&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=pNHQcdr7B40b4h6Yb7FIedI1dnBsxdDuTLBYD3JqV80&m=QkExQ_j9D68wDLPmAi2SUXg57e2fPDJw-qlS8Kt6Vc8&s=Ztyr2IzXEuAyPzNIUTk18u0m-z3T1PLn09IC5aypLzY&e= 
> ---
> 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) {

I know this patch has been checked in, a minor edit could be that, we could nuke the check 'poolHandle == context->ovsPool.ndisHandle’. According to the documentation for NdisGetPoolFromNetBufferList(), the return value is the same as the handle that was passed to NdisAllocateNetBufferList(). In our case, we’d have to check for one of the 5-6 different pool handles we maintain - ‘fixSizePool’, ‘nblOnlyPool’, etc.

I think the check of "nbl->SourceHandle == context->ovsPool.ndisHandle” should suffice.

thanks,
-- Nithin



More information about the dev mailing list