<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:v =
"urn:schemas-microsoft-com:vml"><HEAD><!--[if !mso]>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 77.95pt 1.0in 77.95pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
OL {
MARGIN-BOTTOM: 0in
}
UL {
MARGIN-BOTTOM: 0in
}
</STYLE>
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff
size=2>Applied at 1364.</FONT></SPAN></DIV>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff size=2>It
seems that we will have to deal with ip options at a different
time.</FONT></SPAN></DIV>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=297285107-10072008><FONT face=Arial color=#0000ff
size=2>Tzachi</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Anatoly Greenblatt
[mailto:anatolyg@voltaire.com] <BR><B>Sent:</B> Wednesday, July 09, 2008 6:09
PM<BR><B>To:</B> Tzachi Dar; ofw@lists.openfabrics.org<BR><B>Subject:</B> RE:
[ofw][patch] fixes client id insertion<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: navy; FONT-FAMILY: Tahoma">On the second
thought, this is correct assumption because of the way how send_buf_t is
defined. So let me answer two questions again<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: navy; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"><FONT
face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">The code checks that the
content is no greater than dhcp header + 312 bytes (options). That is the
space reserved for dhcp request in send_buf_t. The actual size is less and
may vary, so if we change the content of dhcp options we must update
lengths. Instead of calculating the actual size I fill the maximum size.
This is ok because the last option is indicated by 0xff, which lets the
receiver to ignore extra bytes.<o:p></o:p></SPAN></FONT>
<LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"><FONT
face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">The size of ip header in this
case is constant, see send_buf_t definition.<o:p></o:p></SPAN></FONT>
</LI></OL>
<P class=MsoNormal><FONT face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: navy; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: navy; FONT-FAMILY: Tahoma">Retgards,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma color=navy size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: navy; FONT-FAMILY: Tahoma">Anatoly.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> <o:p></o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org]
<B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Anatoly
Greenblatt<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday,
July 09, 2008 17:50<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
Tzachi Dar; ofw@lists.openfabrics.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [ofw][patch] fixes client id
insertion</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Hi
Tzahi,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Usually udp checksum is not
calculated.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">The existing code checks that the
dhcp packet is not greater than sizeof(dhcp_pkt_t), but you’re right about the
IP header size, we need to fix it because this is a common assumption, see
existing code few lines below: p_desc->local_ds[1].length =
…<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Thanks,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: Tahoma">Anatoly.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">-----Original Message-----<BR>From: Tzachi Dar
[mailto:tzachid@mellanox.co.il] <BR>Sent: Wednesday, July 09, 2008
17:26<BR>To: Anatoly Greenblatt; ofw@lists.openfabrics.org<BR>Subject: RE:
[ofw][patch] fixes client id insertion<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Hi Anatoly,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">I have looked at this patch, and there are some issues
that I don't<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">quite understand:<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">* what about UDP checksum? It doesn't seem as you are
calculating it.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">* In this patch you are doing an assumption that the
packet size will<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">always be the size of ip + the size of UDP + the size
of dhcp <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">"p_desc->p_buf->ip.hdr.length = cl_ntoh16(
sizeof(ip_hdr_t) +<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">sizeof(udp_hdr_t) + sizeof(dhcp_pkt_t)
);"<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">This assumes that the size is always constant. This
brings two questions<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">as far as I understand:<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">1) If the size is always constant, why do we have to
touch this in any<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">case?<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">2) at least the size of the ip header is not constant.
So you should<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">probably replace sizeof(ip_hdr_t) with
IP_HEADER_LENGTH(IpHdr);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Where #define IP_HEADER_LENGTH(pIpHdr)
\<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"> (
(ULONG)((pIpHdr->iph_verlen & 0x0F) << 2)
)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Thanks<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">Tzachi<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> -----Original
Message-----<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> From: ofw-bounces@lists.openfabrics.org
<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> [mailto:ofw-bounces@lists.openfabrics.org] On
Behalf Of <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Anatoly Greenblatt<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Sent: Wednesday, June 25, 2008 5:13
PM<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> To:
ofw@lists.openfabrics.org<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Subject: [ofw][patch] fixes client id
insertion<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
<<fix_client_id_insertion.patch>> Hi,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> The client id inserted in dhcp packets w/o
updating lengths <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> in udp and ip headers. As a result in some cases
the dhcp <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> packet was not accepted by dhcp server
("parameter is larger <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> than buffer" error).<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> The fix updates length in udp and ip header and
calculate ip <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> header checksum if needed. Also fixes incorrect
return code.<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Best regards,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Anatoly<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> Index: ipoib_port.c<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
===================================================================<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> --- ipoib_port.c
(revision 1295)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +++ ipoib_port.c
(working copy)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> @@ -3216,6 +3216,19
@@<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> }<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +unsigned short ipchksum(unsigned short *ip, int
len) {<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + unsigned long sum =
0;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + len >>=
1;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + while (len--)
{<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + sum
+= *(ip++);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + if
(sum > 0xFFFF)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
+ sum -=
0xFFFF;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
}<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> + return (unsigned
short)((~sum) & 0x0000FFFF); }<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> static
NDIS_STATUS<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
__send_mgr_filter_dhcp(<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
IN
ipoib_port_t* const<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> p_port,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> @@ -3317,7 +3330,7
@@<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
{<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
IPOIB_PRINT_EXIT(<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> TRACE_LEVEL_ERROR,
IPOIB_DBG_ERROR,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
("Can't convert CID to<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> IPoIB format.\n") );<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
-
return IB_INSUFFICIENT_MEMORY;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
+
return NDIS_STATUS_RESOURCES;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
}<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
/* Move the existing options <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> down, and add a new CID option
*/<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
len = p_option - ( p_cid + <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> p_cid[1] + 2 ); @@ -3357,10 +3370,21
@@<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
CL_ASSERT( p_cid[1] == 21
);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
p_cid[23]=
DHCP_OPT_END;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> -
ib_gid_set_default( &gid,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> p_port->p_adapter->guids.port_guid.guid
);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
ib_gid_set_default( &gid,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> p_port->p_adapter->guids.port_guid
);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
cl_memcpy( &p_cid[7],
&gid, sizeof(ib_gid_t) );<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
cl_memcpy( &p_cid[3],
&p_port->ib_mgr.qpn,<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> sizeof(p_port->ib_mgr.qpn)
);
<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
p_ib_dhcp->htype =
DHCP_HW_TYPE_IB;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
/* update lengths to include any change we made
*/<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
p_desc->p_buf->ip.hdr.length = cl_ntoh16(<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> sizeof(ip_hdr_t) + sizeof(udp_hdr_t) +
sizeof(dhcp_pkt_t) );<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
p_desc->p_buf->ip.prot.udp.hdr.length =
cl_ntoh16(<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> sizeof(udp_hdr_t) + sizeof(dhcp_pkt_t)
);<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
/* update crc in ip header */<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
if( !p_port->p_adapter->params.send_chksum_offload
)<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
{<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
+
p_desc->p_buf->ip.hdr.chksum = 0;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
+
p_desc->p_buf->ip.hdr.chksum =<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> ipchksum((unsigned short*)
&p_desc->p_buf->ip.hdr,
sizeof(ip_hdr_t));<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> +
}<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
break;<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> <o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">> /* Server messages.
*/<o:p></o:p></SPAN></FONT></P>
<P class=MsoPlainText><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt">>
<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>