<!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><!--[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: 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.EmailStyle17 {
COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal
}
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>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><SPAN class=972412218-26032008>> </SPAN>+
ib_status = pfn_uvp_ifc( &p_vca_intf->user_verbs );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><SPAN class=972412218-26032008>> </SPAN>+ if
(ib_status == IB_UNSUPPORTED)</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><o:p><SPAN class=972412218-26032008>You presume the only possible error
return code from pfn_uvp_ifc.</SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><o:p><SPAN class=972412218-26032008>It<SPAN
class=382172718-26032008>'</SPAN>s <SPAN class=382172718-26032008>in
</SPAN>general not good. Someone can <SPAN
class=382172718-26032008>eventually </SPAN>change pfn_uvp_ifc , adding a new
return code <SPAN class=382172718-26032008>and you will regard it as
success.</SPAN></SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><o:p><SPAN class=972412218-26032008>I'd suggest something like
that:</SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><o:p><SPAN class=972412218-26032008> if (ib_status <SPAN
class=382172718-26032008>!</SPAN>= IB_<SPAN
class=382172718-26032008>SUCCESS</SPAN>)<o:p></o:p></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> <SPAN
class=382172718-26032008> </SPAN>al_unload_uvp( h_lib
);<o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier><o:p><SPAN class=972412218-26032008><SPAN
class=382172718-26032008> </SPAN> if<SPAN
class=382172718-26032008> </SPAN> (ib_status =<SPAN
class=382172718-26032008>=</SPAN> IB_UNSUPPORTED)<o:p></o:p></P>
<P class=MsoNormal></SPAN></o:p></SPAN><SPAN
class=382172718-26032008> </SPAN>
AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_CA,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> <SPAN
class=382172718-26032008> </SPAN>
("Unsupported uvp interface version, expected = 0x%x\n",
UVERBS_VERSION));</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> return
ib_status;<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><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></o:p></SPAN></P></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, March 26, 2008 6:30 PM<BR><B>To:</B> Reuven
Amitai; ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] RE: [PATCH] Add
uverbs version<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: " color:#1F497D?
Calibri?,?sans-serif?;>That looks fine to me from a quick look at
it.<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?;>-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, March 26, 2008
9:27 AM<BR><B>To:</B> Fab Tillier;
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] RE: [PATCH] Add uverbs
version<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?;>I have reversed the uvp version setting. How about it now
?</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?;>Reuven.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <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: " New??
Courier>Index: core/al/user/ual_ca.c<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>--- core/al/user/ual_ca.c (revision
992)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+++ core/al/user/ual_ca.c (working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>@@ -64,6 +64,7 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
ual_get_uvp_name_ioctl_t
al_ioctl;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
uintn_t
bytes_ret;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
cl_status_t
cl_status;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+
ib_api_status_t
ib_status;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
void
*h_lib;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>
uvp_get_interface_t
pfn_uvp_ifc;<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>@@ -131,7 +132,17 @@<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> /* Query the vendor-supported user-mode
functions */<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>- pfn_uvp_ifc( &p_vca_intf->user_verbs
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ p_vca_intf->user_verbs.version =
UVERBS_VERSION;<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>+ ib_status = pfn_uvp_ifc(
&p_vca_intf->user_verbs );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ if (ib_status ==
IB_UNSUPPORTED)<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>+
al_unload_uvp( h_lib );<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+
AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_CA,<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+
("Unsupported uvp interface version, expected = 0x%x\n",
UVERBS_VERSION));<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ return
IB_UNSUPPORTED;<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> p_vca_intf->h_uvp_lib =
h_lib;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> AL_EXIT( AL_DBG_CA
);<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> return
IB_SUCCESS;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>Index: hw/mthca/user/mlnx_ual_main.c<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>--- hw/mthca/user/mlnx_ual_main.c (revision
992)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+++ hw/mthca/user/mlnx_ual_main.c (working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>@@ -143,7 +143,9 @@<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> * Version of the header file this
interface export can handle<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>- p_uvp->version = 0x101;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ if (p_uvp->version !=
UVERBS_VERSION)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ return
IB_UNSUPPORTED;<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> p_uvp->guid =
0x12345678;<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>Index: inc/user/iba/ib_uvp.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/user/iba/ib_uvp.h (revision
992)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+++ inc/user/iba/ib_uvp.h (working
copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>@@ -116,6 +116,17 @@<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> <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>+ * Version that identifies this version of the header file for
interface<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+ * definition.<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>+#define
UVERBS_MAJOR_VER
(0x0002)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+#define
UVERBS_MINOR_VER
(0x0000)<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>+#define
UVERBS_VERSION
(((UVERBS_MAJOR_VER) << 16) | (UVERBS_MINOR_VER))<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+#define MK_UVERBS_VERSION(maj,min) ((((maj) & 0xFFFF) <<
16) | \<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+
((min) & 0xFFFF))<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> <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>@@ -3469,6 +3480,8 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> * The
registration is successful.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> * IB_INSUFFICIENT_MEMORY<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> *
Insufficient memory to satisfy request<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+* IB_UNSUPPORTED<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier>+* The interface
version requested is not supported<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> * PORTABILITY<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: " New??
Courier> * User mode<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><o:p> </o:p></P></DIV>
<DIV>
<P class=MsoNormal><o:p> </o:p></P></DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>
<HR align=center width="100%" SIZE=2>
</DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: "
Tahoma?,?sans-serif??>From:</SPAN></B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: " Tahoma?,?sans-serif??> Fab Tillier
[mailto:ftillier@windows.microsoft.com] <BR><B>Sent:</B> Wednesday, March 26,
2008 9:42 AM<BR><B>To:</B> Reuven Amitai;
ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: [PATCH] Add uverbs
version</SPAN><o:p></o:p></P>
<P class=MsoNormal>Hi Reuven,<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>The version needs to be supplied as input to the UVP,
before it fills the interface structure. Imagine a call into a version 2
UVP with a version 1 interface that’s smaller than the V2 interface. The
UVP would fill it as if it was a V2 interface and overrun the
buffer.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Version should be set in the interface before calling
open_vendor_lib, and the UVP should check that it’s an interface that it
supports and fill in the appropriate one. This also allows the UVP to
support multiple interfaces.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Cheers,<o:p></o:p></P>
<P class=MsoNormal>-Fab<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></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>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Reuven
Amitai<BR><B>Sent:</B> Wednesday, March 26, 2008 12:39 AM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] [PATCH] Add uverbs
version<o:p></o:p></P></DIV></DIV>
<P class=MsoNormal><o:p> </o:p></P>
<DIV>
<P class=MsoNormal>Hi,<o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal>The patch adds version to uvp interface the same
way the kvp has ( inc\iba\ib_ci.h ).<o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal>It also adds checking for the returned version of the
uvp.<o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal>comments / suggestions are welcome.<o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal>Reuven.<o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal>Index: core/al/user/ual_ci_ca.c<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>--- core/al/user/ual_ci_ca.c (revision
992)<o:p></o:p></P>
<P class=MsoNormal>+++ core/al/user/ual_ci_ca.c (working
copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -162,6 +162,17 @@<o:p></o:p></P>
<P class=MsoNormal> add_ci_ca( p_ci_ca
);<o:p></o:p></P>
<P class=MsoNormal> open_vendor_lib( ca_guid,
&p_ci_ca->verbs );<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>+ /* Check vendor lib version
*/<o:p></o:p></P>
<P class=MsoNormal>+ if
(p_ci_ca->verbs.user_verbs.version != UVERBS_VERSION)<o:p></o:p></P>
<P class=MsoNormal>+ {<o:p></o:p></P>
<P
class=MsoNormal>+
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );<o:p></o:p></P>
<P
class=MsoNormal>+
AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,<o:p></o:p></P>
<P
class=MsoNormal>+
("Unsupported uvp interface version, "<o:p></o:p></P>
<P
class=MsoNormal>+
"expected = 0x%x, actual = 0x%x.\n",<o:p></o:p></P>
<P
class=MsoNormal>+
UVERBS_VERSION, p_ci_ca->verbs.user_verbs.version) );<o:p></o:p></P>
<P
class=MsoNormal>+
return IB_UNSUPPORTED;<o:p></o:p></P>
<P class=MsoNormal>+ }<o:p></o:p></P>
<P class=MsoNormal>+ <o:p></o:p></P>
<P class=MsoNormal> /* Now open the UAL CA to be
assigned to p_ci_ca */<o:p></o:p></P>
<P class=MsoNormal> status = ib_open_ca( h_al,
ca_guid, ca_event_cb, p_ci_ca,<o:p></o:p></P>
<P
class=MsoNormal>
&p_ci_ca->h_ca );<o:p></o:p></P>
<P class=MsoNormal>Index: hw/mthca/user/mlnx_ual_main.c<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>--- hw/mthca/user/mlnx_ual_main.c (revision
992)<o:p></o:p></P>
<P class=MsoNormal>+++ hw/mthca/user/mlnx_ual_main.c (working
copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -143,7 +143,7 @@<o:p></o:p></P>
<P class=MsoNormal> /*<o:p></o:p></P>
<P class=MsoNormal> * Version of the header file
this interface export can handle<o:p></o:p></P>
<P class=MsoNormal> */<o:p></o:p></P>
<P class=MsoNormal>- p_uvp->version =
0x101;<o:p></o:p></P>
<P class=MsoNormal>+ p_uvp->version =
UVERBS_VERSION;<o:p></o:p></P>
<P class=MsoNormal> p_uvp->guid =
0x12345678;<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal> /*<o:p></o:p></P>
<P class=MsoNormal>Index: inc/user/iba/ib_uvp.h<o:p></o:p></P>
<P
class=MsoNormal>===================================================================<o:p></o:p></P>
<P class=MsoNormal>--- inc/user/iba/ib_uvp.h (revision
992)<o:p></o:p></P>
<P class=MsoNormal>+++ inc/user/iba/ib_uvp.h (working
copy)<o:p></o:p></P>
<P class=MsoNormal>@@ -116,6 +116,17 @@<o:p></o:p></P>
<P class=MsoNormal> *<o:p></o:p></P>
<P class=MsoNormal> */<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>+/*<o:p></o:p></P>
<P class=MsoNormal>+ * Version that identifies this version of the header file
for interface<o:p></o:p></P>
<P class=MsoNormal>+ * definition.<o:p></o:p></P>
<P class=MsoNormal>+ */<o:p></o:p></P>
<P class=MsoNormal>+#define
UVERBS_MAJOR_VER
(0x0002)<o:p></o:p></P>
<P class=MsoNormal>+#define
UVERBS_MINOR_VER
(0x0000)<o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P class=MsoNormal>+#define
UVERBS_VERSION
(((UVERBS_MAJOR_VER) << 16) | (UVERBS_MINOR_VER))<o:p></o:p></P>
<P class=MsoNormal>+#define MK_UVERBS_VERSION(maj,min) ((((maj) & 0xFFFF)
<< 16) | \<o:p></o:p></P>
<P
class=MsoNormal>+
((min) & 0xFFFF))<o:p></o:p></P>
<P class=MsoNormal>+<o:p></o:p></P>
<P class=MsoNormal> /******/<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal> /******/<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P></DIV></DIV></BLOCKQUOTE></BODY></HTML>