From 35199f53533918cdfd1abc6939f0ae4f8ef40fbb Mon Sep 17 00:00:00 2001 From: Vlad Zolotarov Date: Mon, 20 Apr 2015 11:32:46 +0300 Subject: [PATCH] net: Add a qp_stats.rx.bad.no_mem counter Add a new statistics counter for packets dropped due to allocation failure. Signed-off-by: Vlad Zolotarov --- net/net.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/net.hh b/net/net.hh index a7c20f0274..a66bbf85f5 100644 --- a/net/net.hh +++ b/net/net.hh @@ -192,6 +192,12 @@ struct qp_stats { ++total; } + void inc_no_mem() { + ++no_mem; + ++total; + } + + uint64_t no_mem; // Packets dropped due to allocation failure uint64_t total; // total number of erroneous packets uint64_t csum; // packets with bad checksum } bad;