Date: Fri, 5 Jul 2024 15:14:24 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 338bb091008f - stable/14 - ifnet: Use NET_EPOCH_WAIT() macro Message-ID: <202407051514.465FEOxP098941@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=338bb091008f32fda5cdd8cf9484fa942fa0937c commit 338bb091008f32fda5cdd8cf9484fa942fa0937c Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-07-05 15:11:51 +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 (cherry picked from commit 71f8fbf9bda43e3ca2f26d0499b7a88d0f2f7352) --- 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 1ca0893eb724..7c282277cb59 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -596,7 +596,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) @@ -1134,7 +1134,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 @@ -1546,7 +1546,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407051514.465FEOxP098941>