Re: [PATCH rdma-next v4 3/9] RDMA/nldev: Add resource tracker doit callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 07, 2019 at 05:43:51PM +0200, Leon Romanovsky wrote:
> On Tue, Feb 05, 2019 at 02:52:08PM -0700, Jason Gunthorpe wrote:
> > On Sat, Feb 02, 2019 at 01:42:47PM +0200, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > >
> > > Implement doit callbacks and ensure that users won't provide port values
> > > on resource entry allocated in per-device mode needed for .doit callback.
> > >
> > > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > >  drivers/infiniband/core/nldev.c | 186 +++++++++++++++++++++-----------
> > >  include/rdma/restrack.h         |   2 +-
> > >  2 files changed, 127 insertions(+), 61 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
> > > index 7bbc98080488..e5910bbbcec7 100644
> > > +++ b/drivers/infiniband/core/nldev.c
> > > @@ -375,7 +375,6 @@ static int fill_res_qp_entry(struct sk_buff *msg, bool has_cap_net_admin,
> > >  	struct ib_qp *qp = container_of(res, struct ib_qp, res);
> > >  	struct ib_device *dev = qp->device;
> > >  	struct ib_qp_init_attr qp_init_attr;
> > > -	struct nlattr *entry_attr;
> > >  	struct ib_qp_attr qp_attr;
> > >  	int ret;
> > >
> > > @@ -386,10 +385,6 @@ static int fill_res_qp_entry(struct sk_buff *msg, bool has_cap_net_admin,
> > >  	if (port && port != qp_attr.port_num)
> > >  		return 0;
> >
> > Now that the caller is checking if the port is needed or not these
> > 'if (port)' and !port should be removed from the fill functions
>
> I'll check

It is not so easy, because user has an option do not provide PORT for
port information. In such case, we will return him him information about
all ports in that specific device.

It can be done, but maybe later.

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux