From nobody Fri May 31 15:48:36 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 4VrSGB46pNz5N5pL for ; Fri, 31 May 2024 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 4VrSGB13kTz58QJ for ; Fri, 31 May 2024 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a62972c88a9so247479866b.1 for ; Fri, 31 May 2024 08:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1717170528; x=1717775328; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WvgjDlm27ay++k2JoNhD3oEi1QauYzKkPeyTfzQ6VnM=; b=m1HgSkoOB3P4hm5OrO2IgTAMha2ezF5TxFihqZzEFOMQP8TvUDufJAZyv9DvoT0wKB dlTjgGxCzor4eN+I3O1iTIfzQ6X+FV4HxuQokM0bWqiO7WETWmOK4n9lwfJ4T8gr+PVn 3+3kyQUEc9rK/FdncDz+pyaxm7E3Y60vqz7Y4RyMPtBEIaZNEEMW3VkjhdR+Qb1bNwv0 Rl57KL/QfYVWMjAdLMQl+yMT4cOKYUOq7avGA3gKaFT4vLc3hZ2fHTcGsCqxFI1YGuXY wQ6Zj1o9T9VgG1Y6xDXdN+TCLKo7Zo3uSM73invgwwAnYXmR59JP02CVqHN+FEJydJv4 CbOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717170528; x=1717775328; 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=WvgjDlm27ay++k2JoNhD3oEi1QauYzKkPeyTfzQ6VnM=; b=YRS3iX7fWyTbRRIEW7jdS7GiEUAz84LMnHIZph3f94mygOYXX2dCdDlr8agoLEuhfb JV7bqn3vnTqxptAglY/dF+WTogjWIFjg9l2bnEamrGz/5Di9DhZ1yypkYke1pccs8ZuJ ylmPiVw9e0FmogiBxnl0VxtLzRwiBVLkiLyC7Wa1QjPOlUv2Sr+65lIIeYAVss+vo7jS Oz+r+YZzDTLrWK30vMb4qgHvgR3tNMBGZuYIEHOL1hnNpjzEgimmQlUjL9bLwegqf/9B fe/mplems099ROkAyFn4LcQoLrVcyLfkccDt76ItcKIj5IgywB0w2EH+rUnoXi9d+WJn 0obA== X-Forwarded-Encrypted: i=1; AJvYcCVxpDk9ymnXHVInNdyRfVF1aKqoM4fTwi3tkUDTLVjGkOu+tXikM5gpu7sPRYqFUWkm9KrFDni/myNeDZubl2JjkrWb0CNkTTnjJ+sVCXyG X-Gm-Message-State: AOJu0Yxg+MaaFEbhj963A6bwXCLLssw9pCK94Dqt474AIxCowkMO0daV ReIT4wcP9sylE32rlUUek8pg+YK3yMif5QtJucwJMnoDGNw3Cs9qqcVRhWJE30xePsJUwrCKWjH dAKiZUmNhVuMkjgA7MU+fK9P2y5bfhHggu/C8JbzCML0so1KmyjaZyA== X-Google-Smtp-Source: AGHT+IHBU35JMBVq12e5YS4vLwTP7nqURKyK2KyXFEzhPej0fQBc308BLnGTxPL8UqPG8PSYFRyCSPSDLW/YWc7zBo8= X-Received: by 2002:a17:906:cb12:b0:a59:ad15:6142 with SMTP id a640c23a62f3a-a682291c588mr147160466b.77.1717170527971; Fri, 31 May 2024 08:48:47 -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: <202405311447.44VEl06w078151@gitrepo.freebsd.org> <20240531152819.33B6597@slippy.cwsent.com> In-Reply-To: <20240531152819.33B6597@slippy.cwsent.com> From: Warner Losh Date: Fri, 31 May 2024 11:48:36 -0400 Message-ID: Subject: Re: git: 676041c41ba5 - main - WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #define the same To: Cy Schubert Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000056c22d0619c1eb4c" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VrSGB13kTz58QJ --00000000000056c22d0619c1eb4c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 31, 2024 at 11:28=E2=80=AFAM Cy Schubert wrote: > In message <202405311447.44VEl06w078151@gitrepo.freebsd.org>, Warner Losh > write > s: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D676041c41ba587285bb934aa2fca290= e > > a7208038 > > > > commit 676041c41ba587285bb934aa2fca290ea7208038 > > Author: Warner Losh > > AuthorDate: 2024-05-31 14:44:55 +0000 > > Commit: Warner Losh > > CommitDate: 2024-05-31 14:44:55 +0000 > > > > WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #define the same > > > > Historically, these have been differnet values, and only one was > defined > > or they were defined as different values. Now that they are about t= o > be > > the same value, add #ifdef to cope. > > > > Sponsored by: Netflix > > Reviewed by: olce, val_packett.cool, adrian > > Differential Revision: https://reviews.freebsd.org/D45418 > > --- > > contrib/wpa/src/utils/os_unix.c | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/contrib/wpa/src/utils/os_unix.c > b/contrib/wpa/src/utils/os_unix. > > c > > index 315c973f3228..a856179fb3b1 100644 > > --- a/contrib/wpa/src/utils/os_unix.c > > +++ b/contrib/wpa/src/utils/os_unix.c > > @@ -72,7 +72,6 @@ int os_get_time(struct os_time *t) > > return res; > > } > > > > - > > int os_get_reltime(struct os_reltime *t) > > { > > #ifndef __MACH__ > > @@ -97,15 +96,21 @@ int os_get_reltime(struct os_reltime *t) > > return 0; > > } > > switch (clock_id) { > > -#ifdef CLOCK_BOOTTIME > > +#if defined(CLOCK_BOOTTIME) > > Why this change? This could become a potential merge conflict next time > WPA > is MFVed. > Oh, that was a mistake. > > case CLOCK_BOOTTIME: > > clock_id =3D CLOCK_MONOTONIC; > > break; > > #endif > > -#ifdef CLOCK_MONOTONIC > > +#if defined(CLOCK_MONOTONIC) > > Ditto. > Ditto. I iterated on these changes and thought I'd restored them to the original. I'll do a followup diff minimization diff. > > > +/* > > + * FreeBSD has both BOOTTIME and MONOTONIC defined to the same value, > since > > they > > + * mean the same thing. FreeBSD 14.1 and ealier don't, so need this > case. > > + */ > > +#if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME =3D=3D CLOCK_MONOTONIC= ) > > This I probably want to apply to the ports. > Yes. I had you on the review, but I did move kinda quickly on this, and so those ports are likely broken by the change in FreeBSD. My apologies. Warner > > case CLOCK_MONOTONIC: > > clock_id =3D CLOCK_REALTIME; > > break; > > +#endif > > #endif > > case CLOCK_REALTIME: > > return -1; > > > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > --00000000000056c22d0619c1eb4c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, May 31, 2024 at 11:28=E2=80= =AFAM Cy Schubert <Cy.Schub= ert@cschubert.com> wrote:
In message <202405311447.44VEl06w078151@gitre= po.freebsd.org>, Warner Losh
write
s:
> The branch main has been updated by imp:
>
> URL: https://cgit.Fre= eBSD.org/src/commit/?id=3D676041c41ba587285bb934aa2fca290e
> a7208038
>
> commit 676041c41ba587285bb934aa2fca290ea7208038
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2024-05-31 14:44:55 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2024-05-31 14:44:55 +0000
>
>=C2=A0 =C2=A0 =C2=A0WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #d= efine the same
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Historically, these have been differnet values, and= only one was defined
>=C2=A0 =C2=A0 =C2=A0or they were defined as different values. Now that = they are about to be
>=C2=A0 =C2=A0 =C2=A0the same value, add #ifdef to cope.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
>=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 olce, val_packett.cool, adrian
>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://revie= ws.freebsd.org/D45418
> ---
>=C2=A0 contrib/wpa/src/utils/os_unix.c | 11 ++++++++---
>=C2=A0 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/contrib/wpa/src/utils/os_unix.c b/contrib/wpa/src/utils/o= s_unix.
> c
> index 315c973f3228..a856179fb3b1 100644
> --- a/contrib/wpa/src/utils/os_unix.c
> +++ b/contrib/wpa/src/utils/os_unix.c
> @@ -72,7 +72,6 @@ int os_get_time(struct os_time *t)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0return res;
>=C2=A0 }
>=C2=A0
> -
>=C2=A0 int os_get_reltime(struct os_reltime *t)
>=C2=A0 {
>=C2=A0 #ifndef __MACH__
> @@ -97,15 +96,21 @@ int os_get_reltime(struct os_reltime *t)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return 0;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (clock_id= ) {
> -#ifdef CLOCK_BOOTTIME
> +#if defined(CLOCK_BOOTTIME)

Why this change? This could become a potential merge conflict next time WPA=
is MFVed.

Oh, that was a mistake.=C2=A0=
=C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case CLOCK_BOOTT= IME:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0clock_id =3D CLOCK_MONOTONIC;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
>=C2=A0 #endif
> -#ifdef CLOCK_MONOTONIC
> +#if defined(CLOCK_MONOTONIC)

Ditto.

Ditto. I iterated on these chang= es and thought I'd restored them to the original. I'll do a followu= p diff minimization diff.=C2=A0

> +/*
> + * FreeBSD has both BOOTTIME and MONOTONIC defined to the same value,= since
> they
> + * mean the same thing. FreeBSD 14.1 and ealier don't, so need th= is case.
> + */
> +#if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME =3D=3D CLOCK_= MONOTONIC)

This I probably want to apply to the ports.

=
Yes. I had you on the review, but I did move kinda quickly on this, an= d so those ports
are likely broken by the change in FreeBSD. My a= pologies.

Warner
=C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case CLOCK_MONOT= ONIC:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0clock_id =3D CLOCK_REALTIME;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0break;
> +#endif
>=C2=A0 #endif
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case CLOCK_REALT= IME:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0return -1;
>


--
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:=C2=A0 <cy@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://FreeB= SD.org
NTP:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<cy@nwtime.org>=C2=A0 =C2=A0 Web:=C2=A0 https://nwt= ime.org

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 e^(i*pi)+1=3D0


--00000000000056c22d0619c1eb4c--