From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B17FDA0555 for ; Thu, 9 Jun 2022 13:37:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9922E4069C; Thu, 9 Jun 2022 13:37:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id CD7A3406B4 for ; Thu, 9 Jun 2022 13:37:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654774636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=am30UQUP9JFOvXd9jiRHd+btwb8GdyxMZ4adVjq2/YA=; b=DcPsVWWOgb46WHyScsHpyD/ckP++nvtFlo1fLlRX+38Cecuedvuw8ja2PwXjeIpeNynohW jxyrhaGhlpZW6cwU7fVRfo0UNfw3J9W9Jpk+Tb9YDUHMGU7MWC4ZjhvxafXq7+QoHlPTSM buMq+tslNjE/0JC3ZVILKc/dPUjPPmM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-257-nlUB178ON-erXMwOJmJHaw-1; Thu, 09 Jun 2022 07:37:15 -0400 X-MC-Unique: nlUB178ON-erXMwOJmJHaw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 10A6A296A612; Thu, 9 Jun 2022 11:37:15 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.195.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id C960518EA6; Thu, 9 Jun 2022 11:37:13 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Bruce Richardson , Daxue Gao , dpdk stable Subject: patch 'eal/freebsd: fix use of newer cpuset macros' has been queued to stable release 21.11.2 Date: Thu, 9 Jun 2022 12:35:50 +0100 Message-Id: <20220609113701.386938-3-ktraynor@redhat.com> In-Reply-To: <20220609113701.386938-1-ktraynor@redhat.com> References: <20220609113701.386938-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/13/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/034b700e08a742502eb214c6ef46a642b817387a Thanks. Kevin --- >From 034b700e08a742502eb214c6ef46a642b817387a Mon Sep 17 00:00:00 2001 From: David Marchand Date: Fri, 20 May 2022 19:10:50 +0100 Subject: [PATCH] eal/freebsd: fix use of newer cpuset macros [ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ] FreeBSD has updated its CPU macros to align more with the definitions used on Linux[1]. Unfortunately, while this makes compatibility better in future, it means we need to have both legacy and newer definition support. Use a meson check to determine which set of macros are used. [1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc Bugzilla ID: 1014 Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity") Fixes: b6be16acfeb1 ("eal: fix control thread affinity with --lcores") Signed-off-by: David Marchand Signed-off-by: Bruce Richardson Tested-by: Daxue Gao --- lib/eal/freebsd/include/rte_os.h | 17 ++++++++++++++++- lib/eal/freebsd/meson.build | 11 +++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h index b4afd45adc..003468caff 100644 --- a/lib/eal/freebsd/include/rte_os.h +++ b/lib/eal/freebsd/include/rte_os.h @@ -29,4 +29,6 @@ extern "C" { typedef cpuset_t rte_cpuset_t; #define RTE_HAS_CPUSET + +#ifdef RTE_EAL_FREEBSD_CPUSET_LEGACY #define RTE_CPU_AND(dst, src1, src2) do \ { \ @@ -62,5 +64,18 @@ typedef cpuset_t rte_cpuset_t; CPU_COPY(&tmp, dst); \ } while (0) -#endif +#endif /* CPU_NAND */ + +#else /* RTE_EAL_FREEBSD_CPUSET_LEGACY */ + +#define RTE_CPU_AND CPU_AND +#define RTE_CPU_OR CPU_OR +#define RTE_CPU_FILL CPU_FILL +#define RTE_CPU_NOT(dst, src) do { \ + cpu_set_t tmp; \ + CPU_FILL(&tmp); \ + CPU_XOR(dst, src, &tmp); \ +} while (0) + +#endif /* RTE_EAL_FREEBSD_CPUSET_LEGACY */ #ifdef __cplusplus diff --git a/lib/eal/freebsd/meson.build b/lib/eal/freebsd/meson.build index 398ceab71d..fe9097303a 100644 --- a/lib/eal/freebsd/meson.build +++ b/lib/eal/freebsd/meson.build @@ -20,2 +20,13 @@ sources += files( deps += ['kvargs', 'telemetry'] + +# test for version of cpuset macros +cpuset_test_code = ''' + #include + #include + void cpu_test_or(cpuset_t *s) { CPU_OR(s, s, s); } +''' + +if not cc.compiles(cpuset_test_code, name: 'Detect argument count for CPU_OR') + dpdk_conf.set('RTE_EAL_FREEBSD_CPUSET_LEGACY', 1) +endif -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-09 12:34:29.872078246 +0100 +++ 0003-eal-freebsd-fix-use-of-newer-cpuset-macros.patch 2022-06-09 12:34:29.607980405 +0100 @@ -1 +1 @@ -From 2f51bc9c27a4f1da674d66499667155663dcc419 Mon Sep 17 00:00:00 2001 +From 034b700e08a742502eb214c6ef46a642b817387a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org