From: Ben Pfaff Date: Thu, 16 Sep 2010 22:38:10 +0000 (-0700) Subject: netdev-linux: Fix off-by-one error dumping queue stats. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5590e7e4114253bc5b84b494dba18be24e6073f;p=openvswitch netdev-linux: Fix off-by-one error dumping queue stats. 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. --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index e1a3c8c4..2ea411dc 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -2659,7 +2659,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; }