Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-21 Thread Jason Gunthorpe
On Thu, May 21, 2015 at 11:08:31AM +0300, Haggai Eran wrote: > > The more I look at this, the more I think it is sketchy. Don't try and > > merge sharecount and refcount together, > I'm not sure what you mean here. The way I was thinking about it was > that sharecount = num of rdma_cm_ids sharing

Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-21 Thread Haggai Eran
On 20/05/2015 01:35, Jason Gunthorpe wrote: > On Tue, May 19, 2015 at 12:35:45PM -0600, Jason Gunthorpe wrote: >> On Sun, May 17, 2015 at 08:51:01AM +0300, Haggai Eran wrote: >>> @@ -212,6 +212,8 @@ struct cm_id_private { >>> spinlock_t lock;/* Do not acquire inside cm.lock */ >>> s

Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-21 Thread Haggai Eran
On 19/05/2015 21:35, Jason Gunthorpe wrote: ... > The share count should be 'listen_sharecount' because it *only* works > for listen. > > The above test in cm_destroy_id should only be in the listen branch of > the if. Okay. > >> + * Create a new listening ib_cm_id and listen on the given serv

Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-19 Thread Jason Gunthorpe
On Tue, May 19, 2015 at 12:35:45PM -0600, Jason Gunthorpe wrote: > On Sun, May 17, 2015 at 08:51:01AM +0300, Haggai Eran wrote: > > @@ -212,6 +212,8 @@ struct cm_id_private { > > spinlock_t lock;/* Do not acquire inside cm.lock */ > > struct completion comp; > > atomic_t refcoun