Re: [PATCH V1 for-next 1/2] IB/uverbs: Enable device removal when there are active user space applications

Or Gerlitz
2014-11-18T14:38:26Z

On 11/18/2014 2:11 PM, Yishai Hadas wrote:
> @@ -923,6 +1062,7 @@ static void ib_uverbs_add_one(struct ib_device *device)
> if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version))
> goto err_class;
>
> + uverbs_dev->disassociated_supported = device->disassociate_ucontext ? 1 : 0;
> ib_set_client_data(device, &uverbs_client, uverbs_dev);
>
> return;

please no, for object->yyy_supported flags (here and elsewhere too).

You can add IB device capability (say, named IB_DEVICE_DISASSOCIATE) and
just look it up directly from uverbs throug the IB device pointer
existing in the uverbs device object in the spots you need this (remove
uverbs_dev->disassociated_supported field).

Or.