From nobody Fri Jan 14 20:35:48 2022 X-Original-To: dev-commits-ports-branches@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 DE3E9195D960; Fri, 14 Jan 2022 20:35:48 +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 4JbCjw5xDWz3C3D; Fri, 14 Jan 2022 20:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642192548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mW4N4QyVypBmwYTNi4UeUgkhOGrjeM5SuyuIXbEx1TU=; b=T8TZtOPzCWjAvWZKMqjuLTZi81aiXI5aoK15K9nLkg6cCJzsg1HNNXYSQfEo246hsrHaAJ JITqmSpxpmweUxB9srKDmVom09Y41BWD39P7TJE3G21iBWmAfqCq0Z+MaFEpDFB4HTl/3G tiAnkDbo0pO8erCth0RDU/8oiYQIROBZtkshrxaYdZf6PWO+Vyogx7twXEDqH/iKGBrgZG xrmaXy3q+6+b+25zbUc08nTaX84tbXMj62dsesEjNpr7jP7lnM20vV9mmXzk3MS1xuICbC MIUXdUNX6xM9UaiZHo42Cc4+ROS07/bgRL42oYewfzOZ+D5Q743It+5GlPO2aQ== 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 A763D1A155; Fri, 14 Jan 2022 20:35:48 +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 20EKZm1W087082; Fri, 14 Jan 2022 20:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EKZmoT087081; Fri, 14 Jan 2022 20:35:48 GMT (envelope-from git) Date: Fri, 14 Jan 2022 20:35:48 GMT Message-Id: <202201142035.20EKZmoT087081@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: 677f2a7b833e - 2022Q1 - Make multiple ports build with new CPU_* macros List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q1 X-Git-Reftype: branch X-Git-Commit: 677f2a7b833e101623186c8ccfb9d812f0cd8ac4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642192548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mW4N4QyVypBmwYTNi4UeUgkhOGrjeM5SuyuIXbEx1TU=; b=ss/1QQBfTC4vwmI/EwzWEG/eTuMZbpzrIYCorNy9U9z9RP9Bn+RfAZWZEYx4HOzag2s9bk WGhtUTnieNdZz/rUj+0TGi54R4Sd0aaodTjrbd7ow0bfqw7oCu3T6+b4ruvQt+Zc/VWZIr 5BZaLyveblQuQ4Gmq1meqhlPof7naHBoXnZvHExwei9WD+NW75muXyEl2/5D5V9iNtCdrw xirqilw9oZn+iOEdTSm1/56A4/p8U0OSyiRYxJeXZBt0m9iNijtxuNsjtGYu2gYaSOXxLi CR2yqGL3Zs8xcfnJDVwCAeNoxcI5MJ7PQpdq005efUShn8PD3y1uD3nThhepLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642192548; a=rsa-sha256; cv=none; b=Zh5eGFD60kgWrxnk0cU0chMfSUhNBaFMv6CBYysTqrsNPq4OXRL+8VanqRyPp7q7PocapO dWSKGpdga3ppFoAPAcLpEsR7JO+ebqQeWzkQPN3dZAGZGFhAC7Mp4Iy1PedAvTukF/RA/R B+bQnr85Gu4teTnkEvCSNB+9uCIbz7XRs9nqDhc7+A4EV/84vcZDc50b44bAN5AD+J3ASv Kh/ZGlFPeM+/+M6Hvz5OBlsflAe0H4cxClnMC+hHHUYAmrdfc+nstvGVlbDmLX8RTfuW0S IvCuIXODZOcKld4Z8Ood5uyD1+q/Y47KP15rNylHRQ0a/tpQDpYck9Tu+mVVMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q1 has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=677f2a7b833e101623186c8ccfb9d812f0cd8ac4 commit 677f2a7b833e101623186c8ccfb9d812f0cd8ac4 Author: Stefan Eßer AuthorDate: 2022-01-02 22:02:21 +0000 Commit: Stefan Eßer CommitDate: 2022-01-14 20:32:23 +0000 Make multiple ports build with new CPU_* macros Merge commits from main branch to 2022Q1 to allow the affected ports to build on 13-STABLE as of today, which has received the CPU_AND, CPU_ANDNOT, CPU_OR, and CPU_XOR macros from -CURRENT. sysutils/slurm-wlm: fix build on -CURRENT The CPU_OR macro has been made compatible with GLIBC on -CURRENT, the FreeBSD specific alternative is therefore no longer required. While here pass --disable-slurmrestd to prevent the auto-configure script from attempting to build slurmrestd if glib is found by auto-configure (it does not build on FreeBSD due to Linux specific headers and shell features provided by Bash but by the /bin/sh in FreeBSD). This port has numerous build issues when not building in a clean jail (i.e. on a system with a previous version installed or with other software that is detected by auto-configure). The port revision is not bumped since these changes do not modify the package that is generated. (cherry picked from commit addda1277abed746f93ad76aecc2a2e9bc97d033) net/dpdk-20.11: fix build on -CURRENT The CPU_SET macros in -CURRENT have been made compatible with GLIBC. A simple test for the new signature of CPU_AND, CPU_OR, ... is the existence of a CPU_ALLOC macro. (cherry picked from commit 1b13427e48ed448f68a7d67a694da31b2d57104d) net/dpdk: fix build on -CURRENT The CPU_SET macros in -CURRENT have been made compatible with GLIBC. A simple test for the new signature of CPU_AND, CPU_OR, ... is the existence of a CPU_ALLOC macro. (cherry picked from commit c3e19584524281d37fe92868e5c3582fcd7d7d28) benchmarks/stress-ng: fix build on -CURRENT The CPU_SET macros in -CURRENT have been made compatible with GLIBC. A simple test for the new signature of CPU_AND, CPU_OR, ... is the existence of a CPU_ALLOC macro. (cherry picked from commit 7dc5416497a6d04bb85c5ded6b4983fb46b199b4) net/haproxy: fix build on -CURRENT The CPU_SET macros in -CURRENT have been made compatible with GLIBC. A simple test for the new signature of CPU_AND, CPU_OR, ... is the existence of a CPU_ALLOC macro. (cherry picked from commit 2913605c79b25b88a4a21b3d93ec2ab11949eaaa) net/haproxy-devel: fix build on -CURRENT The CPU_SET macros in -CURRENT have been made compatible with GLIBC. A simple test for the new signature of CPU_AND, CPU_OR, ... is the existence of a CPU_ALLOC macro. (cherry picked from commit 91efb4d016bcb7953f00a022f6bfe49a84dc61ac) sysutils/turbostat: use CPU_* macros defined in -CURRENT (cherry picked from commit 6cc600ed7040ae0270d22f580c4778266d9bdbe4) Approved by: portmgr (implicit) --- .../stress-ng/files/patch-stress-tlb-shootdown.c | 9 +++-- ...patch-lib_librte__eal_freebsd_include_rte__os.h | 41 +++++++++++++++++++++ ...h-lib_librte__eal_freebsd_eal_include_rte__os.h | 42 +++++++++++++++++++--- net/haproxy-devel/files/patch-src_cpuset.c | 14 ++++++++ net/haproxy/files/patch-src_cpuset.c | 14 ++++++++ sysutils/slurm-wlm/Makefile | 3 +- .../patch-src_plugins_task_affinity_affinity.c | 11 ++++++ 7 files changed, 126 insertions(+), 8 deletions(-) diff --git a/benchmarks/stress-ng/files/patch-stress-tlb-shootdown.c b/benchmarks/stress-ng/files/patch-stress-tlb-shootdown.c index 0beb2950f2b2..d54609e2fc7f 100644 --- a/benchmarks/stress-ng/files/patch-stress-tlb-shootdown.c +++ b/benchmarks/stress-ng/files/patch-stress-tlb-shootdown.c @@ -1,11 +1,14 @@ ---- stress-tlb-shootdown.c.orig 2021-12-28 15:45:13 UTC +--- stress-tlb-shootdown.c.orig 2021-12-19 20:49:35 UTC +++ stress-tlb-shootdown.c -@@ -64,7 +64,7 @@ static int stress_tlb_shootdown(const stress_args_t *a +@@ -64,7 +64,11 @@ static int stress_tlb_shootdown(const stress_args_t *a const int32_t max_cpus = stress_get_processors_configured(); CPU_ZERO(&proc_mask); -- CPU_OR(&proc_mask, &proc_mask_initial, &proc_mask); ++#ifdef CPU_ALLOC + CPU_OR(&proc_mask, &proc_mask_initial, &proc_mask); ++#else + CPU_OR(&proc_mask, &proc_mask_initial); ++#endif tlb_procs = max_cpus; if (tlb_procs > MAX_TLB_PROCS) diff --git a/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h b/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h new file mode 100644 index 000000000000..c48d4a55c9a2 --- /dev/null +++ b/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h @@ -0,0 +1,41 @@ +--- lib/librte_eal/freebsd/include/rte_os.h.orig 2021-03-08 17:40:08 UTC ++++ lib/librte_eal/freebsd/include/rte_os.h +@@ -14,6 +14,28 @@ + #include + + typedef cpuset_t rte_cpuset_t; ++ ++/* FreeBSD 14 uses GLIBC compatible CPU_AND, CPU_OR, ... */ ++#ifdef CPU_ALLOC ++ ++#define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) ++#define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2) ++#define RTE_CPU_FILL(set) do \ ++{ \ ++ unsigned int i; \ ++ CPU_ZERO(set); \ ++ for (i = 0; i < CPU_SETSIZE; i++) \ ++ CPU_SET(i, set); \ ++} while (0) ++#define RTE_CPU_NOT(dst, src) do \ ++{ \ ++ cpu_set_t tmp; \ ++ RTE_CPU_FILL(&tmp); \ ++ CPU_XOR(dst, &tmp, src); \ ++} while (0) ++ ++#else ++ + #define RTE_CPU_AND(dst, src1, src2) do \ + { \ + cpuset_t tmp; \ +@@ -47,6 +69,8 @@ typedef cpuset_t rte_cpuset_t; + CPU_ANDNOT(&tmp, src); \ + CPU_COPY(&tmp, dst); \ + } while (0) +-#endif ++#endif /* CPU_NAND */ ++ ++#endif /* CPU_ALLOC */ + + #endif /* _RTE_OS_H_ */ diff --git a/net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h b/net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h index ede8d170de6e..6e63d49836ac 100644 --- a/net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h +++ b/net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h @@ -1,6 +1,38 @@ ---- lib/librte_eal/freebsd/eal/include/rte_os.h.orig 2020-01-03 12:22:03 UTC +--- lib/librte_eal/freebsd/eal/include/rte_os.h.orig 2021-03-17 16:43:15 UTC +++ lib/librte_eal/freebsd/eal/include/rte_os.h -@@ -29,6 +29,9 @@ typedef cpuset_t rte_cpuset_t; +@@ -14,8 +14,30 @@ + #include + + typedef cpuset_t rte_cpuset_t; +-#define RTE_CPU_AND(dst, src1, src2) do \ ++ ++/* FreeBSD 14 uses GLIBC compatible CPU_AND, CPU_OR, ... */ ++#ifdef CPU_ALLOC ++ ++#define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) ++#define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2) ++#define RTE_CPU_FILL(set) do \ + { \ ++ unsigned int i; \ ++ CPU_ZERO(set); \ ++ for (i = 0; i < CPU_SETSIZE; i++) \ ++ CPU_SET(i, set); \ ++} while (0) ++#define RTE_CPU_NOT(dst, src) do \ ++{ \ ++ cpu_set_t tmp; \ ++ RTE_CPU_FILL(&tmp); \ ++ CPU_XOR(dst, &tmp, src); \ ++} while (0) ++ ++#else ++ ++#define RTE_CPU_AND(dst, src1, src2) do \ ++{ \ + cpuset_t tmp; \ + CPU_COPY(src1, &tmp); \ + CPU_AND(&tmp, src2); \ +@@ -29,6 +51,9 @@ typedef cpuset_t rte_cpuset_t; CPU_COPY(&tmp, dst); \ } while (0) #define RTE_CPU_FILL(set) CPU_FILL(set) @@ -10,7 +42,7 @@ #define RTE_CPU_NOT(dst, src) do \ { \ cpuset_t tmp; \ -@@ -36,5 +39,14 @@ typedef cpuset_t rte_cpuset_t; +@@ -36,5 +61,16 @@ typedef cpuset_t rte_cpuset_t; CPU_NAND(&tmp, src); \ CPU_COPY(&tmp, dst); \ } while (0) @@ -22,6 +54,8 @@ + CPU_ANDNOT(&tmp, src); \ + CPU_COPY(&tmp, dst); \ +} while (0) -+#endif ++#endif /* CPU_NAND */ ++ ++#endif /* CPU_ALLOC */ #endif /* _RTE_OS_H_ */ diff --git a/net/haproxy-devel/files/patch-src_cpuset.c b/net/haproxy-devel/files/patch-src_cpuset.c new file mode 100644 index 000000000000..42f04b37e6f6 --- /dev/null +++ b/net/haproxy-devel/files/patch-src_cpuset.c @@ -0,0 +1,14 @@ +--- src/cpuset.c.orig 2021-12-23 16:47:51 UTC ++++ src/cpuset.c +@@ -53,7 +53,11 @@ void ha_cpuset_and(struct hap_cpuset *dst, const struc + CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); + + #elif defined(CPUSET_USE_FREEBSD_CPUSET) ++#if defined(CPU_ALLOC) ++ CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); ++#else + CPU_AND(&dst->cpuset, &src->cpuset); ++#endif + + #elif defined(CPUSET_USE_ULONG) + dst->cpuset &= src->cpuset; diff --git a/net/haproxy/files/patch-src_cpuset.c b/net/haproxy/files/patch-src_cpuset.c new file mode 100644 index 000000000000..42f04b37e6f6 --- /dev/null +++ b/net/haproxy/files/patch-src_cpuset.c @@ -0,0 +1,14 @@ +--- src/cpuset.c.orig 2021-12-23 16:47:51 UTC ++++ src/cpuset.c +@@ -53,7 +53,11 @@ void ha_cpuset_and(struct hap_cpuset *dst, const struc + CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); + + #elif defined(CPUSET_USE_FREEBSD_CPUSET) ++#if defined(CPU_ALLOC) ++ CPU_AND(&dst->cpuset, &dst->cpuset, &src->cpuset); ++#else + CPU_AND(&dst->cpuset, &src->cpuset); ++#endif + + #elif defined(CPUSET_USE_ULONG) + dst->cpuset &= src->cpuset; diff --git a/sysutils/slurm-wlm/Makefile b/sysutils/slurm-wlm/Makefile index 517b38320bd3..f3dd6e9c9b11 100644 --- a/sysutils/slurm-wlm/Makefile +++ b/sysutils/slurm-wlm/Makefile @@ -77,7 +77,8 @@ RRD_CONFIGURE_WITH= rrdtool # --docdir is non-functional # CONFIGURE_ARGS= --docdir=${DOCSDIR} # FreeBSD Infiniband support is still experimental -CONFIGURE_ARGS= --without-ofed +# slurmrestd does not build on FreeBSD +CONFIGURE_ARGS= --without-ofed --disable-slurmrestd DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION} CFLAGS+= -I${WRKSRC}/slurm -I${LOCALBASE}/include -fcommon diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c b/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c new file mode 100644 index 000000000000..cf09d539002c --- /dev/null +++ b/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c @@ -0,0 +1,11 @@ +--- src/plugins/task/affinity/affinity.c.orig 2021-05-12 20:23:20 UTC ++++ src/plugins/task/affinity/affinity.c +@@ -297,7 +297,7 @@ void reset_cpuset(cpu_set_t *new_mask, cpu_set_t *cur_ + if (slurm_getaffinity(1, sizeof(full_mask), &full_mask)) { + /* Try to get full CPU mask from process init */ + CPU_ZERO(&full_mask); +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) && !defined(CPU_ALLOC) + CPU_OR(&full_mask, cur_mask); + #else + CPU_OR(&full_mask, &full_mask, cur_mask);