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 E6BD2488C2; Mon, 6 Oct 2025 09:42:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B633A402E2; Mon, 6 Oct 2025 09:42:23 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B5F20402AF for ; Mon, 6 Oct 2025 09:42:22 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id A81F5202CC; Mon, 6 Oct 2025 09:42:21 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v8 00/18] Simplify running with high-numbered CPUs Date: Mon, 6 Oct 2025 09:42:20 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65499@smartserver.smartshare.dk> In-Reply-To: <20251002174315.962992-1-bruce.richardson@intel.com> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v8 00/18] Simplify running with high-numbered CPUs Thread-Index: AdwzxA/5cJzVXngnSse0jEgvAzptTQCy4/mg References: <20250520164025.2055721-1-bruce.richardson@intel.com> <20251002174315.962992-1-bruce.richardson@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Bruce Richardson" , Cc: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Bruce, cpu_set_t is a fixed size array, with the size CPU_SETSIZE. This is part of libc. However, the kernel may be built with support for a different number of = CPUs. This means that e.g. sched_getaffinity() will fail with EINVAL if = cpusetsize is smaller than the number of CPUs the kernel was built for. For more information, refer to the description about "Dynamically sized = CPU sets" here: https://linux.die.net/man/3/cpu_alloc_size With this series, consider ensuring that all DPDK functions taking a cpu = set parameter also take a cpu set size parameter, to align with kernel = APIs. E.g.: int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask), and void CPU_ZERO_S(size_t setsize, cpu_set_t *set), instead of: void CPU_ZERO(cpu_set_t *set). Consider not using fixed size cpu sets (and CPU_SETSIZE) at all, but = dynamically allocated cpu sets. Consider not using fixed size lcore arrays (and RTE_MAX_LCORE) at all, = but dynamically allocated lcore arrays. Venlig hilsen / Kind regards, -Morten Br=F8rup