From nobody Fri May 31 16:06:37 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 4VrSfz2JfDz5N7MC for ; Fri, 31 May 2024 16:06:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 4VrSfy5NqNz40dP for ; Fri, 31 May 2024 16:06:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5789733769dso4058449a12.1 for ; Fri, 31 May 2024 09:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1717171609; x=1717776409; 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=cEt15uAZRehM84MFl8cjw8nd1G/6eC9Wh7BcYQnsymE=; b=r5BQZeQA2KNuoXbVsx5za8QWdNMrjpOVKDPQld9kXQkaCns7mqYvGOEyb64+YxQQLs 7KkkyFFMIf6MiaCZlRwiAhyQXixNGa5+qLnbL5q/4IxXBiSaXxQLdChbk2lznbUcxwUA nkjRcUddyR6ciHiJ1K8HrfuNJlEFEzuCorTmmGlXKOnLSsz165Q583+gEiD34d1qMXNl 0azWv0yHza0Ok0fEIePcQ3c2B4T+ItiCoJsA44BJ/A85UtTMbGOSZYaEDXO9wcSpKLLQ oocoj5pNtiY7ADMAUtpFuKIrDbAgVQOWUTxdIML8jag68Z7UdCUjdPPPWyPyoQGcfFyR eJqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717171609; x=1717776409; 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=cEt15uAZRehM84MFl8cjw8nd1G/6eC9Wh7BcYQnsymE=; b=VDJlr9LRozk8fiZjfSgPYF5J+bxqEbMyV8jtPGSkhX/heP/4zZkFi2NYtbitqjMAik 4K+cj86dewHiUeApQE/1NH9AEa9e+EvpwPyraBm6S2Xu+Ky+v/QanwADegWG7OD5TiKE AWOQw3DpsFxV0pTeSJkGRIMX70TotDOrNlX4gvuWWElFXE9eZ8u+bLwMnQP/RFh03s/7 JrpAZq2TYO4F/Eek67gIrsu2/JZfoeyMyo2ESSe5L5yKUTiwY7IKrFbODYdWwzShqoYZ BaYLQHGr4+IEIYGVJHSc2CPzW56EiazDby9KJlIV7Dtelz51B6roOFEZBOUmauYdJbk7 cQzg== X-Forwarded-Encrypted: i=1; AJvYcCXwLgVmnSHN8YlWEDdi70Ulx2z9lKVjRZpz5aZdmHXdCmy6XUZ485GoxnjMAZmTv/XkCfTL53rL82rIrdpevkYqcy2VqfM3CjKpcwwwO57q X-Gm-Message-State: AOJu0Yxoy4WZJXC0LdGB1P3ebF+VHj7A/CI1AYoC8s6J+X+CTVaMXLi/ Oc3l7aBV4nYJBPn8680PVXZfyaXyV7It39PFQO5qVXM5/WlDEgEbLNo+Ly9bPpzK/oYePk++OUj q9KJtBWkLNPn7q0OjeyDnHeTpd5VG4m0iUCcHvQ== X-Google-Smtp-Source: AGHT+IFVRcrNNX2CRMz2ewWrEM8BDKzaBER52O3xThhFsK9fQsR8yhVD9NVkseZcW+hcl6B+8GrVoxTZzPUnMjCVLTU= X-Received: by 2002:a17:906:2c1a:b0:a59:cbcb:1cca with SMTP id a640c23a62f3a-a65f094096dmr458486166b.13.1717171608839; Fri, 31 May 2024 09:06:48 -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> <20240531160012.2D5AE111@slippy.cwsent.com> In-Reply-To: <20240531160012.2D5AE111@slippy.cwsent.com> From: Warner Losh Date: Fri, 31 May 2024 12:06:37 -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="000000000000c388f30619c22bf5" 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: 4VrSfy5NqNz40dP --000000000000c388f30619c22bf5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 31, 2024 at 12:00=E2=80=AFPM Cy Schubert wrote: > In message > om> > , Warner Losh writes: > > --00000000000056c22d0619c1eb4c > > Content-Type: text/plain; charset=3D"UTF-8" > > Content-Transfer-Encoding: quoted-printable > > > > On Fri, May 31, 2024 at 11:28=3DE2=3D80=3DAFAM Cy Schubert > > .com> > > 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=3D3D676041c41ba587285bb934aa2fca2= 90=3D > > 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 sa= me > > > > > > > > Historically, these have been differnet values, and only one wa= s > > > defined > > > > or they were defined as different values. Now that they are > about t=3D > > 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 ti= me > > > WPA > > > is MFVed. > > > > > > > Oh, that was a mistake. > > > > > > > > case CLOCK_BOOTTIME: > > > > clock_id =3D3D 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 thi= s > > > case. > > > > + */ > > > > +#if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME =3D3D=3D3D > CLOCK_MONOTONIC=3D > > ) > > > > > > 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 > > That was my fault. My MH review folder is large and with all the things > going on here I failed to cherry-pick this one out of that folder. This i= s > totally on me, I'm sorry. > Gotcha. No worries. > > those ports > > are likely broken by the change in FreeBSD. My apologies. > > No apologies necessary. As long as I know what can be kept and what can b= e > overwritten next time WPA is MFVed. > I've pushed a fix to avoid the gratuitous differences. It should be clear now that you know about it and the diffs are minimized. Warner > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=3D0 > > > --000000000000c388f30619c22bf5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, May 31, 2024 at 12:00=E2=80= =AFPM Cy Schubert <Cy.Schub= ert@cschubert.com> wrote:
In message <CANCZdfpyhd=3DBAcF_YFCCTumYNpGUMs0bQandZnoT= YjFWcM7hqg@mail.gmail.c
om>
, Warner Losh writes:
> --00000000000056c22d0619c1eb4c
> Content-Type: text/plain; charset=3D"UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> On Fri, May 31, 2024 at 11:28=3DE2=3D80=3DAFAM Cy Schubert <Cy.Schu= bert@cschubert=3D
> .com>
> wrote:
>
> > In message <202405311447.44VEl06w078151@gitrepo.free= bsd.org>, Warner Losh
> > write
> > s:
> > > The branch main has been updated by imp:
> > >
> > > URL:
> > https://cgit= .FreeBSD.org/src/commit/?id=3D3D676041c41ba587285bb934aa2fca290=3D
> e
> > > a7208038
> > >
> > > commit 676041c41ba587285bb934aa2fca290ea7208038
> > > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > AuthorDate: 2024-05-31 14:44:55 +0000
> > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > CommitDate: 2024-05-31 14:44:55 +0000
> > >
> > >=C2=A0 =C2=A0 =C2=A0WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOT= ONIC to #define the same
> > >
> > >=C2=A0 =C2=A0 =C2=A0Historically, these have been differnet v= alues, and only one was
> > defined
> > >=C2=A0 =C2=A0 =C2=A0or they were defined as different values.= Now that they are about t=3D
> o
> > be
> > >=C2=A0 =C2=A0 =C2=A0the same value, add #ifdef to cope.
> > >
> > >=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 htt= ps://reviews.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/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)
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0return res;
> > >=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 nex= t time
> > WPA
> > is MFVed.
> >
>
> Oh, that was a mistake.
>
>
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case C= LOCK_BOOTTIME:
> > >=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 =3D3D 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 changes and thought I'd restored them t= o the
> original. I'll do a followup diff minimization diff.
>
> >
> > > +/*
> > > + * FreeBSD has both BOOTTIME and MONOTONIC defined to the s= ame 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=3D3D CLOCK_MONOTONIC=3D
> )
> >
> > 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

That was my fault. My MH review folder is large and with all the things going on here I failed to cherry-pick this one out of that folder. This is =
totally on me, I'm sorry.

Gotcha. N= o worries.
=C2=A0
> those ports
> are likely broken by the change in FreeBSD. My apologies.

No apologies necessary. As long as I know what can be kept and what can be =
overwritten next time WPA is MFVed.

I&#= 39;ve pushed a fix to avoid the gratuitous differences. It should be clear = now that you
know about it and the diffs are minimized.

Warner
=C2=A0
--
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


--000000000000c388f30619c22bf5--