aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/en/midway.c
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2003-08-05 13:45:54 +0000
committerHartmut Brandt <harti@FreeBSD.org>2003-08-05 13:45:54 +0000
commit01647af570b32ac639a77e443b75c799fe689a80 (patch)
treeaa4f6a28705f47fd335567f85e5ded6a61572cd6 /sys/dev/en/midway.c
parent865613a3d45a8464be101e10dca3060d739deba8 (diff)
downloadsrc-01647af570b32ac639a77e443b75c799fe689a80.tar.gz
src-01647af570b32ac639a77e443b75c799fe689a80.zip
Implement per-VC statistics.
Notes
Notes: svn path=/head/; revision=118495
Diffstat (limited to 'sys/dev/en/midway.c')
-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 f9bf95f59a67..a30b9d5de32d 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);