<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=852580910-26012009><FONT face=Arial color=#0000ff size=2>The
following patch is a more correct solution for IPoIB stack (not
IPoIB_CM)</FONT></SPAN></DIV>
<DIV><SPAN class=852580910-26012009><FONT face=Arial color=#0000ff
size=2>Tzachi, please review</FONT></SPAN></DIV>
<DIV><SPAN class=852580910-26012009><FONT face=Arial color=#0000ff size=2>Index:
ipoib_port.c<BR>===================================================================<BR>---
ipoib_port.c (revision 3777)<BR>+++ ipoib_port.c (working copy)<BR>@@
-3403,6 +3403,18 @@<BR> <BR> IPOIB_ENTER( IPOIB_DBG_SEND
);<BR> <BR>+ if (p_ip_hdr->offset > 0) {<BR>+ /* This
is a fragmented part of UDP packet<BR>+ * Only first packet will
contain UDP header in such case<BR>+ * So, return if offset >
0<BR>+ */<BR>+ cl_perf_start( SendUdp
);<BR>+ status = __send_gen( p_port, p_desc,0
);<BR>+ cl_perf_stop( &p_port->p_adapter->perf, SendUdp
);<BR>+ IPOIB_EXIT( IPOIB_DBG_SEND );<BR>+ return
status;<BR>+ }<BR>+ <BR> if( !buf_len
)<BR> {<BR> cl_perf_start( QueryUdp );<BR>@@
-3426,16 +3438,8 @@<BR> {<BR> p_udp_hdr =
(udp_hdr_t*)GetIpPayloadPtr(p_ip_hdr);<BR> }<BR>+ <BR> /*
Get the UDP header and check the destination port numbers.
*/<BR>- <BR>- if (p_ip_hdr->offset > 0) {<BR>- /*
This is a fragmented part of UDP packet<BR>- * Only first packet
will contain UDP header in such case<BR>- * So, return if offset
> 0<BR>- */<BR>- return
NDIS_STATUS_PENDING;<BR>- }<BR>- <BR> if( buf_len <
sizeof(udp_hdr_t) )<BR> {<BR> IPOIB_PRINT_EXIT(
TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Alex Naslednikov <BR><B>Sent:</B>
Sunday, January 18, 2009 4:37 PM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Cc:</B> Tzachi Dar; Alex
Estrin<BR><B>Subject:</B> [ofw] [IPoIB, IPoIB_CM] Bugfix for UDP
packets<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=315522814-18012009>Several test were
failed on sending UDP packets with MTU-like sizes.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=315522814-18012009>Fragmented UDP
packets do not contain UDP header, except the first one.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=315522814-18012009>So, appropriate
check was inserted.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=315522814-18012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=315522814-18012009>This bug was shown
rarely (only when the last fragment was less than 8 bytes), because the
following check always worked (by mistake):</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=315522814-18012009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=315522814-18012009>if(
(p_udp_hdr->src_port != DHCP_PORT_CLIENT
||<BR> p_udp_hdr->dst_port != DHCP_PORT_SERVER)
&&<BR> (p_udp_hdr->src_port != DHCP_PORT_SERVER
||<BR> p_udp_hdr->dst_port != DHCP_PORT_CLIENT)
)<BR> {<BR> /* Not a DHCP packet. */<BR> return
NDIS_STATUS_PENDING;<BR> }</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
ipoib_port.c<BR>===================================================================<BR>---
ipoib_port.c (revision 3752)<BR>+++ ipoib_port.c (working
copy)<BR>@@ -3763,6 +3763,15 @@<BR> p_udp_hdr =
(udp_hdr_t*)GetIpPayloadPtr(p_ip_hdr);<BR> }<BR> /* Get
the UDP header and check the destination port numbers.
*/<BR>+ <BR>+ if (p_ip_hdr->offset > 0) {<BR>+ /*
This is a fragmented part of UDP packet<BR>+ * Only first packet
will contain UDP header in such case<BR>+ * So, return if offset
> 0<BR>+ */<BR>+ return
NDIS_STATUS_PENDING;<BR>+ }<BR>+ <BR> if( buf_len
< sizeof(udp_hdr_t)
)<BR> {<BR> IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR,
IPOIB_DBG_ERROR</FONT></DIV></BLOCKQUOTE></BODY></HTML>