From nobody Tue Apr 14 15:57:41 2026 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 4fw87F3PB7z6Z2Xn; Tue, 14 Apr 2026 15:57:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fw87F1vwKz3JFm; Tue, 14 Apr 2026 15:57:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776182265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0jBsqrCJvuQLbw4R8tuIkHxRY6InPsBNx5ify9DBA6k=; b=pAPj4d47O5FD5pgJIvzbnc4f93fUMxNTdEeb+wLYA3jpYbnxyqxeVQV0seEgOmMeCDC9vT qmiruz3EwIUtaoapWPB2nGbdeXJJYXhm4W3MQb/K03xHdKPPvl5i440T+SgAwXRhs2ORCz NuUfCSA/7SSdL4XkgQbkG/R8IrQIQNuFdpUJsByC+y9Sv7Txf6PpVUdFwVtbVLVo+MiP7Y SbCNYyq0LU2ih145jArzc4IagDJrZnElgOg1NgjwWZzDXfrD6zOIaJHPx4OhiwhnO+o1pf XHtFicTrqlZlWNJiTirCHjqpUsApW5ger+HYXy89sIiN9F287ipsP//Mb3nm9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776182265; a=rsa-sha256; cv=none; b=GdrJrFzQgXkESQKEmA3xJdKo7mZYFIudxMdqw+JGZtsAuqlXar3ZHbrZBd3ZaynAdU8HMP Sbd/xcaSZ7XdPL7StTT2hk28pogZCQUujmKJqXtZ0is7k2NLzrVwx3IcFIwKA96qh2qoeF jNMVeW0DYmTFmmfcdQVHX7U/lAX+0SMGmZUunaupjfJHfK8VeIY+ZECNpdKMRpeEzFv7tZ UexjojnvknxWF/A/5+yBySs3BzLDl++JE9maQ/0JA3A4AFkiFa/UxSp4phiZ1xnWATCvAN Q5iyAS+twc/TutDmlUdyiSl8m9ML/h8xXdLppCBJ2W7Wm+KUaszXRCvlU+rYEA== 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=1776182265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0jBsqrCJvuQLbw4R8tuIkHxRY6InPsBNx5ify9DBA6k=; b=mgBAoBG2jI7jKkmVjK3iKt+oZeU4AEsRtHgo4Vfbj80t1j2ueRtHMmelMLI/mB7US1pilV amtzxqzN+tXumNeTauIukgCTqdXF9iok0baeNrWoiBo0YfOZ8u4Ixb2bgDrU34YRxQTaDD 1WxhmtvYod4d4X1VKRdiGWCmzeQuYls+RWq+mMDZoLPJj5ogdnSwPoXcHESPE4C45gVwbX rLklupmtNur2LGsg3J1scr3DKT7RmonnlcwarWO7WGI8NpY0KX0EOuCeHVWoJBoszPCx5p PzhIBT8qjcfCrm1nhQWgSIIoh7oK709dySr2Y6hTmhkf9OWF6T2U/sKqFC8uTA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R12" (not verified)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fw87D6fqLz49c; Tue, 14 Apr 2026 15:57:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 65CD1168BB; Tue, 14 Apr 2026 17:57:42 +0200 (CEST) From: Kristof Provost To: Zhenlei Huang Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: e9fc0c538264 - main - if_clone: Make ifnet_detach_sxlock opaque to consumers Date: Tue, 14 Apr 2026 17:57:41 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: In-Reply-To: <69dc7394.203c3.3a41c692@gitrepo.freebsd.org> References: <69dc7394.203c3.3a41c692@gitrepo.freebsd.org> 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: multipart/alternative; boundary="=_MailMate_4D2EEB50-D9A0-4561-A201-3D0996B9026B_=" --=_MailMate_4D2EEB50-D9A0-4561-A201-3D0996B9026B_= Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 13 Apr 2026, at 6:39, Zhenlei Huang wrote: > The branch main has been updated by zlei: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3De9fc0c538264355bd3fd9120c6500= 78281c2a290 > > commit e9fc0c538264355bd3fd9120c650078281c2a290 > Author: Zhenlei Huang > AuthorDate: 2026-04-13 04:38:44 +0000 > Commit: Zhenlei Huang > CommitDate: 2026-04-13 04:38:44 +0000 > > if_clone: Make ifnet_detach_sxlock opaque to consumers > > The change e133271fc1b5e introduced ifnet_detach_sxlock, and = > change > 6d2a10d96fb5 widened its coverage, but there are still consumers, > net80211 and tuntap e.g., want it. Instead of sprinkling it = > everywhere, > make it opaque to consumers. > > Out of tree drivers shall also benefit from this change. > > Reviewed by: kp > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D56298 I don=E2=80=99t really understand why, but this commit causes bricoler te= st = runs to fail for me. Or more precisely, it looks like parallel test runs see a number of = failures in the pf tests. Reverting only part of this change, specifically this: diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index db3db78c1b76..d0fe54b6146b 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -683,11 +683,12 @@ if_clone_detach(struct if_clone *ifc) V_if_cloners_count--; IF_CLONERS_UNLOCK(); - sx_xlock(&ifnet_detach_sxlock); /* destroy all interfaces for this cloner */ - while (!LIST_EMPTY(&ifc->ifc_iflist)) + while (!LIST_EMPTY(&ifc->ifc_iflist)) { + sx_xlock(&ifnet_detach_sxlock); if_clone_destroyif_flags(ifc, = LIST_FIRST(&ifc->ifc_iflist), IFC_F_FORCE); - sx_xunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); + } IF_CLONE_REMREF(ifc); } Seems to be enough to avoid the problem. So it looks like somehow = deleting all interfaces for a given cloner under that lock (rather than = releasing it and re-acquiring it) causes the test failures. The failing tests I see are: sys/netpfil/pf/divert-to:in_div -> failed: Test case body returned a = non-ok exit code, but this is not allowed [36.591s] sys/netpfil/pf/divert-to:in_div_in -> failed: atf-check failed; see = the output of the test for details [30.867s] sys/netpfil/pf/divert-to:in_div_in_fwd_out_div_out -> failed: = atf-check failed; see the output of the test for details [39.705s] sys/netpfil/pf/divert-to:in_dn_in_div_in_out_div_out_dn_out -> = failed: atf-check failed; see the output of the test for details = [45.059s] sys/netpfil/pf/divert-to:out_div -> failed: Test case body returned a = non-ok exit code, but this is not allowed [23.629s] sys/netpfil/pf/killstate:gateway -> failed: Killing with a different = gateway removed the state. [32.803s] sys/netpfil/pf/killstate:id -> failed: Killing a different ID removed = the state. [32.789s] sys/netpfil/pf/killstate:label -> failed: Killing a non-existing = label removed the state. [47.749s] sys/netpfil/pf/killstate:multilabel -> failed: Setting new rules = removed the state. [43.570s] sys/netpfil/pf/killstate:src_dst -> failed: Killing with the wrong = destination IP removed our state. [57.819s] sys/netpfil/pf/killstate:v6 -> failed: Killing with the wrong IP = removed our state. [54.957s] sys/netpfil/pf/nat64:pool -> failed: atf-check failed; see the output = of the test for details [51.118s] sys/netpfil/pf/nat64:sctp_in -> failed: Failed to connect to SCTP = server [55.495s] sys/netpfil/pf/nat64.py:TestNAT64::test_udp_checksum -> failed: = /usr/tests/sys/netpfil/pf/nat64.py:205: AttributeError [80.001s] sys/netpfil/pf/pflog:matches -> failed: atf-check failed; see the = output of the test for details [61.807s] sys/netpfil/pf/pflog:matches_logif -> failed: atf-check failed; see = the output of the test for details [51.261s] sys/netpfil/pf/pflog:unspecified_v6 -> failed: atf-check failed; see = the output of the test for details [36.281s] sys/netpfil/pf/rdr:srcport_pass -> failed: atf-check failed; see the = output of the test for details [76.815s] sys/netpfil/pf/sctp:pfsync -> failed: Initial SCTP connection failed = [134.866s] sys/netpfil/pf/sctp:related_icmp -> failed: SCTP connection failed = [59.620s] sys/netpfil/pf/table:zero_one -> failed: atf-check failed; see the = output of the test for details [64.125s] sys/netpfil/pf/tcp:rst -> failed: atf-check failed; see the output of = the test for details [80.261s] Looking at it now, those runtimes seems suspiciously high as well. Best regards, Kristof --=_MailMate_4D2EEB50-D9A0-4561-A201-3D0996B9026B_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 13 Apr 2026, at 6:39, Zhenlei Huang wrote:

The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3De9fc0c538264355bd3fd9120c650078281c2a290

commit e9fc0c538264355bd3fd9120c650078281c2a290
Author: Zhenlei Huang zlei@FreeBS= D.org
AuthorDate: 2026-04-13 04:38:44 +0000
Commit: Zhenlei Huang zlei@FreeBS= D.org
CommitDate: 2026-04-13 04:38:44 +0000

if=
_clone: Make ifnet_detach_sxlock opaque to consumers

The change e133271fc1b5e introduced ifnet_detach_sxlock, and change
6d2a10d96fb5 widened its coverage, but there are still consumers,
net80211 and tuntap e.g., want it. Instead of sprinkling it everywhere,
make it opaque to consumers.

Out of tree drivers shall also benefit from this change.

Reviewed by:    kp
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56298

I don=E2=80=99t really understand why, but this commit ca= uses bricoler test runs to fail for me.
Or more precisely, it looks like parallel test runs see a number of failu= res in the pf tests.

Reverting only part of this change, specifically this:

di=
ff --git a/sys/net/if_clone.c b/sys/net/if_clone.c
index db3db78c1b76..d0fe54b6146b 100644
--- a/sys/net/if_clone.c
+++ b/sys/net/if_clone.c
@@ -683,11 +683,12 @@ if_clone_detach(struct if_clone *ifc)
        V_if_cloners_count--;
        IF_CLONERS_UNLOCK();

-       sx_xlock(&ifnet_detach_sxlock);
        /* destroy all interfaces for this cloner */
-       while (!LIST_EMPTY(&ifc->ifc_iflist))
+       while (!LIST_EMPTY(&ifc->ifc_iflist)) {
+               sx_xlock(&ifnet_detach_sxlock);
                if_clone_destroyif_flags(ifc, LIST_FIRST(&ifc->ifc=
_iflist), IFC_F_FORCE);
-       sx_xunlock(&ifnet_detach_sxlock);
+               sx_xunlock(&ifnet_detach_sxlock);
+       }

        IF_CLONE_REMREF(ifc);
 }

Seems to be enough to avoid the problem. So it looks like= somehow deleting all interfaces for a given cloner under that lock (rath= er than releasing it and re-acquiring it) causes the test failures.

The failing tests I see are:

sy=
s/netpfil/pf/divert-to:in_div  ->  failed: Test case body returned a n=
on-ok exit code, but this is not allowed  [36.591s]
sys/netpfil/pf/divert-to:in_div_in  ->  failed: atf-check failed; see =
the output of the test for details  [30.867s]
sys/netpfil/pf/divert-to:in_div_in_fwd_out_div_out  ->  failed: atf-ch=
eck failed; see the output of the test for details  [39.705s]
sys/netpfil/pf/divert-to:in_dn_in_div_in_out_div_out_dn_out  ->  faile=
d: atf-check failed; see the output of the test for details  [45.059s]
sys/netpfil/pf/divert-to:out_div  ->  failed: Test case body returned =
a non-ok exit code, but this is not allowed  [23.629s]
sys/netpfil/pf/killstate:gateway  ->  failed: Killing with a different=
 gateway removed the state.  [32.803s]
sys/netpfil/pf/killstate:id  ->  failed: Killing a different ID remove=
d the state.  [32.789s]
sys/netpfil/pf/killstate:label  ->  failed: Killing a non-existing lab=
el removed the state.  [47.749s]
sys/netpfil/pf/killstate:multilabel  ->  failed: Setting new rules rem=
oved the state.  [43.570s]
sys/netpfil/pf/killstate:src_dst  ->  failed: Killing with the wrong d=
estination IP removed our state.  [57.819s]
sys/netpfil/pf/killstate:v6  ->  failed: Killing with the wrong IP rem=
oved our state.  [54.957s]
sys/netpfil/pf/nat64:pool  ->  failed: atf-check failed; see the outpu=
t of the test for details  [51.118s]
sys/netpfil/pf/nat64:sctp_in  ->  failed: Failed to connect to SCTP se=
rver  [55.495s]
sys/netpfil/pf/nat64.py:TestNAT64::test_udp_checksum  ->  failed: /usr=
/tests/sys/netpfil/pf/nat64.py:205: AttributeError  [80.001s]
sys/netpfil/pf/pflog:matches  ->  failed: atf-check failed; see the ou=
tput of the test for details  [61.807s]
sys/netpfil/pf/pflog:matches_logif  ->  failed: atf-check failed; see =
the output of the test for details  [51.261s]
sys/netpfil/pf/pflog:unspecified_v6  ->  failed: atf-check failed; see=
 the output of the test for details  [36.281s]
sys/netpfil/pf/rdr:srcport_pass  ->  failed: atf-check failed; see the=
 output of the test for details  [76.815s]
sys/netpfil/pf/sctp:pfsync  ->  failed: Initial SCTP connection failed=
  [134.866s]
sys/netpfil/pf/sctp:related_icmp  ->  failed: SCTP connection failed  =
[59.620s]
sys/netpfil/pf/table:zero_one  ->  failed: atf-check failed; see the o=
utput of the test for details  [64.125s]
sys/netpfil/pf/tcp:rst  ->  failed: atf-check failed; see the output o=
f the test for details  [80.261s]

Looking at it now, those runtimes seems suspiciously high= as well.

Best regards,
Kristof

--=_MailMate_4D2EEB50-D9A0-4561-A201-3D0996B9026B_=--