Version: 1
-Previous: 96770021c2a7a8a48e095a1500a4a47e2d8a2ce0
-Head: 3ef6c2dc468f1ef4816fcbeada8261cfbc82fc45
+Previous: 6084ef562c12571d1c7a16d131cb70a962583ae9
+Head: 75a8495c7172412d0c1887f4399582f86ccb3616
Applied:
rm-build: d6d2302f2d258fa2c07e55a2e124a9bdd75367a0
- cm_listen_handler: e28d8d300bd82635786263e4e10ed16d035c81ea
- refresh-temp: 3ef6c2dc468f1ef4816fcbeada8261cfbc82fc45
+ cm_listen_handler: 75a8495c7172412d0c1887f4399582f86ccb3616
Unapplied:
old-bld-32: bd1bd1d366e3927b7646da33e243213a5d59c235
old-apphang: 7a6f7ff02c6035e54fc262414eb9484ea98018b9
Bottom: e29033309f04a8a0c29c9cd63ce2469c6ffee724
-Top: e29033309f04a8a0c29c9cd63ce2469c6ffee724
+Top: a7432c74d251e27d95c7a5f69686c4e25967c6d4
Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
Date: 2010-01-06 08:56:34 -0800
---
-
+diff --git a/trunk/core/al/kernel/al_cm.c b/trunk/core/al/kernel/al_cm.c
+index 955985a..1f64cdb 100644
+--- a/trunk/core/al/kernel/al_cm.c
++++ b/trunk/core/al/kernel/al_cm.c
+@@ -77,28 +77,51 @@ cm_cep_handler(const ib_al_handle_t h_al, const net32_t cid)
+ void *context;\r
+ net32_t new_cid;\r
+ ib_mad_element_t *mad;\r
+- iba_cm_id *id, *listen_id;\r
++ iba_cm_id *id;\r
+ iba_cm_event event;\r
+ NTSTATUS status;\r
+ \r
+ while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
+ \r
+- if (new_cid == AL_INVALID_CID) {\r
+- id = (iba_cm_id *) context;\r
+- } else {\r
+- listen_id = (iba_cm_id *) context;\r
++ ASSERT(new_cid == AL_INVALID_CID);\r
++ id = (iba_cm_id *) context;\r
++ kal_cep_format_event(h_al, id->cid, mad, &event);\r
++\r
++ status = id->callback(id, &event);\r
++ if (!NT_SUCCESS(status)) {\r
++ kal_cep_config(h_al, new_cid, NULL, NULL, NULL);\r
++ kal_cep_destroy(h_al, id->cid, status);\r
++ cm_free_id(id);\r
++ }\r
++ ib_put_mad(mad);\r
++ }\r
++}\r
++\r
++static void\r
++cm_listen_handler(const ib_al_handle_t h_al, const net32_t cid)\r
++{\r
++ void *context;\r
++ net32_t new_cid;\r
++ ib_mad_element_t *mad;\r
++ iba_cm_id *id, *listen_id;\r
++ iba_cm_event event;\r
++ NTSTATUS status;\r
++\r
++ while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
+ \r
+- id = cm_alloc_id(listen_id->callback, listen_id);\r
+- if (id == NULL) {\r
+- kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
+- ib_put_mad(mad);\r
+- continue;\r
+- }\r
++ ASSERT(new_cid != AL_INVALID_CID);\r
++ listen_id = (iba_cm_id *) context;\r
+ \r
+- kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
+- id->cid = new_cid;\r
++ id = cm_alloc_id(listen_id->callback, listen_id);\r
++ if (id == NULL) {\r
++ kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
++ ib_put_mad(mad);\r
++ continue;\r
+ }\r
+ \r
++ kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
++ id->cid = new_cid;\r
++\r
+ kal_cep_format_event(h_al, id->cid, mad, &event);\r
+ status = id->callback(id, &event);\r
+ if (!NT_SUCCESS(status)) {\r
+@@ -157,6 +180,7 @@ cm_listen(iba_cm_id *p_id, net64_t service_id, void *p_compare_buf,
+ info.cmp_len = compare_len;\r
+ info.cmp_offset = compare_offset;\r
+ \r
++ kal_cep_config(gh_al, p_id->cid, cm_listen_handler, p_id, cm_destroy_handler);\r
+ ib_status = al_cep_listen(gh_al, p_id->cid, &info);\r
+ return ib_to_ntstatus(ib_status);\r
+ }
+++ /dev/null
-Bottom: e29033309f04a8a0c29c9cd63ce2469c6ffee724
-Top: a7432c74d251e27d95c7a5f69686c4e25967c6d4
-Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
-Date: 2010-01-06 09:23:08 -0800
-
-Refresh of cm_listen_handler
-
----
-
-diff --git a/trunk/core/al/kernel/al_cm.c b/trunk/core/al/kernel/al_cm.c
-index 955985a..1f64cdb 100644
---- a/trunk/core/al/kernel/al_cm.c
-+++ b/trunk/core/al/kernel/al_cm.c
-@@ -77,28 +77,51 @@ cm_cep_handler(const ib_al_handle_t h_al, const net32_t cid)
- void *context;\r
- net32_t new_cid;\r
- ib_mad_element_t *mad;\r
-- iba_cm_id *id, *listen_id;\r
-+ iba_cm_id *id;\r
- iba_cm_event event;\r
- NTSTATUS status;\r
- \r
- while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
- \r
-- if (new_cid == AL_INVALID_CID) {\r
-- id = (iba_cm_id *) context;\r
-- } else {\r
-- listen_id = (iba_cm_id *) context;\r
-+ ASSERT(new_cid == AL_INVALID_CID);\r
-+ id = (iba_cm_id *) context;\r
-+ kal_cep_format_event(h_al, id->cid, mad, &event);\r
-+\r
-+ status = id->callback(id, &event);\r
-+ if (!NT_SUCCESS(status)) {\r
-+ kal_cep_config(h_al, new_cid, NULL, NULL, NULL);\r
-+ kal_cep_destroy(h_al, id->cid, status);\r
-+ cm_free_id(id);\r
-+ }\r
-+ ib_put_mad(mad);\r
-+ }\r
-+}\r
-+\r
-+static void\r
-+cm_listen_handler(const ib_al_handle_t h_al, const net32_t cid)\r
-+{\r
-+ void *context;\r
-+ net32_t new_cid;\r
-+ ib_mad_element_t *mad;\r
-+ iba_cm_id *id, *listen_id;\r
-+ iba_cm_event event;\r
-+ NTSTATUS status;\r
-+\r
-+ while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
- \r
-- id = cm_alloc_id(listen_id->callback, listen_id);\r
-- if (id == NULL) {\r
-- kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
-- ib_put_mad(mad);\r
-- continue;\r
-- }\r
-+ ASSERT(new_cid != AL_INVALID_CID);\r
-+ listen_id = (iba_cm_id *) context;\r
- \r
-- kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
-- id->cid = new_cid;\r
-+ id = cm_alloc_id(listen_id->callback, listen_id);\r
-+ if (id == NULL) {\r
-+ kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
-+ ib_put_mad(mad);\r
-+ continue;\r
- }\r
- \r
-+ kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
-+ id->cid = new_cid;\r
-+\r
- kal_cep_format_event(h_al, id->cid, mad, &event);\r
- status = id->callback(id, &event);\r
- if (!NT_SUCCESS(status)) {\r
-@@ -157,6 +180,7 @@ cm_listen(iba_cm_id *p_id, net64_t service_id, void *p_compare_buf,
- info.cmp_len = compare_len;\r
- info.cmp_offset = compare_offset;\r
- \r
-+ kal_cep_config(gh_al, p_id->cid, cm_listen_handler, p_id, cm_destroy_handler);\r
- ib_status = al_cep_listen(gh_al, p_id->cid, &info);\r
- return ib_to_ntstatus(ib_status);\r
- }