summaryrefslogtreecommitdiffstats
path: root/sys/dev/en
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-08-05 13:45:54 +0000
committerharti <harti@FreeBSD.org>2003-08-05 13:45:54 +0000
commit900a53301d1a56dc97a99fea6254817ceb2a2664 (patch)
treeaa4f6a28705f47fd335567f85e5ded6a61572cd6 /sys/dev/en
parent22492bf3763e945fb1f4396d2a49500724e707aa (diff)
downloadFreeBSD-src-900a53301d1a56dc97a99fea6254817ceb2a2664.zip
FreeBSD-src-900a53301d1a56dc97a99fea6254817ceb2a2664.tar.gz
Implement per-VC statistics.
Diffstat (limited to 'sys/dev/en')
-rw-r--r--sys/dev/en/midway.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c
index f9bf95f..a30b9d5 100644
--- a/sys/dev/en/midway.c
+++ b/sys/dev/en/midway.c
@@ -776,7 +776,10 @@ en_txdma(struct en_softc *sc, struct en_txslot *slot)
EN_COUNT(sc->stats.launch);
sc->ifatm.ifnet.if_opackets++;
-
+
+ sc->vccs[tx.vci]->opackets++;
+ sc->vccs[tx.vci]->obytes += tx.datalen;
+
#ifdef ENABLE_BPF
if (sc->ifatm.ifnet.if_bpf != NULL) {
/*
@@ -1887,6 +1890,10 @@ en_rx_drain(struct en_softc *sc, u_int drq)
m->m_pkthdr.rcvif = &sc->ifatm.ifnet;
sc->ifatm.ifnet.if_ipackets++;
+
+ vc->ipackets++;
+ vc->ibytes += m->m_pkthdr.len;
+
#ifdef EN_DEBUG
if (sc->debug & DBG_IPACKETS)
en_dump_packet(sc, m);
OpenPOWER on IntegriCloud