From 3e48370f700d8d57256564c1fa2997fd35b23615 Mon Sep 17 00:00:00 2001 From: Jonathan Lemon 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(-) diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 32d68d0a9bf6..08351b3e689a 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 { @@ -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. diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 32d68d0a9bf6..08351b3e689a 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 { @@ -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. -- cgit v1.3