IB/rdmavt, hfi1, qib: Modify check_ah() to account for extended LIDs
rvt_check_ah() delegates lid verification to underlying driver. Underlying driver uses different conditions to check for dlid depending on whether the device supports extended LIDs Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@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>
Cette révision appartient à :
@@ -1341,6 +1341,15 @@ int qib_check_ah(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr)
|
||||
if (rdma_ah_get_sl(ah_attr) > 15)
|
||||
return -EINVAL;
|
||||
|
||||
if (rdma_ah_get_dlid(ah_attr) == 0)
|
||||
return -EINVAL;
|
||||
if (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_get_ah_flags(ah_attr) & IB_AH_GRH))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur