Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc63f9d5 authored by Or Gerlitz's avatar Or Gerlitz Committed by Doug Ledford
Browse files

IB/mlx4: Support raw packet protocol



Mark support for the new raw packet protocol on Eth ports.

Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 72cd5717
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2546,15 +2546,18 @@ static int mlx4_port_immutable(struct ib_device *ibdev, u8 port_num,

	if (mlx4_ib_port_link_layer(ibdev, port_num) == IB_LINK_LAYER_INFINIBAND) {
		immutable->core_cap_flags = RDMA_CORE_PORT_IBA_IB;
		immutable->max_mad_size = IB_MGMT_MAD_SIZE;
	} else {
		if (mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)
			immutable->core_cap_flags = RDMA_CORE_PORT_IBA_ROCE;
		if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2)
			immutable->core_cap_flags = RDMA_CORE_PORT_IBA_ROCE |
				RDMA_CORE_PORT_IBA_ROCE_UDP_ENCAP;
	}

		immutable->core_cap_flags |= RDMA_CORE_PORT_RAW_PACKET;
		if (immutable->core_cap_flags & (RDMA_CORE_PORT_IBA_ROCE |
		    RDMA_CORE_PORT_IBA_ROCE_UDP_ENCAP))
			immutable->max_mad_size = IB_MGMT_MAD_SIZE;
	}

	return 0;
}