Add OPA extended LID support
This patch series primarily increases sizes of variables that hold lid values from 16 to 32 bits. Additionally, it adds a check in the IB mad stack to verify a properly formatted MAD when OPA extended LIDs are used. Signed-off-by: Don Hiatt <don.hiatt@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
此提交包含在:
@@ -205,7 +205,7 @@ int mthca_process_mad(struct ib_device *ibdev,
|
||||
u16 *out_mad_pkey_index)
|
||||
{
|
||||
int err;
|
||||
u16 slid = in_wc ? ib_slid_cpu16(in_wc->slid) : be16_to_cpu(IB_LID_PERMISSIVE);
|
||||
u16 slid = in_wc ? ib_lid_cpu16(in_wc->slid) : be16_to_cpu(IB_LID_PERMISSIVE);
|
||||
u16 prev_lid = 0;
|
||||
struct ib_port_attr pattr;
|
||||
const struct ib_mad *in_mad = (const struct ib_mad *)in;
|
||||
@@ -256,7 +256,7 @@ int mthca_process_mad(struct ib_device *ibdev,
|
||||
in_mad->mad_hdr.method == IB_MGMT_METHOD_SET &&
|
||||
in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO &&
|
||||
!ib_query_port(ibdev, port_num, &pattr))
|
||||
prev_lid = (u16)pattr.lid;
|
||||
prev_lid = ib_lid_cpu16(pattr.lid);
|
||||
|
||||
err = mthca_MAD_IFC(to_mdev(ibdev),
|
||||
mad_flags & IB_MAD_IGNORE_MKEY,
|
||||
|
新增問題並參考
封鎖使用者