[Openib-windows] [PATCH] Client Reregister support in IBAL
Fab Tillier
ftillier at silverstorm.com
Wed Sep 14 13:36:19 PDT 2005
Folks,
I've just checked in the following to add support for client reregister events
in IBAL. Users will get an IB_PNP_SM_CHANGE event notification for ports that
experience either a new SM or have the SM reregister.
This change is available in revision 67
This patch is mainly a subset of Yossi Leybovich's patch, with minor changes.
- Fab
Singed-off-by: Fab Tillier (ftillier at silverstorm.com)
Singed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)
Index: core/al/kernel/al_smi.c
===================================================================
--- core/al/kernel/al_smi.c (revision 64)
+++ core/al/kernel/al_smi.c (working copy)
@@ -1812,6 +1812,15 @@
{
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,
+ ("Client reregister event, setting sm_lid to 0.\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: core/al/al_ci_ca_shared.c
===================================================================
--- core/al/al_ci_ca_shared.c (revision 64)
+++ core/al/al_ci_ca_shared.c (working copy)
@@ -275,6 +275,7 @@
case IB_AE_PORT_TRAP:
case IB_AE_PORT_DOWN:
case IB_AE_PORT_ACTIVE:
+ case IB_AE_CLIENT_REREGISTER:
#ifdef CL_KERNEL
/* The SMI polling routine may report a PnP event. */
force_smi_poll();
Index: inc/iba/ib_types.h
===================================================================
--- inc/iba/ib_types.h (revision 65)
+++ 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_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_RESV2 (CL_NTOH32(0x00000010))
+#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_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_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_RESV8 (CL_NTOH32(0x00040000))
+#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_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_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,6 +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;
/*****/
@@ -9231,6 +9240,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
@@ -9309,6 +9319,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.
+*
*****/
More information about the ofw
mailing list