Strict aliasing problem with rte_eth_linkstatus_set()
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Wed Apr 10 17:27:04 CEST 2024
    
    
  
On Wed, 10 Apr 2024 17:33:53 +0800
fengchengwen <fengchengwen at 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.
PS: you can also override aliasing for a few lines of code with either pragma's
or lots of casting. Both are messy and hard to maintain.
    
    
More information about the dev
mailing list