Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102862868
D35968.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D35968.diff
View Options
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1143,7 +1143,7 @@
* which lead to leave group calls, which in turn access the
* belonging ifnet structure:
*/
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
/*
* In any case (destroy or vmove) detach us from the groups
@@ -4206,7 +4206,7 @@
* fixes issues about late invocation of if_destroy(), which leads
* to memory leak from if_com_alloc[type] allocated if_l2com.
*/
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
if_com_alloc[type] = NULL;
if_com_free[type] = NULL;
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -600,7 +600,7 @@
BRIDGE_LIST_LOCK_DESTROY();
/* Callbacks may use the UMA zone. */
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
uma_zdestroy(V_bridge_rtnode_zone);
}
diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -1509,7 +1509,7 @@
fib_cleanup_algo(rh, true, false);
/* Drain cb so user can unload the module after userret if so desired */
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
return (0);
}
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -299,7 +299,7 @@
* nexthops deletions will be scheduled for the next epoch run
* and will be completed after vnet teardown.
*/
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
free(V_rt_tables, M_RTABLE);
vnet_rtzone_destroy();
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -5186,7 +5186,7 @@
break;
}
/* Ensure there's no more ethernet rules to clean up. */
- epoch_drain_callbacks(net_epoch_preempt);
+ NET_EPOCH_DRAIN_CALLBACKS();
PF_RULES_WLOCK();
for (i = 0, ioe = ioes; i < io->size; i++, ioe++) {
ioe->anchor[sizeof(ioe->anchor) - 1] = '\0';
diff --git a/sys/sys/epoch.h b/sys/sys/epoch.h
--- a/sys/sys/epoch.h
+++ b/sys/sys/epoch.h
@@ -109,6 +109,7 @@
#define NET_EPOCH_EXIT(et) epoch_exit_preempt(net_epoch_preempt, &(et))
#define NET_EPOCH_WAIT() epoch_wait_preempt(net_epoch_preempt)
#define NET_EPOCH_CALL(f, c) epoch_call(net_epoch_preempt, (f), (c))
+#define NET_EPOCH_DRAIN_CALLBACKS() epoch_drain_callbacks(net_epoch_preempt)
#define NET_EPOCH_ASSERT() MPASS(in_epoch(net_epoch_preempt))
#define NET_TASK_INIT(t, p, f, c) TASK_INIT_FLAGS(t, p, f, c, TASK_NETWORK)
#define NET_GROUPTASK_INIT(gtask, prio, func, ctx) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 3:36 AM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14709720
Default Alt Text
D35968.diff (2 KB)
Attached To
Mode
D35968: Introduce and use the NET_EPOCH_DRAIN_CALLBACKS() macro
Attached
Detach File
Event Timeline
Log In to Comment