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 D6F00A0543 for ; Tue, 21 Jun 2022 10:08:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D132842836; Tue, 21 Jun 2022 10:08:07 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2069.outbound.protection.outlook.com [40.107.92.69]) by mails.dpdk.org (Postfix) with ESMTP id 5C88140151 for ; Tue, 21 Jun 2022 10:08:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UpyfwUkd343bpENE3htNDmYQuuqRt2gvHh+W5XqBqGOcp24V1zHtgJEC+J3xAGKFZwVvuV0QEHnzN56vxgH1X6635WvX4C0lkksMlbcjbJP2cVxnU9luWbXoU9Rbz8xPYpUyOAu+GyV87rC5UbppxUEuB+bG4KLX9dAbWgftCk+GYgNrb1BxEN5jj2DmcXuv6bsNaq53zuSee4Jkpo/c3TX8Tnw4ZYtaqxy9dr/0/6Y6RuNySIVlLWmZ6w77bIh2ET5DMCRMZ43rN7Cl2a1Mip/SXA1TNb+1p3KJvJJURDi/VvULkXQ/FHvvHIsVq0dfzlmJFD6xOEVI/UbPmZzINQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gweEyXrW+gmC9xoXINSeBOsrGgtyUuqf6GZaGkA0/Vo=; b=nM1IPSwr+jQjpcD+TNLYWqGwambWXnuu9zFiT61VKWIc3szSqrnmWZAS0S4AlZvvy0M00QzS4lAtX0H22mZOtpHsUj1RGttjUf0ZD8Qo/yPO8sxbTW/JzfrsxoEmDgJfCKFwVxoOw2LQI6wI3KDsav8UFDyyiJ7PQ2ryxKfH90iEqaMzDcVjNJdUp6eXelHZU1PFeilhcsLjmbOwlzd+esJNKdAMmBWOArtbjeR5WPuAmvtl5fSdT7mN34z+IeJFNOXnOXSEv0URQErb+p3Y+4fs17eL3mVHehTBp/UE5L3JXm2LGGZpmwkruQJcqZKIuoQ23e33nSOg69I/KI8cUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gweEyXrW+gmC9xoXINSeBOsrGgtyUuqf6GZaGkA0/Vo=; b=uGK8POvyTF26FUpxRNHfJGrqznobPrmNHHgEpCOvteGYXGnOpkNc5ebwqXM6LOYH+tnEwGv8ZWq7VnRQahDt2AXBONiazudYSvD2QqUrnQAHs8mxcf2DCgLBPe4y6NyxOFwyzjfkTnGy9YPTFyFLFyUPWx0WmROvVwjbyex/jpfV+S3u7KWIF7rDLQ3eujn6B1GOqRtrrfI2Hy7xwhRdwStC6SR7jXEtff9ndENJZzgsHj2p29oix8aUKYHp2uqkOusxpZKZCKk1etKGd07rzLmLc55VFZ6OfmGff8Gec4JvBZG4alrvXmtWLNt/Fjj4FgMgYwDitI10emKLnCZmag== Received: from MWHPR13CA0004.namprd13.prod.outlook.com (2603:10b6:300:16::14) by CH0PR12MB5219.namprd12.prod.outlook.com (2603:10b6:610:d2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Tue, 21 Jun 2022 08:08:05 +0000 Received: from CO1NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:300:16:cafe::82) by MWHPR13CA0004.outlook.office365.com (2603:10b6:300:16::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.11 via Frontend Transport; Tue, 21 Jun 2022 08:08:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT034.mail.protection.outlook.com (10.13.174.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:08:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:08:04 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:08:02 -0700 From: Xueming Li 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 20.11.6 Date: Tue, 21 Jun 2022 11:02:02 +0300 Message-ID: <20220621080301.2315720-57-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2f992dc-173c-40da-a812-08da535d2b49 X-MS-TrafficTypeDiagnostic: CH0PR12MB5219:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AXWltzD5YWdB9o3WUkmHiTL6EhTgyO8EmLXY5wRZCkBlYqtqlwGY0O4TwxKSSCiNznyDRTw7Np38/CG6yjh0NMYRZ/Ur+StyDAboznEh6pTg0z5yyfdAnpNOEJsD8mUdnPSBubRIfOsuvIltRrQ3juvsRUpWh1HtHHm6qrRYIhOwxJ7GIfuQrOaAhcctFqjzngAGLOGfQNTW+qXZZpWEAR4HpwBwdl5GIg8+gW1xKOBF/icKHLs7d1uSE1HLCm2HcFb7HP1Y9diXTH+Yz1750uPuBONSkURuP7fnqXCQlxZKJwqevTPvWpSrbOszxpzyAJuBdzR1soRO7L5YlHK3HDpVAcR8ffaiO9EFyaGL4lL5/CM7e3zAMO+mhqeaqi+20mpFxuPEYpe6n9QeaKlL9fOiUAQxzb+LOpigZ1NHb+LgxKd8T/Igy+0EEuVbUSfNTl1z6c2vIrWY6lXY14GRsuNZJ7xNdTqVEX9W4GHgWnZALzSn4kgG6sqItWjlG46c3xCks2Zh5p6uSZXBE+fwCj3I8I98p+hmAtLP6YPSPBqcxk3QMqw5oPKD4EbQVyb7fyUfyZUxzfoOoDIYatJEYsLRf6k1LNhEVl0MuVCXQSiFwrKybG50hKQl7Lcsodlek/nuwH8gaQSfO2a3eUsko8k447CzxxEr2jYgumfYCUi5+NWNPUuss4ppQIvVAVkjyDW07vPbHrPuzQynX2aQK/wodVxMvajxg/RyIRrJRhsKiDGtl1ndtY/qqWRV3M+iybm5/w9MmLFOdUpTupTRPtmJlPOlwx9KB99enIRnCbAC7p4JOy7e2t42dgIK0YYO0r+AluZASMXst5Sq7RPSdGKPCX16WY73YTEv0ybnVtg= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(396003)(39860400002)(136003)(346002)(36840700001)(46966006)(40470700004)(82740400003)(36756003)(82310400005)(356005)(36860700001)(81166007)(40480700001)(6916009)(54906003)(55016003)(316002)(478600001)(1076003)(7696005)(186003)(53546011)(336012)(70586007)(26005)(426003)(83380400001)(4326008)(2906002)(47076005)(8676002)(16526019)(966005)(70206006)(8936002)(86362001)(5660300002)(41300700001)(2616005)(6286002)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:08:04.8251 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2f992dc-173c-40da-a812-08da535d2b49 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5219 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 20.11.6 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/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/875e84259c1a9ac2f293e3d0345c0d7d1e04869a Thanks. Xueming Li --- >From 875e84259c1a9ac2f293e3d0345c0d7d1e04869a 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 Cc: Xueming Li [ 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/librte_eal/freebsd/include/rte_os.h | 17 ++++++++++++++++- lib/librte_eal/freebsd/meson.build | 11 +++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h index 81a32387a0..e3c9f80720 100644 --- a/lib/librte_eal/freebsd/include/rte_os.h +++ b/lib/librte_eal/freebsd/include/rte_os.h @@ -18,6 +18,8 @@ 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 \ { \ cpuset_t tmp; \ @@ -51,7 +53,20 @@ typedef cpuset_t rte_cpuset_t; CPU_ANDNOT(&tmp, src); \ 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/librte_eal/freebsd/meson.build b/lib/librte_eal/freebsd/meson.build index e10fd8a16d..0b7e2ca4a1 100644 --- a/lib/librte_eal/freebsd/meson.build +++ b/lib/librte_eal/freebsd/meson.build @@ -19,3 +19,14 @@ 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.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.858968151 +0800 +++ 0056-eal-freebsd-fix-use-of-newer-cpuset-macros.patch 2022-06-21 15:37:49.077784727 +0800 @@ -1 +1 @@ -From 2f51bc9c27a4f1da674d66499667155663dcc419 Mon Sep 17 00:00:00 2001 +From 875e84259c1a9ac2f293e3d0345c0d7d1e04869a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 2f51bc9c27a4f1da674d66499667155663dcc419 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -22,2 +24,2 @@ - lib/eal/freebsd/include/rte_os.h | 17 ++++++++++++++++- - lib/eal/freebsd/meson.build | 11 +++++++++++ + lib/librte_eal/freebsd/include/rte_os.h | 17 ++++++++++++++++- + lib/librte_eal/freebsd/meson.build | 11 +++++++++++ @@ -26,5 +28,5 @@ -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 -@@ -28,6 +28,8 @@ extern "C" { +diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h +index 81a32387a0..e3c9f80720 100644 +--- a/lib/librte_eal/freebsd/include/rte_os.h ++++ b/lib/librte_eal/freebsd/include/rte_os.h +@@ -18,6 +18,8 @@ extern "C" { @@ -39 +41 @@ -@@ -61,7 +63,20 @@ typedef cpuset_t rte_cpuset_t; +@@ -51,7 +53,20 @@ typedef cpuset_t rte_cpuset_t; @@ -61,4 +63,4 @@ -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 +diff --git a/lib/librte_eal/freebsd/meson.build b/lib/librte_eal/freebsd/meson.build +index e10fd8a16d..0b7e2ca4a1 100644 +--- a/lib/librte_eal/freebsd/meson.build ++++ b/lib/librte_eal/freebsd/meson.build @@ -69,11 +71,11 @@ -+ -+# 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 ++ ++# 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