mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Bounce a copy of the mbuf to the bpf listener when we submit the frames
for transmit to the adapter, not when we receive a transmit interrupt indicating that they were sent. This fix now allows tcpdump to produce sane results by recording the timestamp at the point where the mbuf was actually transmitted.
This commit is contained in:
parent
fe43d8e2e0
commit
3e48370f70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60102
@ -3737,8 +3737,6 @@ tulip_tx_intr(
|
||||
TULIP_TXMAP_POSTSYNC(sc, map);
|
||||
sc->tulip_txmaps[sc->tulip_txmaps_free++] = map;
|
||||
#endif /* TULIP_BUS_DMA */
|
||||
if (sc->tulip_if.if_bpf != NULL)
|
||||
bpf_mtap(&sc->tulip_if, m);
|
||||
m_freem(m);
|
||||
#if defined(TULIP_DEBUG)
|
||||
} else {
|
||||
@ -4363,6 +4361,12 @@ tulip_txput(
|
||||
} while ((m0 = m0->m_next) != NULL);
|
||||
#endif /* TULIP_BUS_DMA */
|
||||
|
||||
/*
|
||||
* bounce a copy to the bpf listener, if any.
|
||||
*/
|
||||
if (sc->tulip_if.if_bpf != NULL)
|
||||
bpf_mtap(&sc->tulip_if, m);
|
||||
|
||||
/*
|
||||
* The descriptors have been filled in. Now get ready
|
||||
* to transmit.
|
||||
|
@ -3737,8 +3737,6 @@ tulip_tx_intr(
|
||||
TULIP_TXMAP_POSTSYNC(sc, map);
|
||||
sc->tulip_txmaps[sc->tulip_txmaps_free++] = map;
|
||||
#endif /* TULIP_BUS_DMA */
|
||||
if (sc->tulip_if.if_bpf != NULL)
|
||||
bpf_mtap(&sc->tulip_if, m);
|
||||
m_freem(m);
|
||||
#if defined(TULIP_DEBUG)
|
||||
} else {
|
||||
@ -4363,6 +4361,12 @@ tulip_txput(
|
||||
} while ((m0 = m0->m_next) != NULL);
|
||||
#endif /* TULIP_BUS_DMA */
|
||||
|
||||
/*
|
||||
* bounce a copy to the bpf listener, if any.
|
||||
*/
|
||||
if (sc->tulip_if.if_bpf != NULL)
|
||||
bpf_mtap(&sc->tulip_if, m);
|
||||
|
||||
/*
|
||||
* The descriptors have been filled in. Now get ready
|
||||
* to transmit.
|
||||
|
Loading…
Reference in New Issue
Block a user