RE: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-09 Thread Parav Pandit
> From: Jason Gunthorpe > Sent: Thursday, April 8, 2021 5:46 PM > On Wed, Apr 07, 2021 at 03:44:35PM +, Parav Pandit wrote: > > > > If it returns EOPNOTUPP then the remove is never called so if it > > > allocated memory and left it allocated then it is leaking memory. > > > > > I probably

Re: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-08 Thread Jason Gunthorpe
On Wed, Apr 07, 2021 at 03:44:35PM +, Parav Pandit wrote: > > If it returns EOPNOTUPP then the remove is never called so if it allocated > > memory and left it allocated then it is leaking memory. > > > I probably confused you. There is no leak today because add_one > allocates memory, and la

RE: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-07 Thread Parav Pandit
> From: Jason Gunthorpe > Sent: Wednesday, April 7, 2021 8:44 PM > > On Wed, Apr 07, 2021 at 03:06:35PM +, Parav Pandit wrote: > > > > > > > From: Jason Gunthorpe > > > Sent: Tuesday, April 6, 2021 9:17 PM > > > > > > On Mon, Apr 05, 2021 at 08:49:56AM +0300, Leon Romanovsky wrote: > > >

Re: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-07 Thread Jason Gunthorpe
On Wed, Apr 07, 2021 at 03:06:35PM +, Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Tuesday, April 6, 2021 9:17 PM > > > > On Mon, Apr 05, 2021 at 08:49:56AM +0300, Leon Romanovsky wrote: > > > @@ -2293,6 +2295,17 @@ static void ib_sa_event(struct ib_event_handler > > *handler

RE: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-07 Thread Parav Pandit
> From: Jason Gunthorpe > Sent: Tuesday, April 6, 2021 9:17 PM > > On Mon, Apr 05, 2021 at 08:49:56AM +0300, Leon Romanovsky wrote: > > @@ -2293,6 +2295,17 @@ static void ib_sa_event(struct ib_event_handler > *handler, > > } > > } > > > > +static bool ib_sa_client_supported(struct ib_devi

Re: [PATCH rdma-next 4/8] IB/core: Skip device which doesn't have necessary capabilities

2021-04-06 Thread Jason Gunthorpe
On Mon, Apr 05, 2021 at 08:49:56AM +0300, Leon Romanovsky wrote: > @@ -2293,6 +2295,17 @@ static void ib_sa_event(struct ib_event_handler > *handler, > } > } > > +static bool ib_sa_client_supported(struct ib_device *device) > +{ > + unsigned int i; > + > + rdma_for_each_port(devic