<!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></TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Fab</FONT>
</P>
<P><FONT SIZE=2>Attach simple patch that convert mtu value to the real size of the MTU</FONT>
</P>
<P><FONT SIZE=2>Pls apply</FONT>
</P>
<P><FONT SIZE=2>10x</FONT>
<BR><FONT SIZE=2>Yossi </FONT>
</P>
<P><FONT SIZE=2>Singe-off-by:Yossi Leybovich (sleybo@mellaqnox.co.il)</FONT>
<BR><FONT SIZE=2>Index: C:/sleybo/clean/tools/vstat/user/vstat_main.c</FONT>
<BR><FONT SIZE=2>===================================================================</FONT>
<BR><FONT SIZE=2>--- C:/sleybo/clean/tools/vstat/user/vstat_main.c (revision 432)</FONT>
<BR><FONT SIZE=2>+++ C:/sleybo/clean/tools/vstat/user/vstat_main.c (revision 433)</FONT>
<BR><FONT SIZE=2>@@ -106,13 +106,36 @@</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>+void printPortMTU(int mtu){ //TODO: check that these are all the options and that they are correct</FONT>
<BR><FONT SIZE=2>+ switch(mtu){</FONT>
<BR><FONT SIZE=2>+ case 1:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=256\n");</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ case 2:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=512\n");</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ case 3:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=1024\n");</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ case 4:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=2048\n");</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ case 5:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=4096\n");</FONT>
<BR><FONT SIZE=2>+ break;</FONT>
<BR><FONT SIZE=2>+ default:</FONT>
<BR><FONT SIZE=2>+ printf("\t\tmax_mtu=UNKNOWN\n"); </FONT>
<BR><FONT SIZE=2>+ }</FONT>
<BR><FONT SIZE=2>+}</FONT>
<BR><FONT SIZE=2>+</FONT>
<BR><FONT SIZE=2> void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){</FONT>
<BR><FONT SIZE=2> printf("\t\tport=%d\n", portPtr->port_num);</FONT>
<BR><FONT SIZE=2> printPortLinkState(portPtr->link_state);</FONT>
<BR><FONT SIZE=2> printf("\t\tsm_lid=0x%04x\n", cl_ntoh16(portPtr->sm_lid));</FONT>
<BR><FONT SIZE=2> printf("\t\tport_lid=0x%04x\n", cl_ntoh16(portPtr->lid));</FONT>
<BR><FONT SIZE=2> printf("\t\tport_lmc=0x%x\n", portPtr->lmc);</FONT>
<BR><FONT SIZE=2>- printf("\t\tmax_mtu=%d\n", portPtr->mtu);</FONT>
<BR><FONT SIZE=2>+ printPortMTU(portPtr->mtu);</FONT>
<BR><FONT SIZE=2> if(fullPrint){</FONT>
<BR><FONT SIZE=2> printf("\t\tmax_msg_sz=0x%x (Max message size)\n", portPtr->max_msg_size);</FONT>
<BR><FONT SIZE=2> printf("\t\tcapability_mask=TBD\n");</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>
</BODY>
</HTML>