Date: Wed, 8 Mar 2017 08:09:45 +0100 From: Sebastian Huber <sebastian.huber@embedded-brains.de> To: freebsd-net@freebsd.org Cc: Sebastian Huber <sebastian.huber@embedded-brains.de> Subject: [PATCH 1/2] if_tsec: Fix input statistic counters Message-ID: <1488956986-12015-1-git-send-email-sebastian.huber@embedded-brains.de>
next in thread | raw e-mail | index | archive | help
Do not count discared frames due to lack of buffers as input errors.
---
sys/dev/tsec/if_tsec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c
index 2a8c3e2..66ee130 100644
--- a/sys/dev/tsec/if_tsec.c
+++ b/sys/dev/tsec/if_tsec.c
@@ -1398,7 +1398,7 @@ tsec_receive_intr_locked(struct tsec_softc *sc, int count)
if (tsec_new_rxbuf(sc->tsec_rx_mtag, rx_data[i].map,
&rx_data[i].mbuf, &rx_data[i].paddr)) {
- if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
/*
* We ran out of mbufs; didn't consume current
* descriptor and have to return it to the queue.
@@ -1573,9 +1573,8 @@ tsec_error_intr_locked(struct tsec_softc *sc, int count)
TSEC_WRITE(sc, TSEC_REG_TSTAT, TSEC_TSTAT_THLT);
}
- /* Check receiver errors */
+ /* Check for discarded frame due to a lack of buffers */
if (eflags & TSEC_IEVENT_BSY) {
- if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
/* Get data from RX buffers */
--
1.8.4.5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1488956986-12015-1-git-send-email-sebastian.huber>
