[openib-general] Re: [PATCH] CMA and iWARP
Sean Hefty
mshefty at ichips.intel.com
Fri Jan 20 12:05:05 PST 2006
Tom Tucker wrote:
> Enclosed is a combined include file and core patch for iWARP support in CMA. This
> patch includes changes per your last review.
I applied the portion of your patch that modifies the CMA to use a union to
store the underlying cm_id's, with a couple of changes - see below.
I haven't seen anyone object to merging the other changes. Roland, Hal - any
opinion?
- Sean
> @@ -624,9 +676,20 @@
> state = cma_exch(id_priv, CMA_DESTROYING);
> cma_cancel_operation(id_priv, state);
>
> - if (id_priv->cm_id && !IS_ERR(id_priv->cm_id))
> - ib_destroy_cm_id(id_priv->cm_id);
> + if (id_priv->cm_id.ib && !IS_ERR(id_priv->cm_id.ib)) {
>
> + switch (id->device->node_type) {
> + case IB_NODE_RNIC:
> + iw_destroy_cm_id(id_priv->cm_id.iw);
> + break;
> + default:
> + ib_destroy_cm_id(id_priv->cm_id.ib);
> + break;
> + }
> +
> + id_priv->cm_id.ib = NULL;
> + }
> +
> if (id_priv->cma_dev) {
> down(&mutex);
> cma_detach_from_dev(id_priv);
I rearranged this to check for a cma_dev first, then switch on the node type.
We'll never have a cm_id if a device hasn't been assigned. This allows us to
check the correct union member.
More information about the general
mailing list