<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:ex12m =
"http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:ex12t =
"http://schemas.microsoft.com/exchange/services/2006/types" xmlns:mrels =
"http://schemas.openxmlformats.org/package/2006/relationships" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml" xmlns:mver =
"http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wf =
"http://schemas.microsoft.com/sharepoint/soap/workflow/" 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>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>@font-face {
font-family: Cambria Math;
}
@font-face {
font-family: Calibri;
}
@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle18 {
COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
FONT-SIZE: 10pt; mso-style-type: export-only
}
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.3243" name=GENERATOR></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=304585406-10042008><FONT face=Arial color=#0000ff size=2>Hi
Fab,</FONT></SPAN></DIV>
<DIV><SPAN class=304585406-10042008><FONT face=Arial color=#0000ff size=2>This
patch fixes printing of uplink information in VSTAT and i'm going to commit it
now, because it improves the current state.</FONT></SPAN></DIV>
<DIV><SPAN class=304585406-10042008><FONT face=Arial color=#0000ff size=2>But
really all the implementation of vendor-specific information in query_ca is
bad.</FONT></SPAN></DIV>
<DIV><SPAN class=304585406-10042008><FONT face=Arial color=#0000ff size=2>We
need to define a structure, describing all that info and to work with
names, not calculated offsets.</FONT></SPAN></DIV>
<DIV><SPAN class=304585406-10042008><FONT face=Arial color=#0000ff size=2>We'll
put it on our todo list.</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> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Fab
Tillier<BR><B>Sent:</B> Wednesday, April 09, 2008 7:44 PM<BR><B>To:</B> Reuven
Amitai; ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] RE: [PATCH] mthca
patch [1/2]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>Hi Reuven,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>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></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>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></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>Is MTHCA_BRD_ID_LEN going to cause the uplink info to
be aligned?<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>Thanks,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>-Fab<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;><o:p> </o:p></SPAN></P>
<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 style="FONT-SIZE: 10pt; FONT-FAMILY: "
Tahoma?,?sans-serif??>From:</SPAN></B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: " Tahoma?,?sans-serif??>
ofw-bounces@lists.openfabrics.org [mailto:ofw-bounces@lists.openfabrics.org]
<B>On Behalf Of </B>Reuven Amitai<BR><B>Sent:</B> Wednesday, April 09, 2008
6:04 AM<BR><B>To:</B> ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw]
[PATCH] mthca patch [1/2]<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " color:blue?
Arial?,?sans-serif?;>Hi,</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " color:blue?
Arial?,?sans-serif?;>The following patch align the returned
address.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<P class=MsoNormal><EM><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: "
color:blue? Arial?,?sans-serif?;>Thanks, Reuven.</SPAN></EM><o:p></o:p></P>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>Index: inc/mthca/mthca_vc.h<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>--- inc/mthca/mthca_vc.h (revision
1047)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+++ inc/mthca/mthca_vc.h (working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>@@ -78,12 +78,18 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> inline char* mthca_get_board_id(ib_ca_attr_t
*ca_attr)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>- return (char*)(ca_attr)+(ca_attr->size -
MTHCA_BRD_ID_LEN - sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ int size = (ca_attr->size -
MTHCA_BRD_ID_LEN - sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ size &= ~(sizeof(void*) -
1);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ return (char*)(ca_attr)+
size;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> }<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> inline void* mthca_get_uplink_info(ib_ca_attr_t
*ca_attr)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> {<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>- return (char*)(ca_attr)+(ca_attr->size -
sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ int size = (ca_attr->size -
sizeof(uplink_info_t));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ size &= ~(sizeof(void*) -
1);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ return (char*)(ca_attr)+
size;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> }<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> #endif<o:p></o:p></SPAN></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV></DIV></BLOCKQUOTE></BODY></HTML>