summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium/if_octm.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2011-01-10 22:14:30 +0000
committerjmallett <jmallett@FreeBSD.org>2011-01-10 22:14:30 +0000
commitd4de086c11833121ebdf4ae6ef54a9bf4ece0f9e (patch)
treecb03813e6d1b6d18e57c0ac4c0e7dfc5a2087fc7 /sys/mips/cavium/if_octm.c
parent73877a6f553658a6cfe74817a182a5470b5990a7 (diff)
downloadFreeBSD-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.c7
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);
OpenPOWER on IntegriCloud