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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]