From: "Morten Brørup" <mb@smartsharesystems.com>
To: "David Marchand" <david.marchand@redhat.com>,
"Marat Khalili" <marat.khalili@huawei.com>
Cc: "Jerin Jacob" <jerinjacobk@gmail.com>,
"Jerin Jacob" <jerinj@marvell.com>,
"Kiran Kumar K" <kirankumark@marvell.com>,
"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
"Zhirun Yan" <yanzhirun_163@163.com>,
"Pavan Nikhilesh" <pbhagavatula@marvell.com>, <dev@dpdk.org>
Subject: RE: [PATCH v2 2/2] lib/graph: default-align rte_graph_cluster_stats
Date: Mon, 23 Jun 2025 17:39:53 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FD26@smartserver.smartshare.dk> (raw)
In-Reply-To: <CAJFAV8y9WPa8xGFSPaAzhSvD-Fb8fr8QgFyQSGV2zDT=Bzgc7Q@mail.gmail.com>
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Monday, 23 June 2025 14.08
>
> On Mon, Jun 23, 2025 at 10:53 AM Marat Khalili <marat.khalili@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
next prev parent reply other threads:[~2025-06-23 15:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 15:13 [PATCH v2 1/2] lib/graph: lib/graph: fix memset with NULL Marat Khalili
2025-06-17 15:13 ` [PATCH v2 2/2] lib/graph: default-align rte_graph_cluster_stats Marat Khalili
2025-06-17 15:27 ` Jerin Jacob
2025-06-17 15:41 ` Marat Khalili
2025-06-17 15:49 ` Jerin Jacob
2025-06-17 16:39 ` Marat Khalili
2025-06-23 8:52 ` Marat Khalili
2025-06-23 12:07 ` David Marchand
2025-06-23 12:18 ` Marat Khalili
2025-06-23 15:39 ` Morten Brørup [this message]
2025-06-23 12:06 ` [PATCH v2 1/2] lib/graph: lib/graph: fix memset with NULL David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98CBD80474FA8B44BF855DF32C47DC35E9FD26@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=kirankumark@marvell.com \
--cc=marat.khalili@huawei.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=yanzhirun_163@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).