[ovs-dev] [PATCH 2/3] netdev-linux: Fix off-by-one error dumping queue stats.

Ben Pfaff blp at nicira.com
Thu Sep 16 22:42:42 UTC 2010


Linux kernel queue numbers are one greater than OpenFlow queue numbers, for
HTB anyhow.  The code to dump queues wasn't compensating for this, so this
commit fixes it up.
---
 lib/netdev-linux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index e6036bf..f2afc35 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2621,7 +2621,7 @@ htb_class_dump_stats(const struct netdev *netdev OVS_UNUSED,
     major = tc_get_major(handle);
     minor = tc_get_minor(handle);
     if (major == 1 && minor > 0 && minor <= HTB_N_QUEUES) {
-        (*cb)(tc_get_minor(handle), &stats, aux);
+        (*cb)(minor - 1, &stats, aux);
     }
     return 0;
 }
-- 
1.7.1





More information about the dev mailing list