[Openib-windows] [PATCH] reregister\cl_vecto\reg_svc
Yossi Leybovich
sleybo at mellanox.co.il
Wed Sep 14 07:23:15 PDT 2005
FAb
Attach patch the include the follow:
1. few cosmetics fixes (AL_ENTER etc....)
2. bug in cl_vectoe_get function -
/* Get a pointer to the element. */
p_src = cl_vector_get_ptr( p_vector, index );
- p_vector->pfn_copy( p_src, p_element, p_vector->element_size );
+ p_vector->pfn_copy( p_element, p_src, p_vector->element_size );
3. bug in reg_svc - I think that the user_context was not set with the right
value .
I did this(core/al/al_reg_svc.c line 305):
"
/* Copy the service registration information. */
- h_sa_reg->sa_req.user_context = h_sa_reg;
+ h_sa_reg->sa_req.user_context = p_reg_svc_req->svc_context;
"
I also notice that in IpoIB when you issue reg_svc request AL doesn't take
reference to the adapter so I add this (ref and deref if fail )
4. I remove the CLIENT REREGISTER from the PnP and use the SM_CHANGE event
5. Low level driver support in client reregister
Pls review and apply
10x
Yossi
Singed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)
Index: core/al/al_ci_ca_shared.c
===================================================================
--- core/al/al_ci_ca_shared.c (revision 367)
+++ core/al/al_ci_ca_shared.c (working copy)
@@ -371,6 +371,7 @@
{
ib_ca_handle_t h_ca;
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_event_rec );
h_ca = p_event_rec->handle.h_ca;
@@ -379,6 +380,8 @@
if( h_ca->pfn_event_cb )
h_ca->pfn_event_cb( p_event_rec );
+
+ AL_EXIT(AL_DBG_CA);
}
Index: core/al/al_reg_svc.c
===================================================================
--- core/al/al_reg_svc.c (revision 367)
+++ core/al/al_reg_svc.c (working copy)
@@ -305,7 +305,7 @@
h_sa_reg->port_guid = p_reg_svc_req->port_guid;
/* Copy the service registration information. */
- h_sa_reg->sa_req.user_context = h_sa_reg;
+ h_sa_reg->sa_req.user_context = p_reg_svc_req->svc_context;
h_sa_reg->pfn_reg_svc_cb = p_reg_svc_req->pfn_reg_svc_cb;
h_sa_reg->svc_rec = p_reg_svc_req->svc_rec;
Index: core/al/kernel/al_pnp.c
===================================================================
--- core/al/kernel/al_pnp.c (revision 367)
+++ core/al/kernel/al_pnp.c (working copy)
@@ -1465,7 +1465,7 @@
ib_ca_attr_t *p_old_ca_attr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER( AL_DBG_PNP);
UNUSED_PARAM( p_item );
CL_ASSERT( gp_pnp );
@@ -1510,7 +1510,7 @@
deref_al_obj( &gp_pnp->obj );
gp_pnp->async_item_is_busy = FALSE;
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT( AL_DBG_PNP);
}
Index: core/al/kernel/al_smi.c
===================================================================
--- core/al/kernel/al_smi.c (revision 367)
+++ core/al/kernel/al_smi.c (working copy)
@@ -1812,6 +1812,13 @@
{
p_spl_qp_svc->base_lid =
p_port_info->base_lid;
p_spl_qp_svc->lmc = ib_port_info_get_lmc(
p_port_info );
+ if (p_port_info->subnet_timeout & 0x80)
+ {
+ AL_TRACE(AL_DBG_PNP,(" setting the
sm_lid to 0 client reregister event \n"));
+
ci_ca_lock_attr(p_spl_qp_svc->obj.p_ci_ca);
+
p_spl_qp_svc->obj.p_ci_ca->p_pnp_attr->p_port_attr->sm_lid= 0;
+
ci_ca_unlock_attr(p_spl_qp_svc->obj.p_ci_ca);
+ }
}
}
}
Index: hw/mt23108/kernel/hca_data.c
===================================================================
--- hw/mt23108/kernel/hca_data.c (revision 367)
+++ hw/mt23108/kernel/hca_data.c (working copy)
@@ -693,6 +693,10 @@
if (event_class_p) *event_class_p = E_EV_CA;
return IB_AE_PORT_ACTIVE; /* ACTIVE STATE */
+ case VAPI_CLIENT_REREGISTER:
+ if (event_class_p) *event_class_p = E_EV_CA;
+ return IB_AE_CLIENT_REREGISTER; /* ACTIVE STATE */
+
default:
CL_TRACE(MLNX_DBG_INFO, g_mlnx_dbg_lvl, ("FAIL to map %d
(last known %d) returning %d\n",
event_id, VAPI_PORT_ACTIVE, IB_AE_LOCAL_FATAL));
@@ -2046,6 +2050,8 @@
ibal_port_cap_p->sm_disable = TRUE;
if (vapi_port_cap & IB_CAP_MASK_IS_SM)
ibal_port_cap_p->sm = TRUE;
+ if (vapi_port_cap & IB_CAP_MASK_IS_CLIENT_REREGISTRATION_SUP)
+ ibal_port_cap_p->client_reregister= TRUE;
}
/////////////////////////////////////////////////////////
Index: hw/mt23108/kernel/hca_verbs.c
===================================================================
--- hw/mt23108/kernel/hca_verbs.c (revision 367)
+++ hw/mt23108/kernel/hca_verbs.c (working copy)
@@ -414,6 +414,10 @@
hca_attr_mask |= HCA_ATTR_IS_VENDOR_CLS_SUP;
hca_attr.is_vendor_cls_sup = (MT_bool)p_port_attr->cap.vend;
}
+ if (modca_cmd & IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED) {
+ hca_attr_mask |= HCA_ATTR_IS_CLIENT_REREGISTRATION_SUP;
+ hca_attr.is_client_reregister_sup=
(MT_bool)p_port_attr->cap.client_reregister;
+ }
if (modca_cmd & IB_CA_MOD_QKEY_CTR) {
if (p_port_attr->qkey_ctr == 0)
hca_attr.reset_qkey_counter = TRUE;
Index: hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c
===================================================================
--- hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c (revision 367)
+++ hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c (working copy)
@@ -2732,6 +2732,13 @@
IB_CAP_MASK_CLR(capabilities, IB_CAP_MASK_IS_VENDOR_CLS_SUP);
}
}
+ if(HCA_ATTR_IS_SET(*hca_attr_mask_p,
HCA_ATTR_IS_CLIENT_REREGISTRATION_SUP) ) {
+ if (hca_attr_p->is_client_reregister_sup) {
+ IB_CAP_MASK_SET(capabilities,
IB_CAP_MASK_IS_CLIENT_REREGISTRATION_SUP);
+ } else {
+ IB_CAP_MASK_CLR(capabilities,
IB_CAP_MASK_IS_CLIENT_REREGISTRATION_SUP);
+ }
+ }
}
set_ib_props.capability_mask = capabilities;
Index: hw/mt23108/vapi/Hca/verbs/common/vapi_common.c
===================================================================
--- hw/mt23108/vapi/Hca/verbs/common/vapi_common.c (revision 367)
+++ hw/mt23108/vapi/Hca/verbs/common/vapi_common.c (working copy)
@@ -146,6 +146,7 @@
SAFE_APPEND(HCA_ATTR_IS_SNMP_TUN_SUP)
SAFE_APPEND(HCA_ATTR_IS_DEV_MGT_SUP)
SAFE_APPEND(HCA_ATTR_IS_VENDOR_CLS_SUP)
+ SAFE_APPEND(HCA_ATTR_IS_CLIENT_REREGISTRATION_SUP)
SAFE_APPEND(HCA_ATTR_MAX)
end_mask_sym(buf, cbuf, bufsz);
return buf;
Index: hw/mt23108/vapi/Hca/verbs/vapi_types.h
===================================================================
--- hw/mt23108/vapi/Hca/verbs/vapi_types.h (revision 367)
+++ hw/mt23108/vapi/Hca/verbs/vapi_types.h (working copy)
@@ -111,7 +111,8 @@
HCA_ATTR_IS_SNMP_TUN_SUP = 2,
HCA_ATTR_IS_DEV_MGT_SUP = 4,
HCA_ATTR_IS_VENDOR_CLS_SUP = 8,
- HCA_ATTR_MAX = 16 /*Dummy enum entry: always keep it the
last one */
+ HCA_ATTR_IS_CLIENT_REREGISTRATION_SUP = 16,
+ HCA_ATTR_MAX = 32 /*Dummy enum entry: always keep it the
last one */
} VAPI_hca_attr_mask_enum_t;
@@ -126,7 +127,8 @@
HCA_ATTR_IS_SM|\
HCA_ATTR_IS_SNMP_TUN_SUP|\
HCA_ATTR_IS_DEV_MGT_SUP|\
- HCA_ATTR_IS_VENDOR_CLS_SUP))!=0)
+ HCA_ATTR_IS_VENDOR_CLS_SUP|\
+ HCA_ATTR_IS_CLIENT_REREGISTRATION_SUP))!=0)
#define HCA_ATTR_IS_SET(mask,attr) (((mask)&(attr))!=0)
/* QP attributes mask enumeration */
@@ -385,7 +387,8 @@
VAPI_LOCAL_EEC_CATASTROPHIC_ERROR, /*EEC*/
VAPI_LOCAL_CATASTROPHIC_ERROR, /*none*/
VAPI_PORT_ERROR, /*PORT*/
- VAPI_PORT_ACTIVE /*PORT*/
+ VAPI_PORT_ACTIVE, /*PORT*/
+ VAPI_CLIENT_REREGISTER
} VAPI_event_record_type_t;
@@ -586,6 +589,7 @@
MT_bool is_snmp_tun_sup;
MT_bool is_dev_mgt_sup;
MT_bool is_vendor_cls_sup;
+ MT_bool is_client_reregister_sup;
} VAPI_hca_attr_t;
Index: hw/mt23108/vapi/mlxsys/mtl_types/ib_defs.h
===================================================================
--- hw/mt23108/vapi/mlxsys/mtl_types/ib_defs.h (revision 367)
+++ hw/mt23108/vapi/mlxsys/mtl_types/ib_defs.h (working copy)
@@ -187,8 +187,11 @@
/*20: */ IB_CAP_MASK_IS_VENDOR_CLS_SUP = (1<<20),
/*21: */ IB_CAP_MASK_IS_DR_NOTICE_SUP = (1<<21),
/*22: */ IB_CAP_MASK_IS_CAP_MASK_NOTICE_SUP = (1<<22),
-/*23: */ IB_CAP_MASK_IS_BOOT_MGMT_SUP = (1<<23)
-/*24 - 31: RESERVED */
+/*23: */ IB_CAP_MASK_IS_BOOT_MGMT_SUP = (1<<23),
+/*24: */ IB_CAP_MASK_IS_LINK_ROUND_TRIP_LATENCY_SUP = (1<<24), //????
NEW
+/*25: */ IB_CAP_MASK_IS_CLIENT_REREGISTRATION_SUP = (1<<25)
+/*26 - 31: RESERVED */
+
} IB_capability_mask_bits_t;
Index: inc/complib/cl_obj.h
===================================================================
--- inc/complib/cl_obj.h (revision 367)
+++ inc/complib/cl_obj.h (working copy)
@@ -699,6 +699,8 @@
cl_obj_lock(
IN cl_obj_t * const
p_obj )
{
+ CL_ASSERT( p_obj->state == CL_INITIALIZED ||
+ p_obj->state == CL_DESTROYING );
cl_spinlock_acquire( &p_obj->lock );
}
/*
@@ -727,6 +729,8 @@
cl_obj_unlock(
IN cl_obj_t * const
p_obj )
{
+ CL_ASSERT( p_obj->state == CL_INITIALIZED ||
+ p_obj->state == CL_DESTROYING );
cl_spinlock_release( &p_obj->lock );
}
/*
Index: inc/complib/cl_vector.h
===================================================================
--- inc/complib/cl_vector.h (revision 367)
+++ inc/complib/cl_vector.h (working copy)
@@ -625,7 +625,7 @@
/* Get a pointer to the element. */
p_src = cl_vector_get_ptr( p_vector, index );
- p_vector->pfn_copy( p_src, p_element, p_vector->element_size );
+ p_vector->pfn_copy( p_element, p_src, p_vector->element_size );
}
/*
* PARAMETERS
Index: inc/iba/ib_types.h
===================================================================
--- inc/iba/ib_types.h (revision 367)
+++ inc/iba/ib_types.h (working copy)
@@ -3839,38 +3839,38 @@
#define IB_PORT_LINK_SPEED_SUPPORTED_MASK 0xF0
-#define IB_PORT_CAP_RESV1 (CL_NTOH32(0x00000001))
-#define IB_PORT_CAP_IS_SM (CL_NTOH32(0x00000002))
-#define IB_PORT_CAP_HAS_NOTICE (CL_NTOH32(0x00000004))
-#define IB_PORT_CAP_HAS_TRAP (CL_NTOH32(0x00000008))
-#define IB_PORT_CAP_RESV2 (CL_NTOH32(0x00000010))
-#define IB_PORT_CAP_HAS_AUTO_MIG (CL_NTOH32(0x00000020))
-#define IB_PORT_CAP_HAS_SL_MAP (CL_NTOH32(0x00000040))
-#define IB_PORT_CAP_HAS_NV_MKEY (CL_NTOH32(0x00000080))
-#define IB_PORT_CAP_HAS_NV_PKEY (CL_NTOH32(0x00000100))
-#define IB_PORT_CAP_HAS_LED_INFO (CL_NTOH32(0x00000200))
-#define IB_PORT_CAP_SM_DISAB (CL_NTOH32(0x00000400))
-#define IB_PORT_CAP_RESV3 (CL_NTOH32(0x00000800))
-#define IB_PORT_CAP_RESV4 (CL_NTOH32(0x00001000))
-#define IB_PORT_CAP_RESV5 (CL_NTOH32(0x00002000))
-#define IB_PORT_CAP_RESV6 (CL_NTOH32(0x00004000))
-#define IB_PORT_CAP_RESV7 (CL_NTOH32(0x00008000))
-#define IB_PORT_CAP_HAS_COM_MGT (CL_NTOH32(0x00010000))
-#define IB_PORT_CAP_HAS_SNMP (CL_NTOH32(0x00020000))
-#define IB_PORT_CAP_RESV8 (CL_NTOH32(0x00040000))
-#define IB_PORT_CAP_HAS_DEV_MGT (CL_NTOH32(0x00080000))
-#define IB_PORT_CAP_HAS_VEND_CLS (CL_NTOH32(0x00100000))
-#define IB_PORT_CAP_HAS_DR_NTC (CL_NTOH32(0x00200000))
-#define IB_PORT_CAP_HAS_CAP_NTC (CL_NTOH32(0x00400000))
-#define IB_PORT_CAP_HAS_BM (CL_NTOH32(0x00800000))
-#define IB_PORT_CAP_RESV9 (CL_NTOH32(0x01000000))
-#define IB_PORT_CAP_RESV10 (CL_NTOH32(0x02000000))
-#define IB_PORT_CAP_RESV11 (CL_NTOH32(0x04000000))
-#define IB_PORT_CAP_RESV12 (CL_NTOH32(0x08000000))
-#define IB_PORT_CAP_RESV13 (CL_NTOH32(0x10000000))
-#define IB_PORT_CAP_RESV14 (CL_NTOH32(0x20000000))
-#define IB_PORT_CAP_RESV15 (CL_NTOH32(0x40000000))
-#define IB_PORT_CAP_RESV16 (CL_NTOH32(0x80000000))
+#define IB_PORT_CAP_RESV0 (CL_NTOH32(0x00000001))
+#define IB_PORT_CAP_IS_SM (CL_NTOH32(0x00000002))
+#define IB_PORT_CAP_HAS_NOTICE (CL_NTOH32(0x00000004))
+#define IB_PORT_CAP_HAS_TRAP (CL_NTOH32(0x00000008))
+#define IB_PORT_CAP_HAS_IPD (CL_NTOH32(0x00000010))
+#define IB_PORT_CAP_HAS_AUTO_MIG (CL_NTOH32(0x00000020))
+#define IB_PORT_CAP_HAS_SL_MAP (CL_NTOH32(0x00000040))
+#define IB_PORT_CAP_HAS_NV_MKEY (CL_NTOH32(0x00000080))
+#define IB_PORT_CAP_HAS_NV_PKEY (CL_NTOH32(0x00000100))
+#define IB_PORT_CAP_HAS_LED_INFO (CL_NTOH32(0x00000200))
+#define IB_PORT_CAP_SM_DISAB (CL_NTOH32(0x00000400))
+#define IB_PORT_CAP_HAS_SYS_GUID (CL_NTOH32(0x00000800))
+#define IB_PORT_CAP_HAS_PKEY_SW_EXT_PORT_TRAP (CL_NTOH32(0x00001000))
+#define IB_PORT_CAP_RESV13 (CL_NTOH32(0x00002000))
+#define IB_PORT_CAP_RESV14 (CL_NTOH32(0x00004000))
+#define IB_PORT_CAP_RESV15 (CL_NTOH32(0x00008000))
+#define IB_PORT_CAP_HAS_COM_MGT (CL_NTOH32(0x00010000))
+#define IB_PORT_CAP_HAS_SNMP (CL_NTOH32(0x00020000))
+#define IB_PORT_CAP_HAS_REINIT (CL_NTOH32(0x00040000))
+#define IB_PORT_CAP_HAS_DEV_MGT (CL_NTOH32(0x00080000))
+#define IB_PORT_CAP_HAS_VEND_CLS (CL_NTOH32(0x00100000))
+#define IB_PORT_CAP_HAS_DR_NTC (CL_NTOH32(0x00200000))
+#define IB_PORT_CAP_HAS_CAP_NTC (CL_NTOH32(0x00400000))
+#define IB_PORT_CAP_HAS_BM (CL_NTOH32(0x00800000))
+#define IB_PORT_CAP_HAS_LINK_TRIP (CL_NTOH32(0x01000000))
+#define IB_PORT_CAP_HAS_CLI_REREG (CL_NTOH32(0x02000000))
+#define IB_PORT_CAP_RESV26 (CL_NTOH32(0x04000000))
+#define IB_PORT_CAP_RESV27 (CL_NTOH32(0x08000000))
+#define IB_PORT_CAP_RESV28 (CL_NTOH32(0x10000000))
+#define IB_PORT_CAP_RESV29 (CL_NTOH32(0x20000000))
+#define IB_PORT_CAP_RESV30 (CL_NTOH32(0x40000000))
+#define IB_PORT_CAP_RESV31 (CL_NTOH32(0x80000000))
/****f* IBA Base: Types/ib_port_info_get_port_state
* NAME
@@ -7177,6 +7177,7 @@
IB_AE_WQ_ACCESS_ERROR,
IB_AE_PORT_ACTIVE,
IB_AE_PORT_DOWN,
+ IB_AE_CLIENT_REREGISTER,
IB_AE_UNKNOWN /* ALWAYS LAST ENUM VALUE */
} ib_async_event_t;
@@ -7266,6 +7267,9 @@
* The link is declared unavailable: IB_LINK_INIT,
IB_LINK_ARMED,
* IB_LINK_DOWN.
*
+* IB_AE_CLIENT_REREGISTER
+* The SM idicate to client to reregister its SA records.
+*
* IB_AE_UNKNOWN
* An unknown error occurred which cannot be attributed to any
* resource; behavior is indeterminate.
@@ -7429,7 +7433,11 @@
boolean_t reinit;
boolean_t ledinfo;
boolean_t port_active;
-
+ boolean_t ipd;
+ boolean_t pkey_switch_ext_port;
+ boolean_t bm;
+ boolean_t link_rtl;
+ boolean_t client_reregister;
} ib_port_cap_t;
/*****/
@@ -7521,7 +7529,7 @@
* timeout = 4.096 microseconds * 2^subnet_timeout
*/
uint8_t subnet_timeout;
-
+ uint8_t client_reregistration;
ib_port_cap_t cap;
uint16_t pkey_ctr;
uint16_t qkey_ctr;
@@ -9201,6 +9209,7 @@
#define IB_CA_MOD_SHUTDOWN_PORT 0x00100000
#define IB_CA_MOD_INIT_TYPE_VALUE 0x00200000
#define IB_CA_MOD_SYSTEM_IMAGE_GUID 0x00400000
+#define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED 0x00800000
/*
* VALUES
* IB_CA_MOD_IS_CM_SUPPORTED
@@ -9279,6 +9288,10 @@
*
* IB_CA_MOD_SYSTEM_IMAGE_GUID
* Used to modify the system image GUID for the port.
+*
+* IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED
+* Used to modify the system image GUID for the port.
+*
*****/
Index: ulp/ipoib/kernel/ipoib_adapter.c
===================================================================
--- ulp/ipoib/kernel/ipoib_adapter.c (revision 367)
+++ ulp/ipoib/kernel/ipoib_adapter.c (working copy)
@@ -500,6 +500,7 @@
return IB_NOT_DONE;
}
+ IPOIB_TRACE(IPOIB_DBG_INFO,("p_pnp_rec->pnp_event =
0x%x\n",p_pnp_rec->pnp_event));
switch( p_pnp_rec->pnp_event )
{
case IB_PNP_PORT_ADD:
@@ -610,11 +611,24 @@
case IB_PNP_SM_CHANGE:
case IB_PNP_GID_CHANGE:
case IB_PNP_LID_CHANGE:
- /* TODO: Refresh all multicast group memberships in case the
SM changed. */
+
+ /* Join multicast groups and put QP in RTS. */
+ CL_ASSERT( p_pnp_rec->context );
+ cl_obj_lock( &p_adapter->obj );
+ p_adapter->state = p_pnp_rec->pnp_event;
+ cl_obj_unlock( &p_adapter->obj );
IPOIB_TRACE( IPOIB_DBG_INFO,
- ("IPOIB: Received unhandled PnP event %d\n",
+ ("IPOIB: Received client reregister PnP event %d\n",
p_pnp_rec->pnp_event) );
+
+ ipoib_port_sm_change( p_adapter->p_port);
+
+ status = IB_SUCCESS;
+
default:
+ IPOIB_TRACE( IPOIB_DBG_INFO,
+ ("IPOIB: Received unhandled PnP event 0x%x\n",
+ p_pnp_rec->pnp_event) );
status = IB_SUCCESS;
break;
}
Index: ulp/ipoib/kernel/ipoib_driver.c
===================================================================
--- ulp/ipoib/kernel/ipoib_driver.c (revision 367)
+++ ulp/ipoib/kernel/ipoib_driver.c (working copy)
@@ -2102,7 +2102,8 @@
cl_memcpy(
&ib_service.svc_rec.service_data8[ATS_IPV4_OFFSET],
p_addr_item->address.as_bytes, IPV4_ADDR_SIZE );
-
+ /* taking reference for each service request.... */
+ cl_obj_ref(&p_adapter->obj);
ib_status = p_adapter->p_ifc->reg_svc(
p_adapter->h_al, &ib_service,
&p_addr_item->p_reg->h_reg_svc );
if( ib_status != IB_SUCCESS )
@@ -2134,6 +2135,7 @@
p_adapter->p_ifc->get_err_str(
ib_status )) );
p_adapter->hung = TRUE;
}
+ cl_obj_deref(&p_adapter->obj);
cl_free( p_addr_item->p_reg );
p_addr_item->p_reg = NULL;
}
@@ -2221,7 +2223,7 @@
p_reg->p_adapter->hung = TRUE;
p_reg->h_reg_svc = NULL;
}
-
+ cl_obj_deref(&p_reg->p_adapter->obj);
cl_obj_unlock( &p_reg->p_adapter->obj );
IPOIB_EXIT( IPOIB_DBG_OID );
Index: ulp/ipoib/kernel/ipoib_endpoint.c
===================================================================
--- ulp/ipoib/kernel/ipoib_endpoint.c (revision 367)
+++ ulp/ipoib/kernel/ipoib_endpoint.c (working copy)
@@ -196,7 +196,7 @@
}
cl_obj_unlock( p_obj );
- IPOIB_EXIT( IPOIB_DBG_INIT );
+ IPOIB_EXIT( IPOIB_DBG_ENDPT );
}
Index: ulp/ipoib/kernel/ipoib_endpoint.h
===================================================================
--- ulp/ipoib/kernel/ipoib_endpoint.h (revision 367)
+++ ulp/ipoib/kernel/ipoib_endpoint.h (working copy)
@@ -148,7 +148,7 @@
{
IPOIB_ENTER( IPOIB_DBG_ENDPT );
cl_obj_deref( &p_endpt->obj );
- IPOIB_EXIT( IPOIB_DBG_INIT );
+ IPOIB_EXIT( IPOIB_DBG_ENDPT );
}
Index: ulp/ipoib/kernel/ipoib_port.c
===================================================================
--- ulp/ipoib/kernel/ipoib_port.c (revision 367)
+++ ulp/ipoib/kernel/ipoib_port.c (working copy)
@@ -421,7 +421,7 @@
*
****************************************************************************
**/
static void
-__port_get_mcast(
+__port_get_bcast(
IN ipoib_port_t* const
p_port );
static void
@@ -680,6 +680,7 @@
}
+
static void
__port_free(
IN cl_obj_t* const
p_obj )
@@ -4045,6 +4046,30 @@
static ib_api_status_t
+__endpt_mgr_remove_bcast(
+ IN ipoib_port_t* const
p_port)
+{
+ ipoib_endpt_t *p_endpt;
+
+ IPOIB_ENTER( IPOIB_DBG_INIT );
+
+ /* Remove the broadcast endpoint. */
+ p_endpt = __endpt_mgr_get_by_gid(p_port,
&p_port->ib_mgr.bcast_rec.mgid);
+ if( !p_endpt )
+ {
+ IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ ("__endpt_mgr_get_by_gid failed.\n") );
+ return IB_INVALID_GID;
+ }
+
+ __endpt_mgr_remove( p_port, p_endpt );
+
+ IPOIB_EXIT( IPOIB_DBG_INIT );
+ return IB_SUCCESS;
+
+}
+
+static ib_api_status_t
__endpt_mgr_add_bcast(
IN ipoib_port_t* const
p_port,
IN ib_mcast_rec_t
*p_mcast_rec )
@@ -4353,7 +4378,7 @@
p_port_rec->port_info.link_width_active) );
ipoib_set_rate( p_port->p_adapter,
p_port_rec->port_info.link_width_active );
- __port_get_mcast( p_port );
+ __port_get_bcast( p_port );
}
else
{
@@ -4386,7 +4411,7 @@
static void
-__port_get_mcast(
+__port_get_bcast(
IN ipoib_port_t* const
p_port )
{
ib_api_status_t status;
@@ -4716,7 +4741,7 @@
state isn't IB_PNP_PORT_ADD or PORT_DOWN? */
CL_ASSERT( p_port->p_adapter->state ==
IB_PNP_PORT_ADD ||
p_port->p_adapter->state == IB_PNP_PORT_DOWN
);
- __port_get_mcast( p_port );
+ __port_get_bcast( p_port );
}
else
{
@@ -5034,3 +5059,19 @@
IPOIB_EXIT( IPOIB_DBG_MCAST );
}
+
+
+ib_api_status_t
+ipoib_port_sm_change(
+ IN ipoib_port_t* const
p_port)
+{
+ ib_api_status_t status = IB_SUCCESS;
+
+ IPOIB_ENTER( IPOIB_DBG_INIT );
+
+ p_port->p_adapter->hung = TRUE;
+
+ IPOIB_EXIT( IPOIB_DBG_INIT );
+ return status;
+
+}
Index: ulp/ipoib/kernel/ipoib_port.h
===================================================================
--- ulp/ipoib/kernel/ipoib_port.h (revision 367)
+++ ulp/ipoib/kernel/ipoib_port.h (working copy)
@@ -560,6 +560,10 @@
IN ipoib_port_t* const
p_port,
IN const mac_addr_t
mac );
+ib_api_status_t
+ipoib_port_sm_change(
+ IN ipoib_port_t* const
p_port);
+
void
ipoib_port_remove_endpt(
IN ipoib_port_t* const
p_port,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050914/711e84af/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reregister.patch
Type: application/octet-stream
Size: 19300 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050914/711e84af/attachment.obj>
More information about the ofw
mailing list