From d5590e7e4114253bc5b84b494dba18be24e6073f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 16 Sep 2010 15:38:10 -0700 Subject: [PATCH] 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. --- lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2