Dengdui Huang b83616ad92 ethdev: fix strict aliasing lead to link cannot be up
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.

[1] Strict aliasing problem with rte_eth_linkstatus_set()
    https://marc.info/?l=dpdk-dev&m=171274148514777&w=3

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
(cherry picked from commit 776b3090fb193bc8abe55d7a0ea19e44601b7607)
2024-04-12 17:09:20 +08:00
2024-01-11 15:28:18 +08:00
2024-01-11 15:28:18 +08:00
2020-10-19 09:29:55 +08:00
Description
No description provided
130 MiB
Languages
Diff 100%