netdev-linux: Fix off-by-one error dumping queue stats.
authorBen Pfaff <blp@nicira.com>
Thu, 16 Sep 2010 22:38:10 +0000 (15:38 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 6 Oct 2010 00:00:21 +0000 (17:00 -0700)
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

index e6036bf..f2afc35 100644 (file)
@@ -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;
 }