On Thu, May 21, 2015 at 12:13:54PM +0000, Sorin Vinturis wrote:
> Added support for creating and handling multiple NBLs with only one NB
> for ingress data path.
> 
> Signed-off-by: Sorin Vinturis <svinturis at cloudbasesolutions.com>
> Reported-by: Alessandro Pilotti <apilotti at cloudbasesolutions.com>
> Reported-at: https://github.com/openvswitch/ovs-issues/issues/2
> ---
> v2: Original NBL's buffer context reference count is modified through
> OvsCompleteNBL, instead of accessing it directly.

I can't get this to apply, the following hunk gets rejected:

diff a/datapath-windows/ovsext/PacketIO.c b/datapath-windows/ovsext/PacketIO.c  
(rejected hunks)
@@ -256,18 +261,36 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
         }
 #endif
 
-        /* Ethernet Header is a guaranteed safe access. */
-        curNb = NET_BUFFER_LIST_FIRST_NB(curNbl);
-        if (curNb->Next != NULL) {
-            /* XXX: This case is not handled yet. */
+        ctx = OvsInitExternalNBLContext(switchContext, curNbl,
+                  sourcePort == switchContext->virtualExternalPortId);
+        if (ctx == NULL) {
             RtlInitUnicodeString(&filterReason,
-                L"Dropping NBLs with multiple NBs");
+                L"Cannot allocate external NBL context.");
+
             OvsStartNBLIngressError(switchContext, curNbl,
                                     sendCompleteFlags, &filterReason,
                                     NDIS_STATUS_RESOURCES);
             continue;
-        } else {
-            POVS_BUFFER_CONTEXT ctx;
+        }
+
+        /* Ethernet Header is a guaranteed safe access. */
+        curNb = NET_BUFFER_LIST_FIRST_NB(curNbl);
+        if (curNb->Next != NULL) {
+            /* Create a NET_BUFFER_LIST for each NET_BUFFER. */
+            status = OvsCreateNewNBLsFromMultipleNBs(switchContext,
+                                                     &curNbl,
+                                                     &nextNbl);
+            if (!NT_SUCCESS(status)) {
+                RtlInitUnicodeString(&filterReason,
+                                     L"Cannot allocate NBLs with single NB.");
+
+                OvsStartNBLIngressError(switchContext, curNbl,
+                                        sendCompleteFlags, &filterReason,
+                                        NDIS_STATUS_RESOURCES);
+                continue;
+            }
+        }
+        {
             OvsFlow *flow;
 
             /* Take the DispatchLock so none of the VPORTs disconnect while
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to