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

Or Gerlitz
2014-11-19T14:49:19Z

On 11/18/2014 2:11 PM, Yishai Hadas wrote:
> @@ -533,6 +552,12 @@ void ib_uverbs_event_handler(struct ib_event_handler *handler,
> struct ib_uverbs_file *file =
> container_of(handler, struct ib_uverbs_file, event_handler);
>
> + if (event->event == IB_EVENT_DEVICE_FATAL) {
> + if (file->fatal_event_raised)
> + return;
> + file->fatal_event_raised = 1;
> + }
> +

can we avoid the fatal_event_raised flag?

In a similar manner to what defined for rdma-cm consumers, let's add
IB_EVENT_DEVICE_REMOVAL event and generate both events from here
towards the uberbs consumer (the fatal for legacy apps and the device
removal for newer apps that maybe want to distinguish between the
two)

> ib_uverbs_async_handler(file, event->element.port_num, event->event,
> NULL, NULL);
> }