From nobody Mon Sep 22 15:37:31 2025 X-Original-To: dev-commits-src-main@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 4cVnLM4Mhkz683FS for ; Mon, 22 Sep 2025 15:37:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 4cVnLM1qbMz3b5Z 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-f49.google.com with SMTP id 4fb4d7f45d1cf-62ecd3c21d3so6974500a12.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=U5TMjsJyOz/3EdougZvG8tHnPiVJo6Hn+lOJUKIuBKq/KNXJ0ws1ai06p/eL5Yu0RF tRhjdyUMKXG5MfHjRz6wgcGywwDTwxDpwrDXHKuFAy1B751poMv3ant2FSrmARIEecmH 8nrrbofnIudZF0Ege3laNLw8DmQGECvgpmYsRMA5nyeA6R5O7eG5b+d/hr579dD2rkN9 HEqIF87YEPoHuWbo0EfnvvwVzzNfKj/2IMN/uRiZl+x8cPjem6i9d+uN/HYQMs/cvdqU jCjoJ6ECtB2Sr1QQQFx6Y+AAMGZ9S/jREBNrIn9E/omIPW8WAk38SgGC8W7nR8WpD6vt uupw== X-Forwarded-Encrypted: i=1; AJvYcCVR6mtjpPd1J59HPXEJPS5CvrS/vf/HCG4fG/aSJNbGlCUuxO6eWGbSjs0yyAuS/mhS2L1oxT4fyZQrGMTLa7iXy+H3Bw==@freebsd.org X-Gm-Message-State: AOJu0Yykjpen1oOrg1UV8g9Sd8TD/lCNJjGJusBth4DrFDFJyyhHjC+0 5SEEZzJfoHNBVsuz8/5BIiwmrV70v14JTAg++xlsF1n/+eBAN3GUkGaYuDftdUnq X-Gm-Gg: ASbGncsn8XdwPu89JBpy5wxu56xywS/iKdKzv8VkfxzyCcdtzooz1H+yPGMX3VuqUy7 Aa/tXD75E6RTkDCpadGY0SeumM7vLutaF5azwGOtwQbdtEHSRFr8r61cvwW0SLHlmTwapAK20ZO /wjPZtH06RFbdW5528XjCSm1dKtvqdGGMib7oW4Sw72hi7KpuE6TQiXsvpgpUZP3KQBHTWKRQgP F8TOSascILEZUMF+KmrvR3pRvCmzUw61QJrP4AGGOt8Vr8h25oT571mLo32iAa+SkGJR5X7CpdN 8tC2NUKpe5vKTlLsLOVgwui8vKpTllF9prtUkSKdMCPxaaTi3FUBDf0gtrJFrlC8Z/c+3d8P7jL UZDZBtTf7EeVUE2xP0PnW5Ejas5t0dthMmpF/jw1SCwnThikURLLsiA== X-Google-Smtp-Source: AGHT+IFd9luQiAThX67N7bVC6f2zD7RDdKshXizri35ycirnc8ofKgpS1WRMhuehdg1zlRe1z5ybmw== X-Received: by 2002:a05:6402:4316:b0:634:5fb4:10c3 with SMTP id 4fb4d7f45d1cf-6345fb41431mr426770a12.31.1758555464516; Mon, 22 Sep 2025 08:37:44 -0700 (PDT) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com. [209.85.208.52]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-62fa5d027fdsm9267591a12.5.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:44 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-62f4a8dfadcso5395163a12.1 for ; Mon, 22 Sep 2025 08:37:43 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXPtXfC7AGBN1LbIi4hy/CawgEVrxVDz2V9G0Kd+JnJFqVOdiF2vzF+x3oUlrNzv/6sSa4Lgc/Wx21wGmlU09XB0yYb3w==@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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 4cVnLM1qbMz3b5Z --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--