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

Re: [libvirt] [RFC] [PATCH] Support for uevent netlink and hotplug event.

Hi Viktor,

I sent a new version patch set, and please have a look at them.

On 07/19/2012 01:17 AM, Viktor Mihajlovski wrote:
>> +    nl_join_groups(srv->netlinknh, groups);
> AFAIK nl_join_groups is deprecated and should be replaced by a 
> setsockopt( ..., NETLINK_ADD_MEMBERSHIP,...)
> Further, I'd recommend to make the group join optional, i.e. something like
>   if (groups)
>       setsockopt(...);
> and perhaps add error handling.
> Not sure, but should the add membership not happen after the connect?
Well, I tried. But setsockopt() needs a fd, and before nl_connect(), we cannot
use nl_socket_get_fd() to get the fd because the fd is allocated in nl_connect().

But if setsockopt() is called after nl_connect(), it doesn't work.

For now, I didn't find any better solution.

> As far as I can tell, it is necessary to implement equivalents of
> virNetlinkEventAddClient, virNetlinkEventRemoveClient, 
> virNetlinkEventRemoveClientPrimitive, virNetlinkEventServiceStop and 
> virNetlinkEventServiceIsRunning to include the protocol.
> Generally, you could go all the way and replace the body of 
> virNetlinkEventServiceStart by a call to
>   virNetlinkEventServiceStartProtocol(NETLINK_ROUTE,0);
> or change all occurrences of the call to use the extended signature,
I tried my best to find all of them.
If I missed something, please tell me.

Thanks. :)

> Maybe Eric or some other maintainer wants to comment as well.

Best Regards,
Tang chen

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