ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}\r
Provider=%SST%\r
CatalogFile=ibbus.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
\r
\r
; ================= Device Install section =====================\r
ClassGUID=%HcaClassGuid%\r
Provider=%SST%\r
CatalogFile=infiniserv.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
\r
; ================= Destination directory section =====================\r
\r
{\r
/* CL_ASSERT that a non-null pointer is provided. */\r
CL_ASSERT( p_list_item );\r
- /* CL_ASSERT that the list was initialized. */\r
- CL_ASSERT( p_list_item->p_list );\r
- CL_ASSERT( p_list_item->p_list->state == CL_INITIALIZED );\r
\r
/* Return the next item. */\r
return( p_list_item->p_next );\r
{\r
/* CL_ASSERT that a non-null pointer is provided. */\r
CL_ASSERT( p_list_item );\r
- /* CL_ASSERT that the list was initialized. */\r
- CL_ASSERT( p_list_item->p_list->state == CL_INITIALIZED );\r
\r
/* Return the previous item. */\r
return( p_list_item->p_prev );\r
#include <complib/cl_packoff.h>\r
/************/\r
\r
-/****s* IBA Base: Types/ib_grh_t\r
-* NAME\r
-* ib_grh_t\r
-*\r
-* DESCRIPTION\r
-* Global route header information received with unreliable datagram messages\r
-*\r
-* SYNOPSIS\r
-*/\r
+/*\r
+ * Global route header information received with unreliable datagram messages\r
+ */\r
#include <complib/cl_packon.h>\r
typedef struct _ib_grh\r
{\r
\r
} PACK_SUFFIX ib_grh_t;\r
#include <complib/cl_packoff.h>\r
-/************/\r
\r
/****f* IBA Base: Types/ib_grh_get_ver_class_flow\r
* NAME\r
#endif\r
\r
#ifndef VER_FILEBUILD\r
-#define VER_FILEBUILD 32\r
+#define VER_FILEBUILD 36\r
#endif\r
\r
#ifndef VER_FILEREV\r
ClassGUID=%HcaClassGuid%\r
Provider=%Vendor%\r
CatalogFile=infiniserv.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
\r
; ================= Destination directory section =====================\r
\r
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
ib_status = al_test_create_mem_window();\r
break;\r
case RegisterSharedMemRegion:\r
- ib_status = al_test_register_shared_mem();\r
+ CL_PRINT( ALTS_DBG_VERBOSE, alts_dbg_lvl,\r
+ ("altsapp: RegisterSharedMemRegion not implemented.\n") );\r
+ ib_status = IB_SUCCESS;\r
break;\r
case MultiSend:\r
ib_status = al_test_multi_send_recv();\r
DIRS=\\r
alts \\r
cmtest \\r
- wsd\r
+ srp \\r
+ wsd \\r
+ limits\r
-DIRS=\
- user
+DIRS=\\r
+ user\r
-#
-# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
-# file to this component. This file merely indirects to the real make file
-# that is shared by all the driver components of the Windows NT DDK
-#
-
-!INCLUDE $(NTMAKEENV)\makefile.def
+#\r
+# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source\r
+# file to this component. This file merely indirects to the real make file\r
+# that is shared by all the driver components of the Windows NT DDK\r
+#\r
+\r
+!INCLUDE $(NTMAKEENV)\makefile.def\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
+ * 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
}\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
- printPortMTU(portPtr->mtu);\r
+ printf("\t\tmax_mtu=%d\n", 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
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}\r
Provider = %SST%\r
CatalogFile = netipoib.cat\r
-DriverVer=05/10/2005,3.0.0031.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
\r
[Manufacturer]\r
%SST% = SST,ntx86,ntamd64,ntia64\r
DIRS=\\r
+ user \\r
kernel\r
ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}\r
Provider=%SST%\r
CatalogFile=ibsrp.cat\r
-DriverVer=06/20/2005,3.0.0033.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
\r
\r
; ================= Device Install section =====================\r
break;\r
\r
case IBSP_CONNECT:\r
- // TODO\r
+ ibsp_conn_remove( socket_info );\r
break;\r
\r
case IBSP_ACCEPT:\r
- // TODO\r
+ ibsp_conn_remove( socket_info );\r
break;\r
\r
case IBSP_LISTEN:\r
case IBSP_CONNECTED:\r
{\r
struct disconnect_reason reason;\r
+\r
+ /* We changed the state - remove from connection map. */\r
+ ibsp_conn_remove( socket_info );\r
+\r
memset( &reason, 0, sizeof(reason) );\r
reason.type = DISC_SHUTDOWN;\r
ib_disconnect( socket_info, &reason );\r
p_ip1 = (struct ibsp_ip_addr*)p_key1;\r
p_ip2 = (struct ibsp_ip_addr*)p_key2;\r
\r
- if( p_ip1->ip_addr.S_un.S_addr != p_ip2->ip_addr.S_un.S_addr )\r
- return p_ip1->ip_addr.S_un.S_addr - p_ip2->ip_addr.S_un.S_addr;\r
+ if( p_ip1->ip_addr.S_un.S_addr < p_ip2->ip_addr.S_un.S_addr )\r
+ return -1;\r
+ else if( p_ip1->ip_addr.S_un.S_addr > p_ip2->ip_addr.S_un.S_addr )\r
+ return 1;\r
\r
- /* IP addresses differ. See if we need a port match too. */\r
+ /* IP addresses match. See if we need a port match too. */\r
if( !p_ip1->p_port || !p_ip2->p_port )\r
return 0;\r
\r
/* We need a port match too. */\r
- return ((intn_t)p_ip1->p_port) - ((intn_t)p_ip2->p_port);\r
+ return cl_memcmp(\r
+ &p_ip1->p_port->guid, &p_ip2->p_port->guid, sizeof(net64_t) );\r
}\r
\r
\r
struct ip_query_context *query_context =\r
(struct ip_query_context * __ptr64)p_query_rec->query_context;\r
cl_fmap_item_t *p_item;\r
- ib_api_status_t status;\r
\r
CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
CL_TRACE( IBSP_DBG_HW, gdbg_lvl,\r
\r
ip_addr =\r
HeapAlloc( g_ibsp.heap, HEAP_ZERO_MEMORY, sizeof(struct ibsp_ip_addr) );\r
- if( ip_addr == NULL )\r
+ if( !ip_addr )\r
{\r
CL_EXIT_ERROR( IBSP_DBG_HW, gdbg_lvl, ("no memory\n") );\r
break;\r
}\r
\r
if( p_query_rec->p_result_mad )\r
- {\r
- status = ib_put_mad( p_query_rec->p_result_mad );\r
- if( status != IB_SUCCESS )\r
- {\r
- CL_ERROR( IBSP_DBG_HW, gdbg_lvl,\r
- ("ib_put_mad failed (%d)\n", status) );\r
- }\r
- }\r
+ ib_put_mad( p_query_rec->p_result_mad );\r
\r
CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
}\r
user_query.p_attr = &service_record;\r
\r
memset( &service_record, 0, sizeof(service_record) );\r
- service_record.service_pkey = cl_hton16( IB_DEFAULT_PKEY );\r
+ service_record.service_pkey = IB_DEFAULT_PKEY;\r
ib_gid_set_default( &service_record.service_gid, p_port->guid );\r
service_record.service_lease = 0xFFFFFFFF;\r
strcpy( (void *)service_record.service_name, ATS_NAME );\r
struct query_guid_context *query_context =\r
(struct query_guid_context * __ptr64)p_query_rec->query_context;\r
ib_service_record_t *service_record;\r
- ib_api_status_t status;\r
\r
CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
CL_TRACE( IBSP_DBG_HW, gdbg_lvl,\r
("status is %d, count is %d\n", p_query_rec->status,\r
p_query_rec->result_cnt) );\r
\r
- query_context->status = p_query_rec->status;\r
-\r
- if( p_query_rec->status == IB_SUCCESS )\r
+ if( p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )\r
{\r
- //CL_ASSERT(p_query_rec->result_cnt == 1);\r
+ query_context->status = IB_SUCCESS;\r
\r
service_record = ib_get_query_svc_rec( p_query_rec->p_result_mad, 0 );\r
\r
CL_ASSERT( service_record != NULL );\r
\r
- /* Copy the GUID */\r
query_context->guid = ib_gid_get_guid( &service_record->service_gid );\r
}\r
-\r
- if( p_query_rec->status == IB_SUCCESS || p_query_rec->status == IB_REMOTE_ERROR )\r
+ else\r
{\r
- status = ib_put_mad( p_query_rec->p_result_mad );\r
- if( status != IB_SUCCESS )\r
- {\r
- CL_ERROR( IBSP_DBG_HW, gdbg_lvl, ("ib_put_mad failed (%d)\n", status) );\r
- }\r
+ query_context->status = IB_ERROR;\r
}\r
\r
+ if( p_query_rec->p_result_mad )\r
+ ib_put_mad( p_query_rec->p_result_mad );\r
+\r
CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
}\r
\r
+\r
/* Synchronously query the SA for a GUID. Return 0 on success. */\r
int\r
query_guid_address(\r
CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
CL_TRACE( IBSP_DBG_HW, gdbg_lvl, ("status is %d\n", p_query_rec->status) );\r
\r
- query_context->status = p_query_rec->status;\r
-\r
- if( p_query_rec->status == IB_SUCCESS )\r
+ if( p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )\r
{\r
ib_path_rec_t *path_rec;\r
\r
+ query_context->status = IB_SUCCESS;\r
+\r
path_rec = ib_get_query_path_rec( p_query_rec->p_result_mad, 0 );\r
\r
CL_ASSERT( path_rec );\r
/* Copy the path record */\r
*query_context->path_rec = *path_rec;\r
}\r
-\r
- if( p_query_rec->status == IB_SUCCESS || p_query_rec->status == IB_REMOTE_ERROR )\r
+ else\r
{\r
- status = ib_put_mad( p_query_rec->p_result_mad );\r
- if( status != IB_SUCCESS )\r
- {\r
- CL_ERROR( IBSP_DBG_HW, gdbg_lvl, ("ib_put_mad failed (%d)\n", status) );\r
- }\r
+ query_context->status = IB_ERROR;\r
}\r
\r
+ if( p_query_rec->p_result_mad )\r
+ status = ib_put_mad( p_query_rec->p_result_mad );\r
+\r
CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
}\r
\r
cl_spinlock_acquire( &hca->port_lock );\r
while( cl_qlist_count( &hca->port_list ) )\r
{\r
- p_item = cl_qlist_head( &hca->port_list );\r
- /* pnp_port_remove removes the port from the HCA's ports list. */\r
- pnp_port_remove( PARENT_STRUCT(p_item, struct ibsp_port, item) );\r
+ p_item = cl_qlist_remove_head( &hca->port_list );\r
+\r
+ HeapFree( g_ibsp.heap, 0,\r
+ PARENT_STRUCT(p_item, struct ibsp_port, item) );\r
}\r
cl_spinlock_release( &hca->port_lock );\r
\r
port->guid = p_port_rec->p_port_attr->port_guid;\r
port->port_num = p_port_rec->p_port_attr->port_num;\r
port->hca = hca;\r
- cl_spinlock_init( &port->mutex );\r
\r
cl_spinlock_acquire( &hca->port_lock );\r
cl_qlist_insert_tail( &hca->port_list, &port->item );\r
cl_qlist_remove_item( &port->hca->port_list, &port->item );\r
cl_spinlock_release( &port->hca->port_lock );\r
\r
- cl_spinlock_destroy( &port->mutex );\r
-\r
- /* Free it */\r
HeapFree( g_ibsp.heap, 0, port );\r
\r
done:\r
struct ibsp_port\r
{\r
cl_list_item_t item;\r
- cl_spinlock_t mutex;\r
\r
struct ibsp_hca *hca; /* HCA to which this port belong. */\r
\r