diff options
author | jmallett <jmallett@FreeBSD.org> | 2011-01-10 22:14:30 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2011-01-10 22:14:30 +0000 |
commit | d4de086c11833121ebdf4ae6ef54a9bf4ece0f9e (patch) | |
tree | cb03813e6d1b6d18e57c0ac4c0e7dfc5a2087fc7 /sys/mips/cavium/if_octm.c | |
parent | 73877a6f553658a6cfe74817a182a5470b5990a7 (diff) | |
download | FreeBSD-src-d4de086c11833121ebdf4ae6ef54a9bf4ece0f9e.zip FreeBSD-src-d4de086c11833121ebdf4ae6ef54a9bf4ece0f9e.tar.gz |
Count output bytes and packets.
Diffstat (limited to 'sys/mips/cavium/if_octm.c')
-rw-r--r-- | sys/mips/cavium/if_octm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/mips/cavium/if_octm.c b/sys/mips/cavium/if_octm.c index bcf80e7..f2db3a9 100644 --- a/sys/mips/cavium/if_octm.c +++ b/sys/mips/cavium/if_octm.c @@ -333,9 +333,12 @@ octm_transmit(struct ifnet *ifp, struct mbuf *m) result = cvmx_mgmt_port_sendm(sc->sc_port, m); - if (result == CVMX_MGMT_PORT_SUCCESS) + if (result == CVMX_MGMT_PORT_SUCCESS) { ETHER_BPF_MTAP(ifp, m); - else + + ifp->if_opackets++; + ifp->if_obytes += m->m_pkthdr.len; + } else ifp->if_oerrors++; m_freem(m); |