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 8F90FA0547; Wed, 12 Oct 2022 08:03:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF57A40691; Wed, 12 Oct 2022 08:03:32 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 97E0D4067C for ; Wed, 12 Oct 2022 08:03:31 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 435F31AE8E for ; Wed, 12 Oct 2022 08:03:31 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 41E661AE8D; Wed, 12 Oct 2022 08:03:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.6 X-Spam-Score: -1.6 Received: from [192.168.1.59] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id EF3951AB47 for ; Wed, 12 Oct 2022 08:03:30 +0200 (CEST) Message-ID: Date: Wed, 12 Oct 2022 08:03:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= Subject: rte_lcore_count() semantics To: "dev@dpdk.org" Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP 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 Hi. According to the API documentation, rte_lcore_count() sets out to "Return the number of execution units (lcores) on the system" The EAL documentation states that "the term 'lcore' refers to an EAL thread", and also refers to regular pthreads having called rte_thread_register() as "registered non-EAL threads". This might lead the unwary to believe that rte_lcore_count() did not include registered non-EAL threads (i.e., normal pthreads that called rte_thread_register()). But it does. Registered non-EAL threads are excluded in RTE_LCORE_FOREACH() loops, as expected. However, the FOREACH macro documentation says "Macro to browse all running lcores.". Should all interpret all this as a registered non-EAL thread is a non-running lcore? But a lcore is just another name for an EAL thread (at least that's how I interpret "refers to"), and that would lead the non-EAL thread to be an EAL thread. Beyond the obvious contradiction, the non-EAL thread is not a EAL thread, since you can't launch tasks on it. Something is not right here. Any thoughts? Thanks, Mattias