From dc25977c3ba7edfbef0e01b51bc5920cb8be8e8d Mon Sep 17 00:00:00 2001 From: jlemon Date: Sat, 6 May 2000 15:53:59 +0000 Subject: 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. --- sys/dev/de/if_de.c | 8 ++++++-- sys/pci/if_de.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 32d68d0..08351b3 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -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 { @@ -4364,6 +4362,12 @@ tulip_txput( #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. */ diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 32d68d0..08351b3 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -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 { @@ -4364,6 +4362,12 @@ tulip_txput( #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. */ -- cgit v1.1