From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
"fengchengwen" <fengchengwen@huawei.com>,
"Ferruh Yigit" <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, "Dengdui Huang" <huangdengdui@huawei.com>
Subject: RE: Strict aliasing problem with rte_eth_linkstatus_set()
Date: Wed, 10 Apr 2024 19:54:27 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F391@smartserver.smartshare.dk> (raw)
In-Reply-To: <20240410082704.4691d7df@hermes.local>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, 10 April 2024 17.27
>
> On Wed, 10 Apr 2024 17:33:53 +0800
> fengchengwen <fengchengwen@huawei.com> wrote:
>
> > Last: We think there are two ways to solve this problem.
> > 1. Add the compilation option '-fno-strict-aliasing' for hold DPDK
> project.
> > 2. Use union to avoid such aliasing in rte_eth_linkstatus_set (please
> see above).
> > PS: We prefer first way.
> >
>
> Please send a patch to replace alias with union.
+1
Fixing this specific bug would be good.
Instinctively, I think we should build with -fno-strict-aliasing, so the compiler doesn't make the same mistake with similar code elsewhere in DPDK. I fear there is more than this instance.
I also wonder if -Wstrict-aliasing could help us instead, if we don't want -fno-strict-aliasing.
next prev parent reply other threads:[~2024-04-10 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 9:33 fengchengwen
2024-04-10 10:30 ` Morten Brørup
2024-04-10 15:57 ` Ferruh Yigit
2024-04-11 2:03 ` fengchengwen
2024-04-10 15:27 ` Stephen Hemminger
2024-04-10 15:58 ` Ferruh Yigit
2024-04-10 17:54 ` Morten Brørup [this message]
2024-04-10 19:58 ` Tyler Retzlaff
2024-04-11 3:20 ` fengchengwen
2024-04-10 21:18 ` Stephen Hemminger
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=98CBD80474FA8B44BF855DF32C47DC35E9F391@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=huangdengdui@huawei.com \
--cc=stephen@networkplumber.org \
/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).