[openib-general] Re: [PATCH 1/3] iWARP Header Files

Sean Hefty mshefty at ichips.intel.com
Wed Mar 15 15:06:37 PST 2006


Tom Tucker wrote:
> +struct iw_cm_id {
> +	iw_cm_handler	        cm_handler;      /* client callback function */
> +	void		        *context;	 /* context to provide to client cb */
> +	enum iw_cm_state        state;
> +	struct ib_device        *device;	 
> +	struct ib_qp            *qp;             /* If the qp is null, use qp_num */
> +	u32                     qp_num;
> +	struct sockaddr_in      local_addr;
> +	struct sockaddr_in      remote_addr;
> +	u64                     provider_id;     /* device handle for this conn. */
> +	iw_event_handler        event_handler;   /* callback for IW CM Provider events */
> +};

cm_handler and event_handler have almost the same prototype.  One's a void 
function, the other returns an int.  Can you explain why two callbacks are needed?

Can you also explain what provider_id is and how a user makes use of it?  I 
noticed that you added a comment, but it's not clear to me what a user would do 
with this identifier.

- Sean



More information about the general mailing list