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

Ferruh Yigit ferruh.yigit at amd.com
Mon Apr 22 12:54:49 CEST 2024


On 4/22/2024 7:38 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 use union to avoid such aliasing violation. Also the
> impacted components (cxgbe and qos_sched) have been adapted to the
> struct change.
> 
> [1] https://inbox.dpdk.org/dev/8175c905-e661-b910-7f20-59b6ab605c38@huawei.com/
> 
> Cc: stable at dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
>

Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>

Applied to dpdk-next-net/main, thanks.


More information about the dev mailing list