1
0
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:
Jonathan Lemon 2000-05-06 15:53:59 +00:00
parent fe43d8e2e0
commit 3e48370f70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60102
2 changed files with 12 additions and 4 deletions

View File

@ -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.

View File

@ -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.