Re: [PATCH rdma-next v3 1/2] RDMA: Add indication for in kernel API support to IB device

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

 



On Tue, Jan 08, 2019 at 09:55:54PM +0000, Majd Dibbiny wrote:
> > @@ -537,11 +538,13 @@ static int setup_device(struct ib_device *device)
> >    }
> > 
> >    memset(&device->attrs, 0, sizeof(device->attrs));
> > -    ret = device->ops.query_device(device, &device->attrs, &uhw);
> > -    if (ret) {
> > -        dev_warn(&device->dev,
> > -             "Couldn't query the device attributes\n");
> > -        goto port_cleanup;
> > +    if (device->ops.query_device) {

> Why do we need these kind of checks now?  In case device doesn’t
> implement all mandatory kverbs, then clients won’t add it.. uverbs
> has uverbs_cmd_mask in write path, and checks function pointer in
> the ioctl path..  Maybe I’m missing something..

Yah, I agree, the checks should be in the uverbs layer, and presumably
they are all there already, it just needs careful checking.

Jason



[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