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 E393A45DAB; Tue, 26 Nov 2024 14:15:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 480C840E4D; Tue, 26 Nov 2024 14:15:00 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id 3B6E54064A for ; Tue, 26 Nov 2024 14:14:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732626896; x=1764162896; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=CgFc09oSOatkdZZUVV/4nXoOoWCrt1XqYNkpo7YdgnY=; b=FLv9LCxBLHV5oCqT0tDNcNXTBx8vuu1+SJthg2HICy9DMq3TjGKe3834 5L4l64ub2aYaLIb269l+3CgtcG6QNbuDKAukd3IncYt7GsD15UKxnjsLR 14KprxGcxK3UZVXUF43FoHKqNDM+YP2yNTU+DhmMebUuP6cDAZNCqlfB1 CphXYAT1T5l+fD4J9r4hU9biVZwn+VOFkdJQxv/tDrk+eSFCjt5MIufZJ 8xoeDNP9LxAeaneg0aTKpbzRTVYao9CZGywYUUWX4IRivL3PvepzyzbC8 vZ/H/SrByxpQw+VQbFl9TwJTTtNukaeN7GSY0F1R0J1DLDKaO6UrdkrDS w==; X-CSE-ConnectionGUID: eTpM9ljaQeWk+siESeq5jw== X-CSE-MsgGUID: fm6l33tiSDWTgZ08gzeziw== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="36447021" X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="36447021" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2024 05:14:56 -0800 X-CSE-ConnectionGUID: TLSz/J9/QSC1FQ2HFEvLRw== X-CSE-MsgGUID: AxX/uZ3kSdeHeaWvgPDyZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="92013304" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa007.jf.intel.com with ESMTP; 26 Nov 2024 05:14:55 -0800 From: Anatoly Burakov To: dev@dpdk.org, Tyler Retzlaff Subject: [PATCH v1 1/4] eal: update socket ID API documentation Date: Tue, 26 Nov 2024 13:14:47 +0000 Message-ID: <67fa1612d123d01af2bdfdbc7d6144d8266742ee.1732626792.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Currently, even though through out DPDK we refer to "socket ID's", in actuality we are referring to NUMA node ID's, which do not necessarily correspond to physical sockets. This is not an API change nor a semantics change, it is merely an update of API documentation to match what is already the case (the semantics have changed back when systems started reporting multiple NUMA nodes per physical socket). Signed-off-by: Anatoly Burakov --- doc/guides/prog_guide/glossary.rst | 5 ++++- lib/eal/include/rte_lcore.h | 25 ++++++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/guides/prog_guide/glossary.rst b/doc/guides/prog_guide/glossary.rst index 8d6349701e..d09d7bf5f6 100644 --- a/doc/guides/prog_guide/glossary.rst +++ b/doc/guides/prog_guide/glossary.rst @@ -191,7 +191,10 @@ Slave lcore Deprecated name for *worker lcore*. No longer used. Socket - A physical CPU, that includes several *cores*. + For historical reasons, the term "socket" is used in the DPDK to refer to + both physical sockets, as well as NUMA nodes. As a general rule, the term + should be understood to mean "NUMA node" unless it is clear from context + that it is referring to physical CPU sockets. SLA Service Level Agreement diff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h index 549b9e68c5..5a89baad43 100644 --- a/lib/eal/include/rte_lcore.h +++ b/lib/eal/include/rte_lcore.h @@ -113,22 +113,21 @@ unsigned int rte_lcore_count(void); int rte_lcore_index(int lcore_id); /** - * Return the ID of the physical socket of the logical core we are - * running on. + * Return the ID of NUMA node of the logical core we are running on. * @return - * the ID of current lcoreid's physical socket + * the ID of current lcoreid's NUMA node */ unsigned int rte_socket_id(void); /** - * Return number of physical sockets detected on the system. + * Return number of NUMA nodes detected on the system. * - * Note that number of nodes may not be correspondent to their physical id's: - * for example, a system may report two socket id's, but the actual socket id's + * Note that number of nodes may not be correspondent to their NUMA ID's: + * for example, a system may report two NUMA ID's, but the actual NUMA ID's * may be 0 and 8. * * @return - * the number of physical sockets as recognized by EAL + * the number of NUMA ID's as recognized by EAL */ unsigned int rte_socket_count(void); @@ -137,26 +136,26 @@ rte_socket_count(void); * Return socket id with a particular index. * * This will return socket id at a particular position in list of all detected - * physical socket id's. For example, on a machine with sockets [0, 8], passing - * 1 as a parameter will return 8. + * NUMA node ID's. For example, on a machine with NUMA nodes [0, 8], passing 1 + * as a parameter will return 8. * * @param idx - * index of physical socket id to return + * index of NUMA node ID to return * * @return - * - physical socket id as recognized by EAL + * - NUMA node ID as recognized by EAL * - -1 on error, with errno set to EINVAL */ int rte_socket_id_by_idx(unsigned int idx); /** - * Get the ID of the physical socket of the specified lcore + * Get the ID of the NUMA node of the specified lcore * * @param lcore_id * the targeted lcore, which MUST be between 0 and RTE_MAX_LCORE-1. * @return - * the ID of lcoreid's physical socket + * the ID of lcoreid's NUMA node */ unsigned int rte_lcore_to_socket_id(unsigned int lcore_id); -- 2.43.5