break;\r
}\r
\r
+ if(alts_mr_attr.lkey != lkey || alts_mr_attr.rkey != rkey)\r
+ {\r
+ \r
+ ALTS_PRINT( ALTS_DBG_ERROR,\r
+ ("ib_query_mr failed lkey rkey different from reg\n"));\r
+ ALTS_PRINT( ALTS_DBG_ERROR,\r
+ ("\t\t reg-lkey = %x query-lkey %x reg-rkey%x query-rkey%x\n" ,\r
+ alts_mr_attr.lkey , lkey , alts_mr_attr.rkey , rkey));\r
+ alts_close_ca(h_ca);\r
+ ib_status = IB_INVALID_LKEY;\r
+ break;\r
+ \r
+ }\r
+\r
+ ALTS_PRINT( ALTS_DBG_ERROR,\r
+ ("ib_query_mr passed\n"\r
+ "\t\t lkey = %x rkey%x query-rkey%x\n" ,\r
+ lkey, rkey));\r
/*\r
* Re-register the memeory region\r
*/\r
{\r
ALTS_PRINT( ALTS_DBG_ERROR,\r
("ib_rereg_mem failed status = %s\n", ib_get_err_str(ib_status)) );\r
+ alts_close_ca(h_ca);\r
+ break;\r
}\r
\r
ALTS_PRINT( ALTS_DBG_ERROR,\r
-/*\r
- * Copyright (c) 2005 Mellanox Technologies. All rights reserved.\r
- *\r
- * This software is available to you under the OpenIB.org BSD license\r
- * below:\r
- *\r
- * Redistribution and use in source and binary forms, with or\r
- * without modification, are permitted provided that the following\r
- * conditions are met:\r
- *\r
- * - Redistributions of source code must retain the above\r
- * copyright notice, this list of conditions and the following\r
- * disclaimer.\r
- *\r
- * - Redistributions in binary form must reproduce the above\r
- * copyright notice, this list of conditions and the following\r
- * disclaimer in the documentation and/or other materials\r
- * provided with the distribution.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
- * SOFTWARE.\r
- *\r
- * $Id$\r
- */\r
-\r
-\r
-#include <ics_ver.h>\r
-\r
-#define VER_FILETYPE VFT_APP\r
-#define VER_FILESUBTYPE VFT2_UNKNOWN\r
-\r
-#ifdef _DEBUG_\r
-#define VER_FILEDESCRIPTION_STR "HCA Status Report Application (Debug)"\r
-#else\r
-#define VER_FILEDESCRIPTION_STR "HCA Status Report Application"\r
-#endif\r
-\r
-#define VER_INTERNALNAME_STR "vstat.exe"\r
-#define VER_ORIGINALFILENAME_STR "vstat.exe"\r
-\r
-#include <common.ver>\r
+/*
+ * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
+ *
+ * This software is available to you under the OpenIB.org BSD license
+ * below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
+
+
+#include <ics_ver.h>
+
+#define VER_FILETYPE VFT_APP
+#define VER_FILESUBTYPE VFT2_UNKNOWN
+
+#ifdef _DEBUG_
+#define VER_FILEDESCRIPTION_STR "HCA Status Report Application (Debug)"
+#else
+#define VER_FILEDESCRIPTION_STR "HCA Status Report Application"
+#endif
+
+#define VER_INTERNALNAME_STR "vstat.exe"
+#define VER_ORIGINALFILENAME_STR "vstat.exe"
+
+#include <common.ver>
}\r
\r
\r
+\r
+void printPortMTU(int mtu){ //TODO: check that these are all the options and that they are correct\r
+ switch(mtu){\r
+ case 1:\r
+ printf("\t\tmax_mtu=256\n");\r
+ break;\r
+ case 2:\r
+ printf("\t\tmax_mtu=512\n");\r
+ break;\r
+ case 3:\r
+ printf("\t\tmax_mtu=1024\n");\r
+ break;\r
+ case 4:\r
+ printf("\t\tmax_mtu=2048\n");\r
+ break;\r
+ case 5:\r
+ printf("\t\tmax_mtu=4096\n");\r
+ break;\r
+ default:\r
+ printf("\t\tmax_mtu=UNKNOWN\n"); \r
+ }\r
+}\r
+\r
void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){\r
printf("\t\tport=%d\n", portPtr->port_num);\r
printPortLinkState(portPtr->link_state);\r
printf("\t\tsm_lid=0x%04x\n", cl_ntoh16(portPtr->sm_lid));\r
printf("\t\tport_lid=0x%04x\n", cl_ntoh16(portPtr->lid));\r
printf("\t\tport_lmc=0x%x\n", portPtr->lmc);\r
- printf("\t\tmax_mtu=%d\n", portPtr->mtu);\r
+ printPortMTU(portPtr->mtu);\r
if(fullPrint){\r
printf("\t\tmax_msg_sz=0x%x (Max message size)\n", portPtr->max_msg_size);\r
printf("\t\tcapability_mask=TBD\n");\r