netdev-linux: Set missing cache validity bit.
authorJesse Gross <jesse@nicira.com>
Wed, 16 Sep 2009 18:03:42 +0000 (11:03 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 16 Sep 2009 18:03:42 +0000 (11:03 -0700)
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.

lib/netdev-linux.c

index 7fde7e0..2faffa3 100644 (file)
@@ -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) {