[ofw] [Patch][IPoIB_NDIS6_CM] Offset calculation bug at __send_gen()
Alex Naslednikov
xalex at mellanox.co.il
Mon Dec 27 05:41:08 PST 2010
Applied at 3049
-----Original Message-----
From: Alex Naslednikov
Sent: Wednesday, December 22, 2010 12:48 PM
To: Alex Naslednikov; ofw at lists.openfabrics.org
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++;
}
More information about the ofw
mailing list