Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-28 Thread Maor Gottlieb
On 10/28/2020 2:14 PM, Jason Gunthorpe wrote: On Wed, Oct 28, 2020 at 11:19:14AM +0200, Maor Gottlieb wrote: + struct rdma_conn_param *conn_param) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret;

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-28 Thread Maor Gottlieb
On 10/27/2020 2:20 PM, Jason Gunthorpe wrote: There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the handler triggers a completion and another thread does rdma_connect() or the handler directly calls rdma_connect(). In all cases rdma_connect() needs to hold the handler_mutex

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-28 Thread Jason Gunthorpe
On Wed, Oct 28, 2020 at 11:19:14AM +0200, Maor Gottlieb wrote: > > + struct rdma_conn_param *conn_param) > > { > > struct rdma_id_private *id_priv = > > container_of(id, struct rdma_id_private, id); > > int ret; > > - mutex_lock(&id_priv->handler_mutex); >

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Jason Gunthorpe
On Tue, Oct 27, 2020 at 03:19:36PM +0200, Leon Romanovsky wrote: > > +int rdma_connect_locked(struct rdma_cm_id *id, > > + struct rdma_conn_param *conn_param) > > { > > struct rdma_id_private *id_priv = > > container_of(id, struct rdma_id_private, id); > > in

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Leon Romanovsky
On Tue, Oct 27, 2020 at 09:20:36AM -0300, Jason Gunthorpe wrote: > There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the > handler triggers a completion and another thread does rdma_connect() or > the handler directly calls rdma_connect(). > > In all cases rdma_connect() needs t

Re: [PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Max Gurtovoy
On 10/27/2020 2:20 PM, Jason Gunthorpe wrote: There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the handler triggers a completion and another thread does rdma_connect() or the handler directly calls rdma_connect(). In all cases rdma_connect() needs to hold the handler_mutex

[PATCH rdma v2] RDMA: Add rdma_connect_locked()

2020-10-27 Thread Jason Gunthorpe
There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the handler triggers a completion and another thread does rdma_connect() or the handler directly calls rdma_connect(). In all cases rdma_connect() needs to hold the handler_mutex, but when handler's are invoked this is already h