Subject: Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids

From: Jason Gunthorpe <[email-masked]>
Date: Tue, 19 May 2015 13:23:53 -0600

On Fri, May 15, 2015 at 07:11:10PM +0000, Hefty, Sean wrote:
> > The fact the CM might share a listen (and only a listen) ID behind the
> > scenes is not the caller's problem. That is an implementation choice,
> > each caller stands alone and uses the API properly, assuming it is the
> > only user of the returned cm_id.
> 
> Actually, I seriously question why the ib_cm should be modified at all for any of this.

I find Haggai's argument compelling, it is a very small amount of code
and data to add a sharing count, and a very large amount to duplicate
the whole service id map into cma.c.

It is in-kernel after all, we should co-design module APIs to work
efficiently.

Jason