diff options
author | Mark Zhang <markzhang@nvidia.com> | 2024-06-16 19:08:37 +0300 |
---|---|---|
committer | Leon Romanovsky <leonro@nvidia.com> | 2024-07-01 15:38:04 +0300 |
commit | 36e97bbc2dca61751c5b4b7f248cd850a7654a19 (patch) | |
tree | 91e8ca9a1cba45319f8d5448245a6221efe40c22 /include/rdma | |
parent | bca51197620a257e2954be99b16f05115c3b2630 (diff) | |
download | lwn-36e97bbc2dca61751c5b4b7f248cd850a7654a19.tar.gz lwn-36e97bbc2dca61751c5b4b7f248cd850a7654a19.zip |
RDMA: Set type of rdma_ah to IB for a SMI sub device
An address handle created on a SMI port has type IB, as a SMI
port it's used for SMI management through umad.
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Link: https://lore.kernel.org/r/195be77aae0cce93522269f22f1303d2ccbef605.1718553901.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_verbs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d4128958908f..e09d4f09b602 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -4662,6 +4662,8 @@ static inline enum rdma_ah_attr_type rdma_ah_find_type(struct ib_device *dev, return RDMA_AH_ATTR_TYPE_OPA; return RDMA_AH_ATTR_TYPE_IB; } + if (dev->type == RDMA_DEVICE_TYPE_SMI) + return RDMA_AH_ATTR_TYPE_IB; return RDMA_AH_ATTR_TYPE_UNDEFINED; } |