Re: [PATCH v7] ethdev: fix strict aliasing lead to link cannot be up

2024-04-21 Thread fengchengwen
Hi Ferruh, On 2024/4/19 23:25, Ferruh Yigit wrote: > On 4/18/2024 8:28 AM, Chengwen Feng wrote: >> Fix a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), >> which will lead the hns3 NIC can't link up. The root cause is strict >> aliasing violation in rte_eth_linkstatus_set() with

Re: [PATCH v7] ethdev: fix strict aliasing lead to link cannot be up

2024-04-19 Thread Ferruh Yigit
On 4/18/2024 8:28 AM, Chengwen Feng wrote: > Fix a problem introduced by a compiler upgrade (from gcc10 to gcc12.3), > which will lead the hns3 NIC can't link up. The root cause is strict > aliasing violation in rte_eth_linkstatus_set() with hns3 driver, see > [1] for more details. > > This commit

Re: [PATCH v7] ethdev: fix strict aliasing lead to link cannot be up

2024-04-19 Thread Ferruh Yigit
On 4/18/2024 8:28 AM, Chengwen Feng wrote: > @@ -1701,12 +1696,10 @@ static inline void > rte_eth_linkstatus_get(const struct rte_eth_dev *dev, > struct rte_eth_link *link) > { > - RTE_ATOMIC(uint64_t) *src = (uint64_t __rte_atomic > *)&(dev->data->dev_link); > - uin