- packets on the input interface were counted twice

- Use IFQ_HANDOFF instead of rolling our own
This commit is contained in:
Andrew Thompson 2007-05-20 03:21:59 +00:00
parent 98069bca33
commit 6469e186ad

View File

@ -1078,8 +1078,6 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
m = (*sc->sc_input)(sc, lp, m);
if (m != NULL) {
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
trifp->if_ipackets++;
trifp->if_ibytes += m->m_pkthdr.len;
}
@ -1271,17 +1269,7 @@ lagg_enqueue(struct ifnet *ifp, struct mbuf *m)
{
int error = 0;
/* Send mbuf */
IFQ_ENQUEUE(&ifp->if_snd, m, error);
if (error)
return (error);
if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0)
(*ifp->if_start)(ifp);
ifp->if_obytes += m->m_pkthdr.len;
if (m->m_flags & M_MCAST)
ifp->if_omcasts++;
IFQ_HANDOFF(ifp, m, error);
return (error);
}