Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137281966
D53871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53871.diff
View Options
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -2296,7 +2296,6 @@
void
bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen)
{
- struct epoch_tracker et;
struct bintime bt;
struct bpf_d *d;
#ifdef BPF_JITTER
@@ -2305,8 +2304,9 @@
u_int slen;
int gottime;
+ NET_EPOCH_ASSERT();
+
gottime = BPF_TSTAMP_NONE;
- NET_EPOCH_ENTER(et);
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
counter_u64_add(d->bd_rcount, 1);
/*
@@ -2339,7 +2339,6 @@
BPFD_UNLOCK(d);
}
}
- NET_EPOCH_EXIT(et);
}
void
@@ -2360,7 +2359,6 @@
void
bpf_mtap(struct bpf_if *bp, struct mbuf *m)
{
- struct epoch_tracker et;
struct bintime bt;
struct bpf_d *d;
#ifdef BPF_JITTER
@@ -2369,6 +2367,8 @@
u_int pktlen, slen;
int gottime;
+ NET_EPOCH_ASSERT();
+
/* Skip outgoing duplicate packets. */
if ((m->m_flags & M_PROMISC) != 0 && m_rcvif(m) == NULL) {
m->m_flags &= ~M_PROMISC;
@@ -2378,7 +2378,6 @@
pktlen = m_length(m, NULL);
gottime = BPF_TSTAMP_NONE;
- NET_EPOCH_ENTER(et);
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
if (BPF_CHECK_DIRECTION(d, m_rcvif(m), bp->bif_ifp))
continue;
@@ -2406,7 +2405,6 @@
BPFD_UNLOCK(d);
}
}
- NET_EPOCH_EXIT(et);
}
void
@@ -2425,13 +2423,14 @@
void
bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m)
{
- struct epoch_tracker et;
struct bintime bt;
struct mbuf mb;
struct bpf_d *d;
u_int pktlen, slen;
int gottime;
+ NET_EPOCH_ASSERT();
+
/* Skip outgoing duplicate packets. */
if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) {
m->m_flags &= ~M_PROMISC;
@@ -2452,7 +2451,6 @@
gottime = BPF_TSTAMP_NONE;
- NET_EPOCH_ENTER(et);
CK_LIST_FOREACH(d, &bp->bif_dlist, bd_next) {
if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp))
continue;
@@ -2472,7 +2470,6 @@
BPFD_UNLOCK(d);
}
}
- NET_EPOCH_EXIT(et);
}
void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 23, 12:54 AM (11 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25992642
Default Alt Text
D53871.diff (1 KB)
Attached To
Mode
D53871: bpf: don't recursively enter the network epoch in bpf taps
Attached
Detach File
Event Timeline
Log In to Comment