[EXTERNAL] [PATCH v4 2/2] graph: add alignment to the member of rte_node

Huichao Cai chcchc88 at 163.com
Thu Nov 14 13:06:51 CET 2024


Hi, Jerin. Like this?




diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h

index a518af2b2a..f9ff7dd8c9 100644

--- a/lib/graph/rte_graph_worker_common.h

+++ b/lib/graph/rte_graph_worker_common.h

@@ -104,15 +104,19 @@ 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  */

        __extension__ struct __rte_cache_aligned {

 #define RTE_NODE_CTX_SZ 16


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20241114/9bdea44f/attachment.htm>


More information about the dev mailing list