diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-05-11 10:50:23 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-05-11 10:50:23 +0000 |
commit | c90244f6defaa4812914477d29628d6e6cd3fc2c (patch) | |
tree | e06425229d0baa2e6a65945fbf4708a77d3461e5 | |
parent | 2160281c59ce6069aac0fe74c6812b141f706baf (diff) |
Increment drop counter on the enqueue failure
-rw-r--r-- | sys/net/fq_codel.c | 5 |
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); |