[ovs-dev] [PATCH] netdev-linux: Set missing cache validity bit.

Jesse Gross jesse at nicira.com
Wed Sep 16 18:08:55 UTC 2009


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 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 7fde7e0..2faffa3 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) {
-- 
1.6.0.4





More information about the dev mailing list