]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/core: Delete RoCE GID in hw when corresponding IP is deleted
authorParav Pandit <parav@mellanox.com>
Tue, 18 Dec 2018 12:16:00 +0000 (14:16 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 18 Dec 2018 21:16:44 +0000 (14:16 -0700)
commitbe5914c124bc3179536e5c4598f59aeb4b880517
tree48ee039b9dcd84b2445b1a08a4620eaf52d3501e
parentac2f7e623d47fd68d2517f191696fbc96a5d7270
RDMA/core: Delete RoCE GID in hw when corresponding IP is deleted

Currently a RoCE GID entry is removed from the hardware when all
references to the GID entry drop to zero. This is a change in behavior
from before the fixed patch. The GID entry should be removed from the
hardware when GID entry deletion is requested. This allows the driver
terminate ongoing traffic through the RoCE GID.

While a GID is deleted from the hardware, GID slot in the software GID
cache is not freed. GID slot is freed once all references of such GID are
dropped. This continue to ensure that such GID slot of hardware is not
allocated to new GID entry allocation request. It is allocated once all
references to GID entry drop.

This approach allows drivers to put a tombestone of some kind on the HW
GID index to block the traffic.

Fixes: b150c3862d21 ("IB/core: Introduce GID entry reference counts")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cache.c