* [PATCH 2/5] dapl ucm: check for AH caching when destroying via UD extension
@ 2015-05-22 21:43 Davis, Arlin R
0 siblings, 0 replies; only message in thread
From: Davis, Arlin R @ 2015-05-22 21:43 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
From: Arlin Davis <arlin.r.davis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Arlin Davis <arlin.r.davis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
dapl/openib_common/ib_extensions.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dapl/openib_common/ib_extensions.c b/dapl/openib_common/ib_extensions.c
index fc03d9c..25db541 100644
--- a/dapl/openib_common/ib_extensions.c
+++ b/dapl/openib_common/ib_extensions.c
@@ -202,7 +202,6 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
status = DAT_ERROR(DAT_INVALID_HANDLE,
DAT_INVALID_HANDLE_EP);
else {
- cm->ah = NULL; /* consumer will free AH */
status = dapls_ud_cm_free(ep, cm);
}
break;
@@ -210,6 +209,7 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
case DAT_IB_UD_AH_FREE_OP:
{
DAT_IB_ADDR_HANDLE *dat_ah;
+ uint16_t lid;
int ret;
dapl_dbg_log(DAPL_DBG_TYPE_RTN,
@@ -222,8 +222,18 @@ dapl_extensions(IN DAT_HANDLE dat_handle,
status = DAT_ERROR(DAT_INVALID_HANDLE,
DAT_INVALID_HANDLE_EP);
} else {
+ lid = ntohs(((union dcm_addr *)&dat_ah->ia_addr)->ib.lid);
+
+ if (lid > DCM_AH_SPACE) {
+ status = DAT_ERROR(DAT_INVALID_PARAMETER,
+ DAT_INVALID_ARG2);
+ break;
+ }
+
errno = 0;
- ret = ibv_destroy_ah(dat_ah->ah);
+ if (!((DAPL_EP *)ep)->qp_handle->ah[lid])
+ ret = ibv_destroy_ah(dat_ah->ah);
+
status = dapl_convert_errno(errno, "destroy_ah");
}
break;
--
1.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-22 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 21:43 [PATCH 2/5] dapl ucm: check for AH caching when destroying via UD extension Davis, Arlin R
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.