13c5c09390
The shared IB device (sh) has per port data with filed for interrupt
handler port_id. It used by shared interrupt handler to find the
corresponding rte_eth device by IB port index.
If value is equal or greater RTE_MAX_ETHPORTS it means there is no
subhandler installed for specified IB port index.
When a few ports are created under same sh, the sh is created with the
first port and the interrupt handler port_id is initialized to
RTE_MAX_ETHPORTS for each port.
In port creation, the interrupt handler port_id is updated with the
correct value. Since this updating, the mlx5_dev_interrupt_nl_cb
function uses this port and its priv structure.
However, when the ports are closed, this filed isn't updated and the
interrupt handler continue working until it is uninstalled in SH
destruction.
If mlx5_dev_interrupt_nl_cb is called between port closing and SH
destruction, it uses invalid port causing a crash.
This patch adds interrupt handler port_id updating to the close function
and add memory barrier to make sure it is done before priv reset.
Fixes:
|
||
---|---|---|
.. | ||
meson.build | ||
mlx5_ethdev_os.c | ||
mlx5_flow_os.c | ||
mlx5_flow_os.h | ||
mlx5_mp_os.c | ||
mlx5_os.c | ||
mlx5_os.h | ||
mlx5_socket.c | ||
mlx5_verbs.c | ||
mlx5_verbs.h | ||
mlx5_vlan_os.c |