> -----Original Message-----
> From: Huichao Cai <chcch...@163.com>
> Sent: Thursday, November 14, 2024 5:37 PM
> To: Jerin Jacob <jer...@marvell.com>
> Cc: Kiran Kumar Kokkilagadda <kirankum...@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpu...@marvell.com>; yanzhirun_...@163.com;
> david.march...@redhat.com; dev@dpdk.org
> Subject: Re:RE: [EXTERNAL] [PATCH v4 2/2] graph: add alignment to the
> member of rte_node
> 
> 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
> 
> 
> 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  */

Fast path area cache line 2

Rest looks good to me.

> 
>         __extension__ struct __rte_cache_aligned {
> 
>  #define RTE_NODE_CTX_SZ 16
> 

Reply via email to