<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>[PATCH] wr_type</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Fab</FONT>
</P>
<P><FONT SIZE=2>Attached patch of one of our verification team eng.</FONT>
<BR><FONT SIZE=2>this patch enable to convert wr_type enum to string</FONT>
<BR><FONT SIZE=2>Its also include bug fix of the async_event enum to string function and typo in ib_type.h </FONT>
</P>
<P><FONT SIZE=2>pls apply</FONT>
</P>
<P><FONT SIZE=2>10x</FONT>
<BR><FONT SIZE=2>Yossi </FONT>
</P>
<BR>
<P><FONT SIZE=2>Singed-off-by:Yossi Leybovich (sleybo@mellanox.co.il)</FONT>
</P>
<P><FONT SIZE=2>Index: core/al/ib_statustext.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- core/al/ib_statustext.c (revision 357)</FONT>
<BR><FONT SIZE=2>+++ core/al/ib_statustext.c (working copy)</FONT>
<BR><FONT SIZE=2>@@ -114,6 +114,7 @@</FONT>
<BR><FONT SIZE=2> /* ib_async_event_t values above converted to text for easier printing. */</FONT>
<BR><FONT SIZE=2> const char* ib_async_event_str[] =</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR><FONT SIZE=2>+ "IB_AE_DUMMY", /*place holder*/</FONT>
<BR><FONT SIZE=2> "IB_AE_SQ_ERROR",</FONT>
<BR><FONT SIZE=2> "IB_AE_SQ_DRAINED",</FONT>
<BR><FONT SIZE=2> "IB_AE_RQ_ERROR",</FONT>
<BR><FONT SIZE=2>@@ -202,3 +203,26 @@</FONT>
<BR><FONT SIZE=2> wc_type = IB_WC_UNKNOWN;</FONT>
<BR><FONT SIZE=2> return( ib_wc_type_str[wc_type] );</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+static const char* const __ib_wr_type_str[] =</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ "WR_SEND",</FONT>
<BR><FONT SIZE=2>+ "WR_RDMA_WRITE",</FONT>
<BR><FONT SIZE=2>+ "WR_RDMA_READ",</FONT>
<BR><FONT SIZE=2>+ "WR_COMPARE_SWAP",</FONT>
<BR><FONT SIZE=2>+ "WR_FETCH_ADD",</FONT>
<BR><FONT SIZE=2>+ "WR_UNKNOWN"</FONT>
<BR><FONT SIZE=2>+};</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+const char* </FONT>
<BR><FONT SIZE=2>+ib_get_wr_type_str(</FONT>
<BR><FONT SIZE=2>+ IN uint8_t wr_type )</FONT>
<BR><FONT SIZE=2>+{</FONT>
<BR><FONT SIZE=2>+ if( wr_type > WR_UNKNOWN )</FONT>
<BR><FONT SIZE=2>+ wr_type = WR_UNKNOWN;</FONT>
<BR><FONT SIZE=2>+ return( __ib_wr_type_str[wr_type] );</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>Index: inc/iba/ib_types.h</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- inc/iba/ib_types.h (revision 357)</FONT>
<BR><FONT SIZE=2>+++ inc/iba/ib_types.h (working copy)</FONT>
<BR><FONT SIZE=2>@@ -1665,7 +1665,7 @@</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2> /*</FONT>
<BR><FONT SIZE=2> * PARAMETERS</FONT>
<BR><FONT SIZE=2>-* node_type</FONT>
<BR><FONT SIZE=2>+* port_state</FONT>
<BR><FONT SIZE=2> * [in] Encoded port state as returned in the PortInfo attribute.</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> * RETURN VALUES</FONT>
<BR><FONT SIZE=2>@@ -8292,12 +8292,41 @@</FONT>
<BR><FONT SIZE=2> WR_RDMA_WRITE,</FONT>
<BR><FONT SIZE=2> WR_RDMA_READ,</FONT>
<BR><FONT SIZE=2> WR_COMPARE_SWAP,</FONT>
<BR><FONT SIZE=2>- WR_FETCH_ADD</FONT>
<BR><FONT SIZE=2>+ WR_FETCH_ADD,</FONT>
<BR><FONT SIZE=2>+ WR_UNKNOWN</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> } ib_wr_type_t;</FONT>
<BR><FONT SIZE=2> /*****/</FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2> </FONT>
<BR><FONT SIZE=2>+/****f* IBA Base: Types/ib_get_wr_type_str</FONT>
<BR><FONT SIZE=2>+* NAME</FONT>
<BR><FONT SIZE=2>+* ib_get_wr_type_str</FONT>
<BR><FONT SIZE=2>+*</FONT>
<BR><FONT SIZE=2>+* DESCRIPTION</FONT>
<BR><FONT SIZE=2>+* Returns a string for the specified work request type</FONT>
<BR><FONT SIZE=2>+*</FONT>
<BR><FONT SIZE=2>+* SYNOPSIS</FONT>
<BR><FONT SIZE=2>+*/</FONT>
<BR><FONT SIZE=2>+AL_EXPORT const char* AL_API</FONT>
<BR><FONT SIZE=2>+ib_get_wr_type_str(</FONT>
<BR><FONT SIZE=2>+ IN uint8_t wr_type );</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+/*</FONT>
<BR><FONT SIZE=2>+* PARAMETERS</FONT>
<BR><FONT SIZE=2>+* wr_type</FONT>
<BR><FONT SIZE=2>+* [in] Encoded work request type as defined in the</FONT>
<BR><FONT SIZE=2>+work request attribute.</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2>+* RETURN VALUES</FONT>
<BR><FONT SIZE=2>+* Pointer to the work request type string.</FONT>
<BR><FONT SIZE=2>+*</FONT>
<BR><FONT SIZE=2>+* NOTES</FONT>
<BR><FONT SIZE=2>+*</FONT>
<BR><FONT SIZE=2>+* SEE ALSO</FONT>
<BR><FONT SIZE=2>+* ib_wr_type_t</FONT>
<BR><FONT SIZE=2>+*********/</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2> /****s* Access Layer/ib_local_ds_t</FONT>
<BR><FONT SIZE=2> * NAME</FONT>
<BR><FONT SIZE=2> * ib_local_ds_t</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>
</BODY>
</HTML>