From: Jesse Gross Date: Wed, 16 Sep 2009 18:03:42 +0000 (-0700) Subject: netdev-linux: Set missing cache validity bit. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edaa959f6b5100361a6af2e5c68ca6abb94bf838;p=openvswitch netdev-linux: Set missing cache validity bit. Whether a port is internal is cached to avoid requerying the kernel every time stats are requested. However, the cache vality bit was never being set so the cache wasn't used. This corrects that oversight. Thanks to Ben Pfaff for noticing. --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 7fde7e0a..2faffa34 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -654,6 +654,8 @@ netdev_linux_get_stats(const struct netdev *netdev_, struct netdev_stats *stats) "openvswitch"); } } + + netdev->cache->valid |= VALID_IS_INTERNAL; } if (netdev->cache->is_internal) {