From 7acbee63445be437217cb117a95671896ab3ee18 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 19 Mar 2009 11:14:55 -0700 Subject: [PATCH] secchan: Fix rate-limiting statistics reporting. The n_queue_dropped value wasn't being updated at all. n_tx_dropped wasn't being updated either but the packet scheduler no longer has enough information to track it, so this statistic has just been dropped. --- secchan/pinsched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/secchan/pinsched.c b/secchan/pinsched.c index 6ab09dae..51e70a36 100644 --- a/secchan/pinsched.c +++ b/secchan/pinsched.c @@ -72,7 +72,6 @@ struct pinsched { unsigned long long n_normal; /* # txed w/o rate limit queuing. */ unsigned long long n_limited; /* # queued for rate limiting. */ unsigned long long n_queue_dropped; /* # dropped due to queue overflow. */ - unsigned long long n_tx_dropped; /* # dropped due to tx overflow. */ /* Switch status. */ struct status_category *ss_cat; @@ -101,6 +100,8 @@ drop_packet(struct pinsched *ps) unsigned int port_no; struct ofp_queue *q; + ps->n_queue_dropped++; + longest = port_array_first(&ps->queues, &port_no); longest_port_no = port_no; n_longest = 1; @@ -205,7 +206,6 @@ pinsched_status_cb(struct status_reply *sr, void *ps_) status_reply_put(sr, "normal=%llu", ps->n_normal); status_reply_put(sr, "limited=%llu", ps->n_limited); status_reply_put(sr, "queue-dropped=%llu", ps->n_queue_dropped); - status_reply_put(sr, "tx-dropped=%llu", ps->n_tx_dropped); } void @@ -256,7 +256,6 @@ pinsched_create(int rate_limit, int burst_limit, struct switch_status *ss) ps->n_normal = 0; ps->n_limited = 0; ps->n_queue_dropped = 0; - ps->n_tx_dropped = 0; if (ss) { ps->ss_cat = switch_status_register(ss, "rate-limit", -- 2.30.2