[PATCH 1/2] if_tsec: Fix input statistic counters
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Mar 8 07:09:52 UTC 2017
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
More information about the freebsd-net
mailing list