RDMA/core: Add a netevent notifier to cma
authorPatrisious Haddad <phaddad@nvidia.com>
Tue, 7 Jun 2022 11:32:44 +0000 (14:32 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Thu, 16 Jun 2022 06:54:42 +0000 (09:54 +0300)
commit925d046e7e52c71c3531199ce137e141807ef740
tree347be7f1443aa9c5d295e5ad5827b99330a92b84
parentfc008bdbf1cd02e36bbfe53ea006b258335d908e
RDMA/core: Add a netevent notifier to cma

Add a netevent callback for cma, mainly to catch NETEVENT_NEIGH_UPDATE.

Previously, when a system with failover MAC mechanism change its MAC address
during a CM connection attempt, the RDMA-CM would take a lot of time till
it disconnects and timesout due to the incorrect MAC address.

Now when we get a NETEVENT_NEIGH_UPDATE we check if it is due to a failover
MAC change and if so, we instantly destroy the CM and notify the user in order
to spare the unnecessary waiting for the timeout.

Link: https://lore.kernel.org/r/bb255c9e301cd50b905663b8e73f7f5133d0e4c5.1654601342.git.leonro@nvidia.com
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma.c
include/rdma/rdma_cm.h