<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:ns5 =
"http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:ns4 =
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ns3 =
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:ns2 =
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ns1 =
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns0 =
"http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:udcxf =
"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:xsi =
"http://www.w3.org/2001/XMLSchema-instance" xmlns:sps =
"http://schemas.microsoft.com/sharepoint/soap/" xmlns:sp =
"http://schemas.microsoft.com/sharepoint/" xmlns:ec =
"http://www.w3.org/2001/04/xmlenc#" xmlns:sub =
"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:xsd =
"http://www.w3.org/2001/XMLSchema" xmlns:udc =
"http://schemas.microsoft.com/data/udc" xmlns:dsp =
"http://schemas.microsoft.com/sharepoint/dsp" xmlns:ds =
"http://www.w3.org/2000/09/xmldsig#" xmlns:dir =
"http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ois =
"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:x2 =
"http://schemas.microsoft.com/office/excel/2003/xml" XMLNS:D = "DAV:" xmlns:q =
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:html =
"http://www.w3.org/TR/REC-html40" xmlns:oa =
"urn:schemas-microsoft-com:office:activation" xmlns:c =
"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:ss =
"urn:schemas-microsoft-com:office:spreadsheet" xmlns:b =
"urn:schemas-microsoft-com:office:publisher" xmlns:z = "#RowsetSchema" xmlns:rs
= "urn:schemas-microsoft-com:rowset" xmlns:s =
"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt =
"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:a =
"urn:schemas-microsoft-com:office:access" xmlns:p =
"urn:schemas-microsoft-com:office:powerpoint" xmlns:x =
"urn:schemas-microsoft-com:office:excel" 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>
<!--a:link
{mso-style-priority: 99
;}
span.MSOHYPERLINK
{mso-style-priority: 99
;}
a:visited
{mso-style-priority: 99
;}
span.MSOHYPERLINKFOLLOWED
{mso-style-priority: 99
;}
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:Calibri;
color:#1F497D;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=587294210-13042008>This
is more clean version of the patch.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=587294210-13042008>The
uplink info print was nothing due to pointer wrong location.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008>ca_attr buffer layout demands PTR_ALIGN of
every field of vendor specific, (after the mandatory fields of
ca_attr).</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=587294210-13042008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008>Reuven.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=587294210-13042008></SPAN></FONT><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">Index:
hw/mthca/kernel/hca_verbs.c<o:p></o:p></SPAN></DIV>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">---
hw/mthca/kernel/hca_verbs.c<SPAN
style="mso-tab-count: 1"> </SPAN>(revision
1047)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+++
hw/mthca/kernel/hca_verbs.c<SPAN
style="mso-tab-count: 1"> </SPAN>(working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@
-43,7 +43,6 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>#include "mx_abi.h"<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>#include
"mt_pa_cash.h"<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-#define
</SPAN><?xml:namespace prefix = st1 ns =
"urn:schemas-microsoft-com:office:smarttags" /><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">PTR</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">_ALIGN(size)<SPAN
style="mso-tab-count: 1"> </SPAN>(((size) +
sizeof(void*) - 1) & ~(sizeof(void*) - 1))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>// Local
declarations<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">Index:
inc/mthca/mthca_vc.h<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">---
inc/mthca/mthca_vc.h<SPAN
style="mso-tab-count: 1"> </SPAN>(revision
1047)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+++
inc/mthca/mthca_vc.h<SPAN
style="mso-tab-count: 1"> </SPAN>(working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@
-33,6 +33,8 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>#ifndef MTHCA_VC_H<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>#define MTHCA_VC_H<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define
</SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">PTR</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">_ALIGN(size)<SPAN
style="mso-tab-count: 1"> </SPAN>(((size) +
sizeof(void*) - 1) & ~(sizeof(void*) - 1))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>typedef<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>struct _map_crspace
{<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-tab-count: 1"> </SPAN>unsigned __int64<SPAN
style="mso-tab-count: 1"> </SPAN>va;<SPAN
style="mso-tab-count: 2">
</SPAN>/* address of CRSPACE, mapped to user space */<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@
-78,12 +80,12 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>inline char*
mthca_get_board_id(ib_ca_attr_t *ca_attr)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN
style="mso-spacerun: yes"> </SPAN>return
(char*)(ca_attr)+(ca_attr->size - MTHCA_BRD_ID_</SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">LEN</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"> -
sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN
style="mso-tab-count: 1"> </SPAN>return (char*)(ca_attr)
+ (ca_attr->size - </SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">PTR</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">_ALIGN(MTHCA_BRD_ID_</SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">LEN</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">)
- </SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">PTR</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">_ALIGN(sizeof(uplink_info_t)));<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>inline void*
mthca_get_uplink_info(ib_ca_attr_t *ca_attr)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN
style="mso-spacerun: yes"> </SPAN>return
(char*)(ca_attr)+(ca_attr->size -
sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN
style="mso-tab-count: 1"> </SPAN>return (char*)(ca_attr)
+ (ca_attr->size - </SPAN><st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">PTR</SPAN></st1:stockticker><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">_ALIGN(sizeof(uplink_info_t)));<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN
style="mso-spacerun: yes"> </SPAN>#endif<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p> </o:p></P><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Sean Hefty [mailto:sean.hefty@intel.com]
<BR><B>Sent:</B> Thursday, April 10, 2008 9:26 PM<BR><B>To:</B> Leonid Keller;
Fab Tillier; Reuven Amitai; ofw@lists.openfabrics.org<BR><B>Subject:</B> RE:
[ofw] RE: [PATCH] mthca patch [1/2]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Just committing is not
the right process to follow. This should not be committed until the issue
that Fab pointed out is addressed. The size is being rounded down, which
at least to me looks like the returned pointers are referencing the wrong
memory.<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>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">From what you say, this
fixes a print. Why is there a rush to commit a patch just for a
print?<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
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<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>Leonid
Keller<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, April
09, 2008 11:59 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Fab
Tillier; Reuven Amitai; ofw@lists.openfabrics.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [ofw] RE: [PATCH] mthca patch
[1/2]</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>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">Hi
Fab,</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">This patch fixes
printing of uplink information in VSTAT and i'm going to commit it now, because
it improves the current state.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">But really all the
implementation of vendor-specific information in query_ca is
bad.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">We need to define a
structure, describing all that info and to work with names, not calculated
offsets.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Arial color=blue size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: Arial">We'll put it on our
todo list.</SPAN></FONT><o:p></o:p></P></DIV>
<BLOCKQUOTE
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<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 style="MARGIN-BOTTOM: 12pt"><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>Fab
Tillier<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday,
April 09, 2008 7:44 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
Reuven Amitai; ofw@lists.openfabrics.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [ofw] RE: [PATCH] mthca patch
[1/2]</SPAN></FONT><o:p></o:p></P>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">Hi
Reuven,<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">What is the
problem with the alignment? The board ID is a character string, so
shouldn’t need any special alignment. Also, you are rounding the size
down – is that the right thing to do?<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">What is the layout
of the ca_attr buffer, and what are the alignment requirements for the
different structures appended to the end?<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">Is
MTHCA_BRD_ID_LEN going to cause the uplink info to be
aligned?<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Thanks,<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">-Fab<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN color:#1F497D? Calibri?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></SPAN>
<DIV>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal><B><SPAN Tahoma?,?sans-serif??><FONT face="Times New Roman"
size=3><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 12pt">From:</SPAN></SPAN></FONT></B><SPAN
Tahoma?,?sans-serif??> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B><SPAN
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Reuven Amitai<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, April 09, 2008 6:04
AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
ofw@lists.openfabrics.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [ofw] [PATCH] mthca patch
[1/2]<o:p></o:p></P></DIV></DIV></SPAN>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<P class=MsoNormal><SPAN color:blue? Arial?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">Hi,</SPAN><o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><SPAN color:blue? Arial?,?sans-serif?;><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">The following
patch align the returned address.</SPAN><o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><EM><SPAN color:blue? Arial?,?sans-serif?;><I><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">Thanks,
Reuven.</SPAN></SPAN></FONT></I></EM><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></DIV>
<DIV>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">Index:
inc/mthca/mthca_vc.h<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt">===================================================================<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">---
inc/mthca/mthca_vc.h (revision
1047)<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+++
inc/mthca/mthca_vc.h (working
copy)<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">@@ -78,12 +78,18
@@<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"> inline char*
mthca_get_board_id(ib_ca_attr_t *ca_attr)<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> {<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">- return
(char*)(ca_attr)+(ca_attr->size - MTHCA_BRD_ID_LEN -
sizeof(uplink_info_t));<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ int size =
(ca_attr->size - MTHCA_BRD_ID_LEN -
sizeof(uplink_info_t));<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ size &=
~(sizeof(void*) - 1);<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+
<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ return
(char*)(ca_attr)+ size;<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> }<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"> inline void*
mthca_get_uplink_info(ib_ca_attr_t
*ca_attr)<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> {<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">- return
(char*)(ca_attr)+(ca_attr->size -
sizeof(uplink_info_t));<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ int size =
(ca_attr->size -
sizeof(uplink_info_t));<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ size &=
~(sizeof(void*) - 1);<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt">+ return
(char*)(ca_attr)+ size;<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> }<o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></SPAN>
<P class=MsoNormal><SPAN New?? Courier><FONT face="Times New Roman"
size=3><SPAN
style="FONT-SIZE: 12pt"> #endif<o:p></o:p></SPAN></FONT></P></DIV></SPAN>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></DIV></DIV></BODY></HTML>