diff --git a/sys/dev/ubsec/ubsec.c b/sys/dev/ubsec/ubsec.c index b5c5a7c22e2f..278f2bba7438 100644 --- a/sys/dev/ubsec/ubsec.c +++ b/sys/dev/ubsec/ubsec.c @@ -595,13 +595,11 @@ ubsec_intr(void *arg) for (i = 0; i < npkts; i++) { if(q->q_stacked_mcr[i]) { ubsec_callback(sc, q->q_stacked_mcr[i]); - ubsecstats.hst_opackets++; } else { break; } } ubsec_callback(sc, q); - ubsecstats.hst_opackets++; } /* @@ -1517,6 +1515,9 @@ ubsec_callback(struct ubsec_softc *sc, struct ubsec_q *q) struct cryptodesc *crd; struct ubsec_dma *dmap = q->q_dma; + ubsecstats.hst_opackets++; + ubsecstats.hst_obytes += dmap->d_alloc.dma_size; + ubsec_dma_sync(&dmap->d_alloc, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); if (q->q_dst_map != NULL && q->q_dst_map != q->q_src_map) {