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>
This commit is contained in:
@@ -169,7 +169,7 @@ int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int mad_ifc_flags,
|
||||
|
||||
op_modifier |= 0x4;
|
||||
|
||||
in_modifier |= ib_slid_cpu16(in_wc->slid) << 16;
|
||||
in_modifier |= ib_lid_cpu16(in_wc->slid) << 16;
|
||||
}
|
||||
|
||||
err = mlx4_cmd_box(dev->dev, inmailbox->dma, outmailbox->dma, in_modifier,
|
||||
@@ -625,7 +625,7 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
|
||||
memcpy((char *)&tun_mad->hdr.slid_mac_47_32, &(wc->smac[4]), 2);
|
||||
} else {
|
||||
tun_mad->hdr.sl_vid = cpu_to_be16(((u16)(wc->sl)) << 12);
|
||||
tun_mad->hdr.slid_mac_47_32 = ib_slid_be16(wc->slid);
|
||||
tun_mad->hdr.slid_mac_47_32 = ib_lid_be16(wc->slid);
|
||||
}
|
||||
|
||||
ib_dma_sync_single_for_device(&dev->ib_dev,
|
||||
@@ -826,7 +826,7 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
}
|
||||
}
|
||||
|
||||
slid = in_wc ? ib_slid_cpu16(in_wc->slid) : be16_to_cpu(IB_LID_PERMISSIVE);
|
||||
slid = in_wc ? ib_lid_cpu16(in_wc->slid) : be16_to_cpu(IB_LID_PERMISSIVE);
|
||||
|
||||
if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP && slid == 0) {
|
||||
forward_trap(to_mdev(ibdev), port_num, in_mad);
|
||||
@@ -860,7 +860,7 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
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 = mlx4_MAD_IFC(to_mdev(ibdev),
|
||||
(mad_flags & IB_MAD_IGNORE_MKEY ? MLX4_MAD_IFC_IGNORE_MKEY : 0) |
|
||||
|
Reference in New Issue
Block a user