> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, 10 April 2024 17.27 > > On Wed, 10 Apr 2024 17:33:53 +0800 > fengchengwen <fengcheng...@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.