summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/cma_priv.h
diff options
context:
space:
mode:
authorPatrisious Haddad <phaddad@nvidia.com>2022-06-07 14:32:43 +0300
committerLeon Romanovsky <leonro@nvidia.com>2022-06-16 09:54:35 +0300
commitfc008bdbf1cd02e36bbfe53ea006b258335d908e (patch)
tree4f55c1946cd4639dbd3f59021fdfb906ecb5bbcf /drivers/infiniband/core/cma_priv.h
parent158e71bb69e368b8b33e8b7c4ac8c111da0c1ae2 (diff)
downloadlinux-fc008bdbf1cd02e36bbfe53ea006b258335d908e.tar.xz
RDMA/core: Add an rb_tree that stores cm_ids sorted by ifindex and remote IP
Add to the cma, a tree that keeps track of all rdma_id_private channels that were created while in RoCE mode. The IDs are sorted first according to their netdevice ifindex then their destination IP. And for IDs with matching IP they would be at the same node in the tree, since the tree data is a list of all ids with matching destination IP. The tree allows fast and efficient lookup of ids using an ifindex and IP address which is useful for identifying relevant net_events promptly. Link: https://lore.kernel.org/r/2fac52c86cc918c634ab24b3867d4aed992f54ec.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>
Diffstat (limited to 'drivers/infiniband/core/cma_priv.h')
-rw-r--r--drivers/infiniband/core/cma_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma_priv.h b/drivers/infiniband/core/cma_priv.h
index 757a0ef79872..b7354c94cf1b 100644
--- a/drivers/infiniband/core/cma_priv.h
+++ b/drivers/infiniband/core/cma_priv.h
@@ -64,6 +64,7 @@ struct rdma_id_private {
struct list_head listen_item;
struct list_head listen_list;
};
+ struct list_head id_list_entry;
struct cma_device *cma_dev;
struct list_head mc_list;