Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread fengchengwen
Hi All, On 2024/4/11 3:58, Tyler Retzlaff wrote: > On Wed, Apr 10, 2024 at 07:54:27PM +0200, Morten Brørup wrote: >>> From: Stephen Hemminger [mailto:step...@networkplumber.org] >>> Sent: Wednesday, 10 April 2024 17.27 >>> >>> On Wed, 10 Apr 2024 17:33:53 +0800 >>> fengchengwen wrote: >>> La

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread fengchengwen
Hi Morten, On 2024/4/10 18:30, Morten Brørup wrote: >> From: fengchengwen [mailto:fengcheng...@huawei.com] >> Sent: Wednesday, 10 April 2024 11.34 >> >> Hi All, >> >> We have a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), >> we've done some >> research but haven't been able to

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Stephen Hemminger
On Wed, 10 Apr 2024 19:54:27 +0200 Morten Brørup wrote: > > 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

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Tyler Retzlaff
On Wed, Apr 10, 2024 at 07:54:27PM +0200, Morten Brørup wrote: > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > Sent: Wednesday, 10 April 2024 17.27 > > > > On Wed, 10 Apr 2024 17:33:53 +0800 > > fengchengwen wrote: > > > > > Last: We think there are two ways to solve this pro

RE: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Wednesday, 10 April 2024 17.27 > > On Wed, 10 Apr 2024 17:33:53 +0800 > fengchengwen wrote: > > > Last: We think there are two ways to solve this problem. > > 1. Add the compilation option '-fno-strict-aliasing' for hold DPDK

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Ferruh Yigit
On 4/10/2024 4:27 PM, Stephen Hemminger wrote: > On Wed, 10 Apr 2024 17:33:53 +0800 > fengchengwen 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_

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Ferruh Yigit
On 4/10/2024 11:30 AM, Morten Brørup wrote: >> From: fengchengwen [mailto:fengcheng...@huawei.com] >> Sent: Wednesday, 10 April 2024 11.34 >> >> Hi All, >> >> We have a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), >> we've done some >> research but haven't been able to figure o

Re: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Stephen Hemminger
On Wed, 10 Apr 2024 17:33:53 +0800 fengchengwen 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 fi

RE: Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread Morten Brørup
> From: fengchengwen [mailto:fengcheng...@huawei.com] > Sent: Wednesday, 10 April 2024 11.34 > > Hi All, > > We have a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), > we've done some > research but haven't been able to figure out why. We'd like the community's > help. > > Env

Strict aliasing problem with rte_eth_linkstatus_set()

2024-04-10 Thread fengchengwen
Hi All, We have a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), we've done some research but haven't been able to figure out why. We'd like the community's help. Environment: 1. Source: DPDK 23.11 2. GCC: 12.3.1 [1] 3. Compiled with target kunpeng SoC (ARM64) 4. Run on kunpe