dpaa2: allow tapping of tx packets in dpni

Packet capturing on dpni is only half-working given the BPF_MTAP call
in the TX path is missing. Add it to see packets in both directions.

Reviewed by:	dsl
Differential Revision: https://reviews.freebsd.org/D47103

(cherry picked from commit e69e172d40585cfbcfdb28433cec523ca4867cf1)
This commit is contained in:
Bjoern A. Zeeb 2024-10-13 23:14:35 +00:00
parent 217024001f
commit 9e596eab21

View file

@ -2936,6 +2936,8 @@ dpaa2_ni_tx(struct dpaa2_ni_softc *sc, struct dpaa2_channel *ch,
KASSERT(btx->fq->chan == ch, ("%s: unexpected channel", __func__));
#endif /* INVARIANTS */
BPF_MTAP(sc->ifp, m);
error = bus_dmamap_load_mbuf_sg(buf->dmat, buf->dmap, m, segs, &nsegs,
BUS_DMA_NOWAIT);
if (__predict_false(error != 0)) {