diff options
author | Hartmut Brandt <harti@FreeBSD.org> | 2003-08-05 13:45:54 +0000 |
---|---|---|
committer | Hartmut Brandt <harti@FreeBSD.org> | 2003-08-05 13:45:54 +0000 |
commit | 01647af570b32ac639a77e443b75c799fe689a80 (patch) | |
tree | aa4f6a28705f47fd335567f85e5ded6a61572cd6 /sys/dev/en/midway.c | |
parent | 865613a3d45a8464be101e10dca3060d739deba8 (diff) | |
download | src-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.c | 9 |
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); |