Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2021 11:11:51 +0200
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        "Warner Losh" <imp@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   Re: git: 6edf5082bab7 - stable/12 - one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Message-ID:  <4AD3AB8C-A960-43BE-A89B-5D9C4CD077DD@FreeBSD.org>
In-Reply-To: <202107101712.16AHCwoE088447@gitrepo.freebsd.org>
References:  <202107101712.16AHCwoE088447@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Warner,

On 10 Jul 2021, at 19:12, Warner Losh wrote:
> The branch stable/12 has been updated by imp:
>
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=6edf5082bab71cf923efff9f18e38efe5b83b0ec
>
> commit 6edf5082bab71cf923efff9f18e38efe5b83b0ec
> Author:     Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2021-07-07 23:30:35 +0000
> Commit:     Warner Losh <imp@FreeBSD.org>
> CommitDate: 2021-07-10 17:11:15 +0000
>
>     one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number 
> of bugs
>
>     Import the latest bsd-features branch of the one-true-awk 
> upstream:
>
>     o Move to bison for $YACC
>     o Set close-on-exec flag for file and pipe redirects that aren't 
> std*
>     o lots of little fixes to modernize ocde base
>     o free sval member before setting it
>     o fix a bug where a{0,3} could match aaaa
>     o pull in systime and strftime from NetBSD awk
>     o pull in fixes from {Net,Free,Open}BSD (normalized our code with 
> them)
>     o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly 
> a nop)
>
>     Also revert a few of the trivial FreeBSD changes that were done 
> slightly
>     differently in the upstreaming process. Also, our PR database may 
> have
>     been mined by upstream for these fixes, and Mikolaj Golub may 
> deserve
>     credit for some of the fixes in this update.
>
>     Suggested by:           Mikolaj Golub <to.my.trociny@gmail.com>
>     PR:                     
> 143363,143365,143368,143369,143373,143375,214782
>     Sponsored by:           Netflix
>
>     (cherry picked from commit 
> f39dd6a9784467f0db5886012b3f4b13899be6b8)

I *think* this is the relevant commit, but I’m not 100% sure.

Anyway, I’ve recently started seeing issues building pfSense for 
aarch64. I’ve finally narrowed it down, and replicated the problem on 
base FreeBSD (stable/12, but I assume other branches are affected too).

It fails to build proctab.c. This file is generated by maketab, a tool 
built as part of the build process. In my case this tool is built for 
aarch64, which makes executing it on amd64 less successful than we’d 
like.

This only happens when building with META_MODE though. I do not 
understand the build system sufficiently to debug why. Hopefully 
you’ll have a better idea.

This triggers the build failure:

	% cat /usr/src/src_env.conf
	WITH_META_MODE=yes
	% env SRC_ENV_CONF=/usr/src/src_env.conf TARGET_ARCH=aarch64 make -j 8 
buildworld

	…
	--- proctab.c ---
	*** [proctab.c] Error code 255

	make[4]: stopped in /usr/src/usr.bin/awk
	.ERROR_TARGET='proctab.c'
	.ERROR_META_FILE='/usr/obj/usr/src/arm64.aarch64/usr.bin/awk/proctab.c.meta'
	.MAKE.LEVEL='4'
	MAKEFILE=''
	.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes 
verbose'
	_ERROR_CMD='./maketab awkgram.h > proctab.c;'
	.CURDIR='/usr/src/usr.bin/awk'
	.MAKE='make'
	.OBJDIR='/usr/obj/usr/src/arm64.aarch64/usr.bin/awk'
	.TARGETS='all'
	DESTDIR='/usr/obj/usr/src/arm64.aarch64/tmp'
	LD_LIBRARY_PATH=''
	MACHINE='arm64'
	MACHINE_ARCH='aarch64'
	MAKEOBJDIRPREFIX=''
	MAKESYSPATH='/usr/src/share/mk'
	MAKE_VERSION='20200710'

Further up in the build output:

	--- maketab ---
	cc -target aarch64-unknown-freebsd12.2 
--sysroot=/usr/obj/usr/src/arm64.aarch64/tmp 
-B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -O2 -pipe -fno-common   
-DHAS_ISBLANK -I. -I/usr/src/contrib/one-true-awk -DFOPEN_MAX=64 -g 
-std=gnu99 -Wno-format-zero-length -fstack-protector-strong 
-Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable 
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef 
-Wno-address-of-packed-member -Wno-switch -Wno-switch-enum 
-Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments    
/usr/src/contrib/one-true-awk/maketab.c  -o maketab

Without META_MODE maketab is built as an amd64 binary, and the entire 
build succeeds.

Best regards,
Kristof
From owner-dev-commits-src-branches@freebsd.org  Sat Jul 31 13:03:51 2021
Return-Path: <owner-dev-commits-src-branches@freebsd.org>
Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9624065C467;
 Sat, 31 Jul 2021 13:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4GcPbW3Zx5z4SVH;
 Sat, 31 Jul 2021 13:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:5])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 634A919497;
 Sat, 31 Jul 2021 13:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
 by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16VD3pqD066309;
 Sat, 31 Jul 2021 13:03:51 GMT (envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
 by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16VD3pJA066308;
 Sat, 31 Jul 2021 13:03:51 GMT (envelope-from git)
Date: Sat, 31 Jul 2021 13:03:51 GMT
Message-Id: <202107311303.16VD3pJA066308@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
 dev-commits-src-branches@FreeBSD.org
From: Kristof Provost <kp@FreeBSD.org>
Subject: git: b0e7f371cde1 - stable/13 - Add FEATURE sysctls for ALTQ
 disciplines
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: kp
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: b0e7f371cde199895a9071046e951beb38b1f4b4
Auto-Submitted: auto-generated
X-BeenThere: dev-commits-src-branches@freebsd.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: Commits to the stable branches of the FreeBSD src repository
 <dev-commits-src-branches.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-branches>,
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-branches/>;
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Help: <mailto:dev-commits-src-branches-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-branches>,
 <mailto:dev-commits-src-branches-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 31 Jul 2021 13:03:51 -0000

The branch stable/13 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id°e7f371cde199895a9071046e951beb38b1f4b4

commit b0e7f371cde199895a9071046e951beb38b1f4b4
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-01-23 09:36:33 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-07-31 08:12:01 +0000

    Add FEATURE sysctls for ALTQ disciplines

    This will allow userspace to more easily figure out if ALTQ is built
    into the kernel and what disciplines are supported.

    Reviewed by:            donner@
    Differential Revision:  https://reviews.freebsd.org/D28302

    (cherry picked from commit e111d79806fe3652bc85593ca77ee1b4ff85498d)
---
 sys/net/altq/altq_subr.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index ba1d3af5f5fd..609c18482845 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -114,6 +114,38 @@ static struct ip4_frag	*ip4f_alloc(void);
 static void 	ip4f_free(struct ip4_frag *);
 #endif /* ALTQ3_CLFIER_COMPAT */

+#ifdef ALTQ
+SYSCTL_NODE(_kern_features, OID_AUTO, altq, CTLFLAG_RD | CTLFLAG_CAPRD, 0,
+    "ALTQ packet queuing");
+
+#define	ALTQ_FEATURE(name, desc)					\
+	SYSCTL_INT_WITH_LABEL(_kern_features_altq, OID_AUTO, name,	\
+	    CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, 1,		\
+	    desc, "feature")
+
+#ifdef ALTQ_CBQ
+ALTQ_FEATURE(cbq, "ATLQ Class Based Queuing discipline");
+#endif
+#ifdef ALTQ_CODEL
+ALTQ_FEATURE(codel, "ALTQ Controlled Delay discipline");
+#endif
+#ifdef ALTQ_RED
+ALTQ_FEATURE(red, "ALTQ Random Early Detection discipline");
+#endif
+#ifdef ALTQ_RIO
+ALTQ_FEATURE(rio, "ALTQ Random Early Drop discipline");
+#endif
+#ifdef ALTQ_HFSC
+ALTQ_FEATURE(hfsc, "ALTQ Hierarchical Packet Scheduler discipline");
+#endif
+#ifdef ALTQ_PRIQ
+ALTQ_FEATURE(priq, "ATLQ Priority Queuing discipline");
+#endif
+#ifdef ALTQ_FAIRQ
+ALTQ_FEATURE(fairq, "ALTQ Fair Queuing discipline");
+#endif
+#endif
+
 /*
  * alternate queueing support routines
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AD3AB8C-A960-43BE-A89B-5D9C4CD077DD>