[ovs-dev] [PATCH] datapath-windows: Fix nbl cleanup when memory allocation fails

Sairam Venugopal vsairam at vmware.com
Fri Mar 8 21:22:33 UTC 2019


StartNblIngressError should be called only when an NBL hasn't been
modified. In this case the nbl context was initialized. Rely on existing
packet completion mechanism to cleanup the NBL.

Found while testing with DriverVerifier with limited memory setting
enabled.

Signed-off-by: Sairam Venugopal <vsairam at vmware.com>
---
 datapath-windows/ovsext/PacketIO.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/datapath-windows/ovsext/PacketIO.c b/datapath-windows/ovsext/PacketIO.c
index 38e3e5f..57c583c 100644
--- a/datapath-windows/ovsext/PacketIO.c
+++ b/datapath-windows/ovsext/PacketIO.c
@@ -283,9 +283,8 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
                 RtlInitUnicodeString(&filterReason,
                                      L"Cannot allocate NBLs with single NB.");
 
-                OvsStartNBLIngressError(switchContext, curNbl,
-                                        sendCompleteFlags, &filterReason,
-                                        NDIS_STATUS_RESOURCES);
+                OvsAddPktCompletionList(&completionList, TRUE, sourcePort,
+                                        curNbl, 0, &filterReason);
                 continue;
             }
 
-- 
2.9.0.windows.1



More information about the dev mailing list