[openib-general] Re: A Couple More CM Queries

Hal Rosenstock halr at voltaire.com
Mon Apr 11 12:01:00 PDT 2005


On Mon, 2005-04-11 at 14:47, Sean Hefty wrote:
> Hal Rosenstock wrote:
> >>>2. Should ib_create_cm_id check return an error if cm_handler == NULL
> >>>just to make sure ?
> >>
> >>Personally, I don't think it's worth this check for kernel clients, 
> >>unless we want to start checking for NULL parameters everywhere.
> > 
> > Incoming REQs currently use this capability anyhow.
> 
> Incoming REQs use the cm_handler associated with the listen request.

Right, but the CM ID is initially created with the NULL handler. That's
all I was saying...

> > It looks like sending private data in REQ/REP/RTU, but incoming private data 
> > isn't handled on the receiving side. 
> 
> The private_data is given to the user in the cm_event structure.  Look 
> for work->cm_event.private_data = in cm_format_req_event, 
> cm_format_rep_event, and cm_rtu_handler.  Note that the private_data is 
> only available while in the CM event callback.

Got it. Thanks.

> > Also, in cm_process_send_error(), where the handler is called
> > 
> > cm_id_priv->id.cm_handler(&cm_id_priv->id, &cm_event);
> > 
> > might that callback request the CM ID destruction ? If so, some
> > code is missing to handle this.
> 
> Yep - this is a bug.  Send errors should probably be handled using the 
> same cm_process_work routine that the receive handling goes through. 
> I'll generate a patch for this, but it'll take me a few days, unless 
> this is urgent.

Nope; not urgent. Just stumbled across it while looking through things.

-- Hal




More information about the general mailing list