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 8A78245D08; Fri, 15 Nov 2024 02:56:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CD7D42E52; Fri, 15 Nov 2024 02:56:08 +0100 (CET) Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.5]) by mails.dpdk.org (Postfix) with ESMTP id 219E340612 for ; Fri, 15 Nov 2024 02:56:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=Wz3xw RsnywTKQQHSwKtrshuvR7q3NnXFT3E4m9hVlwY=; b=bKQxXM8Z5wtcOic4htZ+s 5FbDXORXkw/YCHN9whMno5Q/HLmjcr6N/S7uqWelDN+W9tZv/HVfqRKzZbqagHpr wIC2yusCMnpbGpahqzBtql/XCIs3QZvTFxGfXgPt5M99IW8lQQE2++kQIPNI06+k TtkdK97MpnhIVTjdR7l1wY= Received: from localhost.localdomain.localdomain (unknown [124.127.58.139]) by gzga-smtp-mtada-g0-4 (Coremail) with SMTP id _____wD3_64wqjZnZvA3AQ--.16781S2; Fri, 15 Nov 2024 09:56:02 +0800 (CST) From: Huichao Cai To: jerinj@marvell.com, kirankumark@marvell.com, ndabilpuram@marvell.com, yanzhirun_163@163.com Cc: dev@dpdk.org Subject: [PATCH v5 1/1] graph: improve node layout Date: Fri, 15 Nov 2024 09:55:58 +0800 Message-Id: <20241115015558.3080-1-chcchc88@163.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241114084519.5128-2-chcchc88@163.com> References: <20241114084519.5128-2-chcchc88@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wD3_64wqjZnZvA3AQ--.16781S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tw4fWFW3ZryUCr4rJrW3trb_yoW8Zw43pa s3GFW3CrWDJwna9r1v9a1UXrWFvan8Ja9Fqr18KayIvws3Jr1fZrW8Kry3CrZ3JryfCw1f Zw40q347CF1j93DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UliigUUUUU= X-Originating-IP: [124.127.58.139] X-CM-SenderInfo: pfkfuxrfyyqiywtou0bp/1tbiLgSYF2c2qMIk9AAAsO 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 The members "dispatch" and "xstat_off" of the structure "rte_node" can be min cache aligned to make room for future expansion and to make sure have better performance. Add corresponding comments. Signed-off-by: Huichao Cai --- doc/guides/rel_notes/release_24_11.rst | 2 ++ lib/graph/rte_graph_worker_common.h | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 5063badf39..32800e8cb0 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -491,6 +491,8 @@ ABI Changes added new structure ``rte_node_xstats`` to ``rte_node_register`` and added ``xstat_off`` to ``rte_node``. +* graph: The members ``dispatch`` and ``xstat_off`` of the structure ``rte_node`` have been + marked as RTE_CACHE_LINE_MIN_SIZE bytes aligned. Known Issues ------------ diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h index a518af2b2a..d3ec88519d 100644 --- a/lib/graph/rte_graph_worker_common.h +++ b/lib/graph/rte_graph_worker_common.h @@ -104,16 +104,20 @@ struct __rte_cache_aligned rte_node { /** Original process function when pcap is enabled. */ rte_node_process_t original_process; + /** Fast schedule area for mcore dispatch model. */ union { - /* Fast schedule area for mcore dispatch model */ - struct { + alignas(RTE_CACHE_LINE_MIN_SIZE) struct { unsigned int lcore_id; /**< Node running lcore. */ uint64_t total_sched_objs; /**< Number of objects scheduled. */ uint64_t total_sched_fail; /**< Number of scheduled failure. */ } dispatch; }; + + /** Fast path area cache line 1. */ + alignas(RTE_CACHE_LINE_MIN_SIZE) rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ - /* Fast path area */ + + /** Fast path area cache line 2. */ __extension__ struct __rte_cache_aligned { #define RTE_NODE_CTX_SZ 16 union { -- 2.27.0