numam-dpdk/drivers/net/mlx5/linux
Michael Baum 13c5c09390 net/mlx5: fix port event cleaning order
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: 655c3c26c1 ("net/mlx5: fix initial link status detection")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-11-10 18:15:56 +01:00
..
meson.build remove extra blank line at EOF 2022-02-27 21:26:06 +01:00
mlx5_ethdev_os.c net/mlx5: fix build with recent compilers 2022-10-31 20:02:05 +01:00
mlx5_flow_os.c net/mlx5: support ESP item on Windows 2022-06-05 17:04:48 +02:00
mlx5_flow_os.h common/mlx5: add send to kernel flow action 2022-10-26 13:33:28 +02:00
mlx5_mp_os.c net/mlx5: fix Verbs FD leak in secondary process 2022-10-02 09:13:50 +02:00
mlx5_os.c net/mlx5: fix port event cleaning order 2022-11-10 18:15:56 +01:00
mlx5_os.h net/mlx5: fix tunneling support query 2021-10-12 15:29:34 +02:00
mlx5_socket.c common/mlx5: share interrupt management 2022-06-23 17:24:59 +02:00
mlx5_verbs.c net/mlx5: fix Tx recovery 2022-06-01 09:49:42 +02:00
mlx5_verbs.h common/mlx5: add global MR cache create function 2021-10-21 15:57:24 +02:00
mlx5_vlan_os.c common/mlx5: add Netlink event helpers 2022-03-01 16:54:03 +01:00