numam-dpdk/drivers/net
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
..
af_packet drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
af_xdp drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ark drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
atlantic eal: remove unneeded includes from a public header 2022-09-21 15:31:03 +02:00
avp drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
axgbe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
bnx2x drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
bnxt net/bnxt: support proactive error handling mode 2022-10-17 08:34:05 +02:00
bonding net/bonding: fix mbuf fast free handling 2022-11-10 07:40:22 +01:00
cnxk common/cnxk: generate MD5 ipad opad 2022-10-29 13:01:40 +02:00
cxgbe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
dpaa net/dpaa: fix buffer freeing in slow path 2022-10-07 17:19:03 +02:00
dpaa2 net/dpaa2: fix buffer freeing on SG Tx 2022-10-07 17:19:03 +02:00
e1000 drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ena drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
enetc drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
enetfec drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
enic drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
failsafe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
fm10k drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
gve drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
hinic drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
hns3 drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
i40e ethdev: remove Rx header split port offload 2022-10-04 11:20:04 +02:00
iavf net/iavf: fix handling of IPsec events 2022-10-25 17:38:30 +02:00
ice net/ice: support VXLAN-GPE tunnel offload 2022-10-25 17:33:30 +02:00
idpf drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
igc drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ionic drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ipn3ke bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
ixgbe net/ixgbe: fix security session destroy 2022-10-25 17:33:30 +02:00
kni drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
liquidio drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
mana drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
memif drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
mlx4 drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
mlx5 net/mlx5: fix port event cleaning order 2022-11-10 18:15:56 +01:00
mvneta drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
mvpp2 drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
netvsc drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
nfb drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
nfp drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ngbe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
null drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
octeon_ep drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
octeontx ethdev: remove deprecated Flow Director configuration 2022-08-31 15:24:23 +02:00
pcap drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
pfe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
qede drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
ring drivers: mark SW PMDs to support disabling IOVA as PA 2022-10-09 13:14:57 +02:00
sfc drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
softnic net/softnic: fix file descriptor leak 2022-10-04 01:08:39 +02:00
tap drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
thunderx drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
txgbe drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
vdev_netvsc drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
vhost bus/vdev: make driver-only headers private 2022-09-23 16:14:34 +02:00
virtio drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
vmxnet3 drivers: omit symbol map when unneeded 2022-11-14 15:22:46 +01:00
meson.build net/idpf: support device initialization 2022-10-31 14:29:55 +01:00