From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [PATCH V1 for-next 1/2] IB/uverbs: Enable device removal when there are active user space applications Date: Tue, 18 Nov 2014 16:38:26 +0200 Message-ID: <546B59E2.2050707@mellanox.com> References: <1416312682-7899-1-git-send-email-yishaih@mellanox.com> <1416312682-7899-2-git-send-email-yishaih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1416312682-7899-2-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yishai Hadas , roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, jackm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org List-Id: linux-rdma@vger.kernel.org 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. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html