Re: [ovs-dev] [netdev 26/27] netdev-linux: Use dedicated netlink notification socket.

2013-08-10 Thread Ben Pfaff
On Fri, Aug 09, 2013 at 10:17:47PM -0700, Alex Wang wrote: > > > +struct netdev *netdev_ = > > netdev_from_name(change.ifname); > > > > +if (netdev_ && > > > > is_netdev_linux_class(netdev_->netdev_class)) { > > > > > > > > > Want to confirm, at this if statement, is

Re: [ovs-dev] [netdev 26/27] netdev-linux: Use dedicated netlink notification socket.

2013-08-09 Thread Alex Wang
Thanks for your explanation, Ben, want to as few more questions, > > +struct netdev *netdev_ = > netdev_from_name(change.ifname); > > > +if (netdev_ && > > > is_netdev_linux_class(netdev_->netdev_class)) { > > > > > > Want to confirm, at this if statement, is there

Re: [ovs-dev] [netdev 26/27] netdev-linux: Use dedicated netlink notification socket.

2013-08-09 Thread Ben Pfaff
On Fri, Aug 09, 2013 at 05:49:13PM -0700, Alex Wang wrote: > On Thu, Aug 1, 2013 at 2:29 PM, Ben Pfaff wrote: > > > +/* Returns a NETLINK_ROUTE socket listening for RTNLGRP_LINK changes, or > > NULL > > + * if no such socket could be created. */ > > +static struct nl_sock * > > +netdev_linux_noti

Re: [ovs-dev] [netdev 26/27] netdev-linux: Use dedicated netlink notification socket.

2013-08-09 Thread Alex Wang
Hey Ben, few comments inline, On Thu, Aug 1, 2013 at 2:29 PM, Ben Pfaff wrote: > +/* Returns a NETLINK_ROUTE socket listening for RTNLGRP_LINK changes, or > NULL > + * if no such socket could be created. */ > +static struct nl_sock * > +netdev_linux_notify_sock(void) > +{ > + > +} >

[ovs-dev] [netdev 26/27] netdev-linux: Use dedicated netlink notification socket.

2013-08-01 Thread Ben Pfaff
The rtnetlink_link asynchronous netlink notifications seem somewhat troublesome in a threaded environment. It seems more straightforward to have netdev-linux fend for itself. Signed-off-by: Ben Pfaff --- lib/netdev-linux.c | 172 +++- 1 file chan