[Openib-windows] (no subject)

Yossi Leybovich sleybo at mellanox.co.il
Wed Sep 21 02:58:14 PDT 2005


Fab

Attach simple patch that convert mtu value to the real size of the MTU

Pls apply

10x
Yossi 

Singe-off-by:Yossi Leybovich (sleybo at mellaqnox.co.il)
Index: C:/sleybo/clean/tools/vstat/user/vstat_main.c
===================================================================
--- C:/sleybo/clean/tools/vstat/user/vstat_main.c	(revision 432)
+++ C:/sleybo/clean/tools/vstat/user/vstat_main.c	(revision 433)
@@ -106,13 +106,36 @@
 }
 
 
+
+void printPortMTU(int mtu){ //TODO: check that these are all the options
and that they are correct
+	switch(mtu){
+		case 1:
+			printf("\t\tmax_mtu=256\n");
+			break;
+		case 2:
+			printf("\t\tmax_mtu=512\n");
+			break;
+		case 3:
+			printf("\t\tmax_mtu=1024\n");
+			break;
+		case 4:
+			printf("\t\tmax_mtu=2048\n");
+			break;
+		case 5:
+			printf("\t\tmax_mtu=4096\n");
+			break;
+		default:
+			printf("\t\tmax_mtu=UNKNOWN\n"); 
+	}
+}
+
 void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){
 	printf("\t\tport=%d\n", portPtr->port_num);
 	printPortLinkState(portPtr->link_state);
 	printf("\t\tsm_lid=0x%04x\n", cl_ntoh16(portPtr->sm_lid));
 	printf("\t\tport_lid=0x%04x\n", cl_ntoh16(portPtr->lid));
 	printf("\t\tport_lmc=0x%x\n", portPtr->lmc);
-	printf("\t\tmax_mtu=%d\n", portPtr->mtu);
+	printPortMTU(portPtr->mtu);
 	if(fullPrint){
 		printf("\t\tmax_msg_sz=0x%x	(Max message size)\n",
portPtr->max_msg_size);
 		printf("\t\tcapability_mask=TBD\n");

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050921/de54b337/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vstat_mtu.patch
Type: application/octet-stream
Size: 1265 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050921/de54b337/attachment.obj>


More information about the ofw mailing list