summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Hiatt <don.hiatt@intel.com>2017-11-06 06:39:15 -0800
committerDoug Ledford <dledford@redhat.com>2017-11-13 15:53:57 -0500
commit19b57c6c449970763bee089466119e09a17199b1 (patch)
tree5f030d44f23f9fd05dd86d42fcd6cdadd9dc5833
parente8d5aff65092aabf89624d18e048c9bf1ce65a2c (diff)
IB/core: Convert OPA AH to IB for Extended LIDs only
When deciding to convert an OPA AH to IB we were incorrectly including the IB multicast range. At this layer, all Extended LIDs will be larger than IB_LID_PERMISSIVE. Change comparison accordingly. Fixes: d541e45500bd ("IB/core: Convert ah_attr from OPA to IB when copying to user") Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/core/uverbs_marshall.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c
index aeb2824efbc7..bb372b4713a4 100644
--- a/drivers/infiniband/core/uverbs_marshall.c
+++ b/drivers/infiniband/core/uverbs_marshall.c
@@ -69,8 +69,7 @@ void ib_copy_ah_attr_to_user(struct ib_device *device,
memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved));
if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) &&
- (rdma_ah_get_dlid(ah_attr) >=
- be16_to_cpu(IB_MULTICAST_LID_BASE)) &&
+ (rdma_ah_get_dlid(ah_attr) > be16_to_cpu(IB_LID_PERMISSIVE)) &&
(!rdma_ah_conv_opa_to_ib(device, &conv_ah, ah_attr)))
src = &conv_ah;