summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-05-11 10:50:23 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-05-11 10:50:23 +0000
commitc90244f6defaa4812914477d29628d6e6cd3fc2c (patch)
treee06425229d0baa2e6a65945fbf4708a77d3461e5
parent2160281c59ce6069aac0fe74c6812b141f706baf (diff)
Increment drop counter on the enqueue failure
-rw-r--r--sys/net/fq_codel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/net/fq_codel.c b/sys/net/fq_codel.c
index db871c2b333..eca603450de 100644
--- a/sys/net/fq_codel.c
+++ b/sys/net/fq_codel.c
@@ -527,8 +527,13 @@ fqcodel_enq(struct ifqueue *ifq, struct mbuf *m)
backlog = codel_backlog(&flow->cd);
}
}
+
KASSERT(flow != NULL);
m = codel_commit(&flow->cd, NULL);
+
+ fqc->drop_cnt.packets++;
+ fqc->drop_cnt.bytes += m->m_pkthdr.len;
+
DPRINTF("%s: dropping from flow %u\n", __func__,
flow->id);
return (m);