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 CFF1945D01; Thu, 14 Nov 2024 09:45:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EC3942E36; Thu, 14 Nov 2024 09:45:40 +0100 (CET) Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.4]) by mails.dpdk.org (Postfix) with ESMTP id 8D85342DF0 for ; Thu, 14 Nov 2024 09:45:36 +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=/zYtt QFsEXORcULxiT4OQ+P+2/rnBsHgaJs9D/LzQUw=; b=kyW3/4aq7zNN5z7v1zN4P /VjHp+kSIm1ZKsOzM3z2xIByzo3BHNv2t6rAS0Zp82qFKC+JDqwC502c0uPVLVCi Opi6xCaJ0cUkxHVoPs0bqNXIOO6D2Vq3F8lXAlONrr6PB9f4OQTD2k9v3MqJt/6E jE9jM9VLJr9f7PoCl9QZe4= Received: from localhost.localdomain (unknown [124.127.58.139]) by gzsmtp5 (Coremail) with SMTP id QCgvCgDXv9yruDVn2cSZDg--.24474S3; Thu, 14 Nov 2024 16:45:34 +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 v4 2/2] graph: add alignment to the member of rte_node Date: Thu, 14 Nov 2024 16:45:19 +0800 Message-Id: <20241114084519.5128-2-chcchc88@163.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20241114084519.5128-1-chcchc88@163.com> References: <20241113073553.6125-1-chcchc88@163.com> <20241114084519.5128-1-chcchc88@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: QCgvCgDXv9yruDVn2cSZDg--.24474S3 X-Coremail-Antispam: 1Uf129KBjvJXoWxJryUJF1ktr4xtrW7ArWfGrg_yoW8uFW7pa s3GFWfurWDJwnYkr1vga1DZrWFqFs5Ja9Fgr18Gay0vr4kJr1furW0yry3CrWfJryfCw1x Zw40kry7CF1j93DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jcHUDUUUUU= X-Originating-IP: [124.127.58.139] X-CM-SenderInfo: pfkfuxrfyyqiywtou0bp/1tbiLgiXF2c1orARaQACsc 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. 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 | 7 ++++++- 2 files changed, 9 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..d36abec08b 100644 --- a/lib/graph/rte_graph_worker_common.h +++ b/lib/graph/rte_graph_worker_common.h @@ -104,16 +104,21 @@ struct __rte_cache_aligned rte_node { /** Original process function when pcap is enabled. */ rte_node_process_t original_process; + /** Fast path area cache line 1. */ 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. */ struct rte_graph *graph; /**< Graph corresponding to lcore_id. */ } dispatch; }; + + /** Fast path area cache line 2. */ + alignas(RTE_CACHE_LINE_MIN_SIZE) rte_graph_off_t xstat_off; /**< Offset to xstat counters. */ + /* Fast path area */ __extension__ struct __rte_cache_aligned { #define RTE_NODE_CTX_SZ 16 -- 2.27.0