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

Commit 72d8a013 authored by Naga Irrinki's avatar Naga Irrinki Committed by Doug Ledford
Browse files

RDMA/ocrdma: Fail connection for MTU lesser than 512



HW currently restricts the IB MTU range between 512 and 4096.
Fail connection for MTUs lesser than 512.

Signed-off-by: default avatarNaga Irrinki <naga.irrinki@avagotech.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@avagotech.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d27b2f15
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2534,8 +2534,10 @@ static int ocrdma_set_qp_params(struct ocrdma_qp *qp,
		cmd->flags |= OCRDMA_QP_PARA_DST_QPN_VALID;
	}
	if (attr_mask & IB_QP_PATH_MTU) {
		if (attrs->path_mtu < IB_MTU_256 ||
		if (attrs->path_mtu < IB_MTU_512 ||
		    attrs->path_mtu > IB_MTU_4096) {
			pr_err("ocrdma%d: IB MTU %d is not supported\n",
			       dev->id, ib_mtu_enum_to_int(attrs->path_mtu));
			status = -EINVAL;
			goto pmtu_err;
		}