drivers can report 2-3x times the number of actual packets being
transmitted by only incrementing the counter for descriptors with
buffers being freed.
ok kettenis@
-/* $OpenBSD: gem.c,v 1.76 2008/08/26 21:06:29 kettenis Exp $ */
+/* $OpenBSD: gem.c,v 1.77 2008/08/30 07:39:12 brad Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
bus_dmamap_unload(sc->sc_dmatag, sd->sd_map);
m_freem(sd->sd_mbuf);
sd->sd_mbuf = NULL;
+ ifp->if_opackets++;
}
sc->sc_tx_cnt--;
- ifp->if_opackets++;
if (++cons == GEM_NTXDESC)
cons = 0;
}
-/* $OpenBSD: if_cas.c,v 1.19 2008/05/31 22:49:03 kettenis Exp $ */
+/* $OpenBSD: if_cas.c,v 1.20 2008/08/30 07:39:12 brad Exp $ */
/*
*
bus_dmamap_unload(sc->sc_dmatag, sd->sd_map);
m_freem(sd->sd_mbuf);
sd->sd_mbuf = NULL;
+ ifp->if_opackets++;
}
sc->sc_tx_cnt--;
- ifp->if_opackets++;
if (++cons == CAS_NTXDESC)
cons = 0;
}