From nobody Mon Sep 22 15:37:31 2025 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 4cVnLM3Ylbz683Nh for ; Mon, 22 Sep 2025 15:37:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnLM0LmNz3b7w for ; Mon, 22 Sep 2025 15:37:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-62ecd3c21d3so6974486a12.0 for ; Mon, 22 Sep 2025 08:37:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758555465; x=1759160265; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bW/Ib6TOrwbBpdMHwKphLQQgzKDk1Uz7zaHME4VHF8o=; b=fDoJt0QGcfyyNLb9XLKK0fTi1l6ba9ILSOhOLDcJV8i6xUP70siPbSHogQUyODsYKH 9xskHBFx5/NkaEjSZXnXmsdChPLfhp1pibh07b2tizKPvqK7sSqkpWBuRmYm0xQAd8Z+ jErDW2jP3wkRIrVlIvJhn4xziOxamTVGAgv/7tWDOW9DgyGYVFJ9/N4ubaps7o41qP6v /5uKn730q6VnXjd4SPRzAML7jPudYL4OfA2RZHgzOFX57TsIzLrWwyzfgU3eFpMo0qGl OCMFBaHGnU2o++5w+YOaJb3pSXgUfu/1nh39h0O8PlsmNi49Go28AZbPTqNDolNiMz+w LifA== X-Forwarded-Encrypted: i=1; AJvYcCU4HD8cbJLEqJigLm4c+Lj28Tk+LeyV80kplSNlhFI4t3vsETia57XbhPQX8omNwupDNVdnsTKX5VWmydQMD2buKa1g@freebsd.org X-Gm-Message-State: AOJu0Yy08oiHJ9CU2+kcOz4nf1YaAgHnE+NzHl9KUyvKYUz1bd5k2bqG YEIY381lfRNNgoQ+Oo4tkiw7qMTwi8V+I/grIkh1DusLy5C18XxAk0jdbjelLX4T X-Gm-Gg: ASbGncuwy3d+JQHm5/SdPiZo//LV9soiHt+XKFLDlpyhu7n74531tmmzeOKv/JjzNUF qzSBF5M1hLkKUvSpcyJCKFiiTpgy3sIIQNdXbBcE+PmMmbvQCUWymjPLkrYHzfOOfLHXc/wrXeT O2rCoZQKTjta0DPHVx7uQgxG01rOLVd1L1EMapVEHQ4o+/gsnkSJnZ4abVzaqPzuiaNj9/SVVXR J2s43IW0U8TAfDM3USz9cPnCs3tYIEP0byKtAy8oFKYRcSFY/5fH5LURRL7vt4yVFytb0gy74ER nxmWlzBlkP9YThKNvOYNc58htwE8z6QM2rckPb0kztFcibMeuBE/qcvnNXL1pdutGNVASb8mP2W 2i5UG39h8yrHR9/v5lJcN9axRvMnodrtm6o8yzNO4f5CxNi9KiJv6M6QnL7wVwKd5 X-Google-Smtp-Source: AGHT+IH4uievzyDNVwjFvLBade/PNxI9kYSghy9aLVx4vCjE6WJZuE/Z4R+9kk8ET/CuKQTPtPCO6A== X-Received: by 2002:a17:907:3d43:b0:b2b:f498:e2f4 with SMTP id a640c23a62f3a-b2bf498e400mr385447366b.6.1758555464284; Mon, 22 Sep 2025 08:37:44 -0700 (PDT) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b26847ba016sm758035866b.21.2025.09.22.08.37.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Sep 2025 08:37:43 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b28e1b87aa7so278180466b.3 for ; Mon, 22 Sep 2025 08:37:43 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWipEERGMns7ttZ/2RSZKlvQ80r6WNNpSaAlrn6UrewNiKviYwn06/CKfMSGsP7dR+8Jwm7/W9DW5KVNBs+MnP17C+H@freebsd.org X-Received: by 2002:a17:907:7f27:b0:b07:c5b1:b129 with SMTP id a640c23a62f3a-b24eda731a4mr1333306966b.1.1758555463512; Mon, 22 Sep 2025 08:37:43 -0700 (PDT) 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 References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> In-Reply-To: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> From: "Jonathan T. Looney" Date: Mon, 22 Sep 2025 11:37:31 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWBH61PiU7vTxGZN7EGr1_eANGlQLau9vCkRv56QnH6aasPYTU8yE_Ssb98 Message-ID: Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: Guido Falsi Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b879d5063f65997c" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVnLM0LmNz3b7w --000000000000b879d5063f65997c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 22, 2025 at 3:59=E2=80=AFAM Guido Falsi = wrote: > diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c > index 4f756a75fac7..8ef755e2dc0a 100644 > --- a/sys/netinet6/in6.c > +++ b/sys/netinet6/in6.c > @@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp) > COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, > sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); > > + ext->dad_failures =3D counter_u64_alloc(M_WAITOK); > + > ext->nd_ifinfo =3D nd6_ifattach(ifp); > ext->scope6_id =3D scope6_ifattach(ifp); > ext->lltable =3D in6_lltattach(ifp); > @@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) > COUNTER_ARRAY_FREE(ext->icmp6_ifstat, > sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); > free(ext->icmp6_ifstat, M_IFADDR); > + counter_u64_free(ext->dad_failures); > free(ext, M_IFADDR); > } > This seems like it is probably a low-frequency event. If so, why is a counter a better choice for this than an atomic? Jonathan --000000000000b879d5063f65997c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 22, 2025 at 3:59=E2=80=AFAM G= uido Falsi <madpilot@freebsd.org= > wrote:
diff --git a/sys/netinet6/in6.= c b/sys/netinet6/in6.c
index 4f756a75fac7..8ef755e2dc0a 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(struct icmp6_ifstat) / siz= eof(uint64_t), M_WAITOK);

+=C2=A0 =C2=A0 =C2=A0 =C2=A0ext->dad_failures =3D counter_u64_alloc(M_WA= ITOK);
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->nd_ifinfo =3D nd6_ifattach(ifp);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->scope6_id =3D scope6_ifattach(ifp);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->lltable =3D in6_lltattach(ifp);
@@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 COUNTER_ARRAY_FREE(ext->icmp6_ifstat,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(struct icmp6_ifstat) / siz= eof(uint64_t));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 free(ext->icmp6_ifstat, M_IFADDR);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0counter_u64_free(ext->dad_failures);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 free(ext, M_IFADDR);
=C2=A0}

This seems like it is probably = a low-frequency event. If so, why is a counter a better choice for this tha= n an atomic?

Jonathan
--000000000000b879d5063f65997c--