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 94FA945CD1; Wed, 13 Nov 2024 08:36:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85BF740E26; Wed, 13 Nov 2024 08:36:05 +0100 (CET) Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) by mails.dpdk.org (Postfix) with ESMTP id D0EC340E0A for ; Wed, 13 Nov 2024 08:36:03 +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=Y0Cjb mHzlT6gUuTBl0YWDJKSo2/Q88sWpGP6A4P9A9s=; b=ecK/p96fTMPn13HiYMCce LGOifDTgoGSvtIaH6A8iH76RC5W13uXYZEqlgP3FSn7f00zFk+b+hi2sRWcBSkyG KFND1MAfbPontcLLC3YvgCj+czS+AsDYMjTjUtbp2JFhRzRhu5FDVFMIVE4SjFsV M+ljXGh4ahz2C3VC/jsPBU= Received: from localhost.localdomain.localdomain (unknown [124.127.58.139]) by gzga-smtp-mtada-g0-0 (Coremail) with SMTP id _____wDnjzzaVjRng2LMEw--.20703S3; Wed, 13 Nov 2024 15:36:00 +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 v3 2/2] graph: add alignment to the member of rte_node Date: Wed, 13 Nov 2024 15:35:53 +0800 Message-Id: <20241113073553.6125-2-chcchc88@163.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241113073553.6125-1-chcchc88@163.com> References: <1731297797-3662-1-git-send-email-chcchc88@163.com> <20241113073553.6125-1-chcchc88@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wDnjzzaVjRng2LMEw--.20703S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7tw43ZFyfAFykCryrGFW7Arb_yoW8ZF1rpa s5GF4fCrWDJwnYgr1vqw4DXrWFvrn8tw4DWr18tw40vrs3Jr13Z3y0yFy2kryfJryfCw1f Zw4FgryxCF1j937anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jc8n5UUUUU= X-Originating-IP: [124.127.58.139] X-CM-SenderInfo: pfkfuxrfyyqiywtou0bp/1tbiLg+WF2c0T2euPwACsI 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. Due to the modification of the alignment of some members of the "rte_node" structure, update file release_24_11.rst. Signed-off-by: Huichao Cai --- doc/guides/rel_notes/release_24_11.rst | 3 +++ lib/graph/rte_graph_worker_common.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 592116b979..6903b1d0f0 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -425,6 +425,9 @@ ABI Changes * graph: added ``graph`` field to the ``dispatch`` structure in the ``rte_node`` structure. +* 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 4c2432b47f..9e99278a0a 100644 --- a/lib/graph/rte_graph_worker_common.h +++ b/lib/graph/rte_graph_worker_common.h @@ -104,6 +104,7 @@ struct __rte_cache_aligned rte_node { /** Original process function when pcap is enabled. */ rte_node_process_t original_process; + alignas(RTE_CACHE_LINE_MIN_SIZE) union { /* Fast schedule area for mcore dispatch model */ struct { @@ -113,8 +114,10 @@ struct __rte_cache_aligned rte_node { struct rte_graph *graph; /**< Graph corresponding to lcore_id. */ } dispatch; }; - rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ + /* Fast path area */ + alignas(RTE_CACHE_LINE_MIN_SIZE) + rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ __extension__ struct __rte_cache_aligned { #define RTE_NODE_CTX_SZ 16 union { -- 2.27.0