Applied at 3049

-----Original Message-----
From: Alex Naslednikov 
Sent: Wednesday, December 22, 2010 12:48 PM
To: Alex Naslednikov; [email protected]
Subject: RE: [ofw][Patch][IPoIB_NDIS6_CM] Offset calculation bug at __send_gen()

Fix the situation when ETH header fully contained at first SG element
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)

Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp    (revision 3033)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp    (working copy)
@@ -4337,10 +4337,12 @@
         * while (N+1) element may contain only part of it
         */
                
-       while( total_offset >= p_sgl->Elements[i].Length  )
+       while( total_offset >= p_sgl->Elements[i].Length - DataOffset )
        {
                // skip the current element and increment the index
-               total_offset -= p_sgl->Elements[i++].Length;
+               total_offset -= ( p_sgl->Elements[i].Length - DataOffset);
+               DataOffset = 0;
+               i++;
        }
 
        
_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to