summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYonatan Nachum <ynachum@amazon.com>2026-07-06 17:00:08 +0000
committerLeon Romanovsky <leon@kernel.org>2026-07-12 04:43:17 -0400
commit234895fa8be06e5085ec07fb665d391a88aa5746 (patch)
tree7ec6688e17a56aec8be09819023cf2f5e598acbd /include
parent97ba15272e8e039b767114f244e5f0a5103a6bdf (diff)
RDMA/efa: Add AH cache handling on create and destroy AH
On create AH, first check if the AH cache entry already exists and if so, returns the already stored AH number. If the entry doesn't exist, the driver creates it and calls the device to create the AH. A per-entry mutex serializes concurrent device commands on the same AH cache entry, ensuring only one thread issues the device create while others wait and reuse the result. If the device create fails, the entry's user count remains zero so subsequent threads will retry the device create. On destroy AH, the user count is decremented under the entry mutex. If it reaches zero, the driver issues the device destroy command. After the device destroy completes, it removes the entry from the hashtable and frees it if no other references exist. If new users arrived during the destroy, the entry remains in the hashtable for reuse. Reviewed-by: Firas Jahjah <firasj@amazon.com> Reviewed-by: Michael Margolin <mrgolin@amazon.com> Signed-off-by: Yonatan Nachum <ynachum@amazon.com> Link: https://patch.msgid.link/20260706170008.1039417-3-ynachum@amazon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions