[PATCH v2 2/2] lib/graph: default-align rte_graph_cluster_stats
Jerin Jacob
jerinjacobk at gmail.com
Tue Jun 17 17:49:31 CEST 2025
On Tue, Jun 17, 2025 at 9:11 PM Marat Khalili <marat.khalili at huawei.com> wrote:
>
> > -----Original Message-----
> > From: Jerin Jacob <jerinjacobk at gmail.com>
> > Sent: Tuesday 17 June 2025 16:28
> >
> > > -struct __rte_cache_aligned rte_graph_cluster_node_stats {
> > > +struct rte_graph_cluster_node_stats {
> >
> > This is a fastpath structure. No need to change the alignment here.
>
> rte_graph_cluster_stats includes it, so unfortunately would stay cache-aligned regardless of the attributes unless we make rte_graph_cluster_node_stats default-aligned as well. If you are sure that we need to keep node one cache-aligned we can return to rte_malloc solution (or posix_memalign, but I would prefer not to hand-code aligned realloc).
I think, existing following code will take care of this. Are you
seeing the sanitizer issue if the change is only updating
rte_graph_cluster_stats alignment?
/* For a given cluster, max nodes will be the max number of graphs */
cluster_node_size += cluster->nb_graphs * sizeof(struct rte_node *);
cluster_node_size = RTE_ALIGN(cluster_node_size, RTE_CACHE_LINE_SIZE);
>
More information about the dev
mailing list