From nobody Fri Jul 05 15:14:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WFxrJ3ZHtz5Pg8B; Fri, 05 Jul 2024 15:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WFxrJ346qz4Gbb; Fri, 5 Jul 2024 15:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJte0R5Dj61iIraxldUB2H1DzO7AYozqLIHRenVKDmE=; b=Gilc9E0DiLKZj+qSU5mJSHQUK1cd7dtxCofWuwtD/WPbIRqnBSYrKKh5EACXBA7Egy9pk9 wKsKMmm6dc4ir60cpvnp6fX20B9Mpn8e5kMvQokWEa61nGQ1v+6dNXMSbyXmEkrZ6kFUWC jwpE+1y5kLUEQR5G17H9zyqfrojilCn9/RS2CUu6DggZdHZQr4tmRyNBpnkZgs88ZDPtNj uGO7xguO8d5IRxV63G4lH3LJGHa/abKGnTUCas8vwtz53EV0a/Z5CFIRVJ+rNuuVhtanUD 5PvNhJUUeNS0gsONIePUTTfCNEAPeNG1Z0SLxhyT0BQfk6y+2iFavXPmVTZlFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720192464; a=rsa-sha256; cv=none; b=ov5wjbToppKjBts2trnNs/sQuB4Aeu5g06rDJ3zuUOAmpU+vqCyVtJc/2d4ZSEw87BZ0u5 NeuhCLzjWdh169v5JP0Wa4O2Q1EpZ0kRo6YAAo/l8YEfZfZV8zjxBVTYtCBjeL/6q5BUPf qW1iG95AszJSXeXGetMZn4WQJARSi2zwbCqgEiIbY+HmVN5gkDuTY09NeIsT/EIuno1tGR QEuJqG6uoguetxpn8JdlNg8lOHUy75YB1fghYzlgiT4EHKkZ8oSHq36AYy3mOjy0OLlYZr AfVpXedpYFT7xjdLFpOCJGty/gRlXDGqd3KMaBvJQYlHGpMOSCAvoVsOXkV4Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720192464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJte0R5Dj61iIraxldUB2H1DzO7AYozqLIHRenVKDmE=; b=Rjje62TUV9gxILyxFTv4/NztsBG+74FaAKxpXRozWaZ3dHyL7g0nGqSU0J0zctcgApVvBB olAzevWZ20Scao8C7NR9eUVi7QCrKSk3nvt8EbRjvnkRXNe1vqWg/82F76lEeLD2SFcfyn D/fsnUFMY1O+H239p8Ie+Iu4CRjKtpnVAdULerhenShJ1vqTSmYL4gKrj/wvZS2a9SVXXn a19HKAASGS29jx1tfukYhG8lUstWUfd9t4y3+urksE1U8z1UN+b9TCUlNCd32a6YScbHf3 Tb1MY17pggwvf+KwZvNEzg79LGhJHxNJWKt+44S388Vi/2bXYOY4rlvaglZtuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WFxrJ2Djcz120n; Fri, 5 Jul 2024 15:14:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 465FEOnc098944; Fri, 5 Jul 2024 15:14:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 465FEOxP098941; Fri, 5 Jul 2024 15:14:24 GMT (envelope-from git) Date: Fri, 5 Jul 2024 15:14:24 GMT Message-Id: <202407051514.465FEOxP098941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 338bb091008f - stable/14 - ifnet: Use NET_EPOCH_WAIT() macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 338bb091008f32fda5cdd8cf9484fa942fa0937c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=338bb091008f32fda5cdd8cf9484fa942fa0937c commit 338bb091008f32fda5cdd8cf9484fa942fa0937c Author: Zhenlei Huang AuthorDate: 2024-06-24 09:57:14 +0000 Commit: Zhenlei Huang 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);