Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2024 17:44:36 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e69e172d4058 - main - dpaa2: allow tapping of tx packets in dpni
Message-ID:  <202410141744.49EHia8n015569@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=e69e172d40585cfbcfdb28433cec523ca4867cf1

commit e69e172d40585cfbcfdb28433cec523ca4867cf1
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-10-13 23:14:35 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-10-14 17:41:35 +0000

    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.
    
    MFC after:      3 days
    Reviewed by:    dsl
    Differential Revision: https://reviews.freebsd.org/D47103
---
 sys/dev/dpaa2/dpaa2_ni.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c
index 622e63626bfe..698b440376e3 100644
--- a/sys/dev/dpaa2/dpaa2_ni.c
+++ b/sys/dev/dpaa2/dpaa2_ni.c
@@ -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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410141744.49EHia8n015569>