git: 71f8fbf9bda4 - main - ifnet: Use NET_EPOCH_WAIT() macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jun 2024 09:59:36 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352
commit 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-06-24 09:57:14 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-06-24 09:57:14 +0000
ifnet: Use NET_EPOCH_WAIT() macro
This makes it easier to grep the usage.
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45715
---
sys/net/if.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/net/if.c b/sys/net/if.c
index c3c27fbf678f..df405f088133 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -594,7 +594,7 @@ if_alloc_domain(u_char type, int numa_domain)
old = ifindex_table;
ck_pr_store_ptr(&ifindex_table, new);
if_indexlim = newlim;
- epoch_wait_preempt(net_epoch_preempt);
+ NET_EPOCH_WAIT();
free(old, M_IFNET);
}
if (idx > if_index)
@@ -1132,7 +1132,7 @@ if_detach_internal(struct ifnet *ifp, bool vmove)
* At this point we know the interface still was on the ifnet list
* and we removed it so we are in a stable state.
*/
- epoch_wait_preempt(net_epoch_preempt);
+ NET_EPOCH_WAIT();
/*
* Ensure all pending EPOCH(9) callbacks have been executed. This
@@ -1544,7 +1544,7 @@ _if_delgroup_locked(struct ifnet *ifp, struct ifg_list *ifgl,
}
IFNET_WUNLOCK();
- epoch_wait_preempt(net_epoch_preempt);
+ NET_EPOCH_WAIT();
EVENTHANDLER_INVOKE(group_change_event, groupname);
if (freeifgl) {
EVENTHANDLER_INVOKE(group_detach_event, ifgl->ifgl_group);