netdev-linux: Cache flags using netlink.
authorEthan Jackson <ethan@nicira.com>
Tue, 14 Feb 2012 02:07:44 +0000 (18:07 -0800)
committerEthan Jackson <ethan@nicira.com>
Wed, 15 Feb 2012 00:40:43 +0000 (16:40 -0800)
commitc37d4da4f0fd0190ea8fef97399df6d27ebf6ee2
tree64408e34e02ec83e290285162e356c78bbd7b55d
parent755be9ea9d7250edd37e1056362e08a7436f6983
netdev-linux: Cache flags using netlink.

Before this patch, every request for a 'netdev_dev''s flags
required an ioctl call.  This occurred every time
netdev_get_carrier() was called, which theoretically was very often
if there were a large number of devices.  We were already using
netlink to keep track of the IFF_RUNNING flag. This patch
generalizes the code to keep track of all flags using the same
netlink code.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/netdev-linux.c
lib/rtnetlink-link.c
lib/rtnetlink-link.h