From nobody Sun Sep 22 16:29:15 2024 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 4XBWmT3jsVz5XJPF for ; Sun, 22 Sep 2024 16:29:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 4XBWmS6gfdz45dB for ; Sun, 22 Sep 2024 16:29:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7db233cef22so2857101a12.0 for ; Sun, 22 Sep 2024 09:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1727022567; x=1727627367; 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=IHjE1vrIYYv0O8TOk3GvaGKogWE2AxGbgfQ1A3zTros=; b=p0GAkxEnWEI2FJlgxiVnR4I4Aon+G24aMqnG5RHHZfQI09VVZv7nPh1UhBO5IPAsKF w5n7IJTX606bF62JbW0dWX7q/xBGtDpWXWGE+5O2uyw1bK/kCzq9BBUd9F5xuRN+ycNP mflTPSl+fFaL9wXWXIJ6mcW3qQFJNLAvyRO+JeBb9+SR12UTrdksSChPnx8qN+vs04ui 9ZeWFM3j98yUjGhKUvQNMRrvzi3ETdbC1qdjojPQQFE0ajk5jutqGYE52a0LJnp2+b6w Zb2WRR/PpzFnZQZBXMdsGPb9aJErgWLpW1YBfy50ZssJNVlaiPtzBzgW0nZ0jyAHKgFT UXSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727022567; x=1727627367; 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=IHjE1vrIYYv0O8TOk3GvaGKogWE2AxGbgfQ1A3zTros=; b=dNtLcrLrRH4S0fd54jLud7r0OAmyBnbFtXaU7SdjFqkI/Q2buxyiAuCR/sXrC8bNZ4 VTn3++hfoWV8kwPhdJSgVkmCH7oqsFK1dkEZShe/kwSTwG5Vv7yH59kTlsy7h6kMU2l+ O+gWCrcoWCaY/KdOuCzav2xjCtK3+FpVuTs+BV9ZyRYa+p+hhCYUlKnk/SHFFx1SU+Ey qRvHUMnMHqN0zAabEONjIY+5jViflLY/hwFGP8F8dlGRnlK2SBAQ3YGBQo533FHV7P8P mnGMib63BQNBJ32ZtNi27wXKSMCdYSOcvEVJB0rDlXeJYtDQFl5u6jU+R5aphzx1kQa/ RCVA== X-Forwarded-Encrypted: i=1; AJvYcCUuctpBvv7Nu3D62RgV2TpdXdl1hlFrXsGwtTx5zgcBBMFkfFI0YSN68vKAjuPMIlF7KJr0dNZy85CyCYXBgH29GI4xIw==@freebsd.org X-Gm-Message-State: AOJu0YwqpVPNimulAR7Bb0TVJEryPr9UMzgKynoebF3PeAh5GhbYtTWT VCo4EE4feDOr3Fupc4NroUhiNPceLhjjvR4uip4YDAAgsjr+uQFO+QmLch1PYN5PeLryHFrhLrv U2dLYO6oNHna8Dz5KQEkOwspiwSjvDA5s5cVH9g== X-Google-Smtp-Source: AGHT+IHcGosM0Xaoc+hTWg4442FZ2PgrWNmDyf3ZnYbA1l0TP4oky/dX53l68GN5rP1PwoCLJpn3CRBXCblq9JdbKYU= X-Received: by 2002:a17:90b:4d07:b0:2d3:c8e5:e548 with SMTP id 98e67ed59e1d1-2dd7f40ad4cmr12556382a91.13.1727022567214; Sun, 22 Sep 2024 09:29:27 -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: <202409201558.48KFwAEN048834@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 22 Sep 2024 17:29:15 +0100 Message-ID: Subject: Re: git: 94567c8641e2 - main - netstat: Resolve duplicate "dropped-packets" key from libxo output To: Mark Johnston Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Bram Content-Type: multipart/alternative; boundary="000000000000a36e150622b7c631" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XBWmS6gfdz45dB X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --000000000000a36e150622b7c631 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Sep 22, 2024 at 4:17=E2=80=AFPM Mark Johnston w= rote: > On Sun, Sep 22, 2024 at 02:19:54PM +0100, Warner Losh wrote: > > On Sun, Sep 22, 2024 at 11:29=E2=80=AFAM Mark Johnston > wrote: > > > > > On Fri, Sep 20, 2024 at 03:58:10PM +0000, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > > > > > URL: > > > > https://cgit.FreeBSD.org/src/commit/?id=3D94567c8641e235763b5b2926416d89d= 36654cde1 > > > > > > > > commit 94567c8641e235763b5b2926416d89d36654cde1 > > > > Author: Bram > > > > AuthorDate: 2024-07-23 08:57:42 +0000 > > > > Commit: Warner Losh > > > > CommitDate: 2024-09-20 15:06:26 +0000 > > > > > > > > netstat: Resolve duplicate "dropped-packets" key from libxo > output > > > > > > > > The current libxo output uses the "dropped-packets" key for bot= h > > > incoming and > > > > outgoing packets. This commit distinguishes between the two by > > > adding an "in" > > > > and "out" suffix. The original "dropped-packets" key is kept fo= r > > > backwards > > > > compatibility for now. > > > > > > > > PR: 244589 > > > > Reviewed by: imp, zlei > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1331 > > > > --- > > > > usr.bin/netstat/if.c | 10 ++++++++-- > > > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c > > > > index 172ea5324ccb..f0af785bce04 100644 > > > > --- a/usr.bin/netstat/if.c > > > > +++ b/usr.bin/netstat/if.c > > > > @@ -501,8 +501,11 @@ intpr(void (*pfunc)(char *), int af) > > > > IFA_STAT(ipackets), link|network, 1); > > > > show_stat("lu", nerr_len, "received-errors", > > > IFA_STAT(ierrors), > > > > link, 1); > > > > + /* Below is kept for backwards compatibility. Will be > > > removed in the future. */ > > > > show_stat("lu", nerr_len, "dropped-packets", > > > IFA_STAT(iqdrops), > > > > link, 1); > > > > + show_stat("lu", nerr_len, "dropped-packets-in", > > > IFA_STAT(iqdrops), > > > > + link, 1); > > > > > > This breaks plain netstat output, causing a bunch of network tests to > > > fail. For instance, "netstat -Wf link -I re0" now prints an extra > > > column. > > > > > > I think we should not bother with backwards compat unless libxo is > > > emitting structured output. This can be implemented using the "e" > > > format modifier described in the xo_format modified, but I'm not sure > > > how to plumb it through show_stat(). > > > > > > Let's revert until this is fixed? > > > > > > > Works for me. I hadn't noticed before the push. Thanks for bringing it > up. > > Thanks, the tests seem to be fixed now. > Thanks for the quick shout out it was a problem... --000000000000a36e150622b7c631 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Sep 22, 2024 at 4:17=E2=80=AF= PM Mark Johnston <markj@freebsd.org= > wrote:
= On Sun, Sep 22, 2024 at 02:19:54PM +0100, Warner Losh wrote:
> On Sun, Sep 22, 2024 at 11:29=E2=80=AFAM Mark Johnston <markj@freebsd.org> wrote= :
>
> > On Fri, Sep 20, 2024 at 03:58:10PM +0000, Warner Losh wrote:
> > > The branch main has been updated by imp:
> > >
> > > URL:
> > https://= cgit.FreeBSD.org/src/commit/?id=3D94567c8641e235763b5b2926416d89d36654cde1<= /a>
> > >
> > > commit 94567c8641e235763b5b2926416d89d36654cde1
> > > Author:=C2=A0 =C2=A0 =C2=A0Bram <
bram@cbbg.nl>
> > > AuthorDate: 2024-07-23 08:57:42 +0000
> > > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org&g= t;
> > > CommitDate: 2024-09-20 15:06:26 +0000
> > >
> > >=C2=A0 =C2=A0 =C2=A0netstat: Resolve duplicate "dropped-= packets" key from libxo output
> > >
> > >=C2=A0 =C2=A0 =C2=A0The current libxo output uses the "d= ropped-packets" key for both
> > incoming and
> > >=C2=A0 =C2=A0 =C2=A0outgoing packets. This commit distinguish= es between the two by
> > adding an "in"
> > >=C2=A0 =C2=A0 =C2=A0and "out" suffix. The original = "dropped-packets" key is kept for
> > backwards
> > >=C2=A0 =C2=A0 =C2=A0compatibility for now.
> > >
> > >=C2=A0 =C2=A0 =C2=A0PR: 244589
> > >=C2=A0 =C2=A0 =C2=A0Reviewed by: imp, zlei
> > >=C2=A0 =C2=A0 =C2=A0Pull Request: http= s://github.com/freebsd/freebsd-src/pull/1331
> > > ---
> > >=C2=A0 usr.bin/netstat/if.c | 10 ++++++++--
> > >=C2=A0 1 file changed, 8 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
> > > index 172ea5324ccb..f0af785bce04 100644
> > > --- a/usr.bin/netstat/if.c
> > > +++ b/usr.bin/netstat/if.c
> > > @@ -501,8 +501,11 @@ intpr(void (*pfunc)(char *), int af) > > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0IFA_STAT(ipackets), link|network, 1);
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0show_s= tat("lu", nerr_len, "received-errors",
> > IFA_STAT(ierrors),
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0link, 1);
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Below is= kept for backwards compatibility. Will be
> > removed in the future. */
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0show_s= tat("lu", nerr_len, "dropped-packets",
> > IFA_STAT(iqdrops),
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0link, 1);
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0show_stat(&= quot;lu", nerr_len, "dropped-packets-in",
> > IFA_STAT(iqdrops),
> > > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0link, 1);
> >
> > This breaks plain netstat output, causing a bunch of network test= s to
> > fail.=C2=A0 For instance, "netstat -Wf link -I re0" now= prints an extra
> > column.
> >
> > I think we should not bother with backwards compat unless libxo i= s
> > emitting structured output.=C2=A0 This can be implemented using t= he "e"
> > format modifier described in the xo_format modified, but I'm = not sure
> > how to plumb it through show_stat().
> >
> > Let's revert until this is fixed?
> >
>
> Works for me. I hadn't noticed before the push. Thanks for bringin= g it up.

Thanks, the tests seem to be fixed now.

Thanks for the quick shout out it was a problem...=C2=A0
--000000000000a36e150622b7c631--