> From: David Marchand [mailto:david.march...@redhat.com] > Sent: Monday, 23 June 2025 14.08 > > On Mon, Jun 23, 2025 at 10:53 AM Marat Khalili <marat.khal...@huawei.com> > wrote: > > > > We cannot just remove __rte_cache_aligned from rte_graph_cluster_stats > without removing it from rte_graph_cluster_node_stats because of how C works. > But we can perhaps use rte_malloc to align our allocations in a way that > matches the declaration. Would it be an ok solution? > > rte_malloc is not required. > I have a fix in an branch of mine, that makes use of aligned_alloc > (which is C11), you need to manually copy data in stats_mem_populate.
MSVC doesn't support aligned_alloc(). For MSVC, you have to use _aligned_malloc() and _aligned_free(), like in the "lcore variables" library: https://elixir.bootlin.com/dpdk/v25.03/source/lib/eal/common/eal_common_lcore_var.c