2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 05:18:13 +00:00

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.
This commit is contained in:
Ben Pfaff 2010-09-16 15:38:10 -07:00
parent d2805da2cb
commit d5590e7e41

View File

@ -2659,7 +2659,7 @@ htb_class_dump_stats(const struct netdev *netdev OVS_UNUSED,
major = tc_get_major(handle); major = tc_get_major(handle);
minor = tc_get_minor(handle); minor = tc_get_minor(handle);
if (major == 1 && minor > 0 && minor <= HTB_N_QUEUES) { if (major == 1 && minor > 0 && minor <= HTB_N_QUEUES) {
(*cb)(tc_get_minor(handle), &stats, aux); (*cb)(minor - 1, &stats, aux);
} }
return 0; return 0;
} }