[ovs-dev] [PATCH] ofproto: Incorrect statistics will be increased

Ken Ajiro ken-ajiro at xr.jp.nec.com
Tue Dec 6 04:55:11 UTC 2016


When using controller packet-in rate limiting (controller_rate_limit in
controller table), incorrect statistics will be increased. This patch
fixes this issue.

Signed-off-by: Ken Ajiro <ken-ajiro at xr.jp.nec.com>
---
 ofproto/connmgr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c
index 4b927d6..bfd1ff5 100644
--- a/ofproto/connmgr.c
+++ b/ofproto/connmgr.c
@@ -539,7 +539,7 @@ connmgr_get_controller_info(struct connmgr *mgr, struct shash *info)
 
             for (i = 0; i < N_SCHEDULERS; i++) {
                 if (ofconn->schedulers[i]) {
-                    const char *name = i ? "miss" : "action";
+                    const char *name = i == 0 ? "miss" : "action";
                     struct pinsched_stats stats;
 
                     pinsched_get_stats(ofconn->schedulers[i], &stats);
-- 
1.7.0.4


More information about the dev mailing list