mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Count output bytes and packets.
This commit is contained in:
parent
b37ccb6a0c
commit
449cf853ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217244
@ -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);
|
||||
|
@ -247,6 +247,9 @@ int cvm_oct_xmit(struct mbuf *m, struct ifnet *ifp)
|
||||
|
||||
/* Pass it to any BPF listeners. */
|
||||
ETHER_BPF_MTAP(ifp, m);
|
||||
|
||||
ifp->if_opackets++;
|
||||
ifp->if_obytes += m->m_pkthdr.len;
|
||||
}
|
||||
|
||||
/* Free mbufs not in use by the hardware */
|
||||
|
Loading…
Reference in New Issue
Block a user