All of lore.kernel.org
 help / color / mirror / Atom feed
From: Selvin Xavier <selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Naga Irrinki
	<naga.irrinki-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>,
	Selvin Xavier
	<selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
Subject: [PATCH V2 for-4.1 8/9] RDMA/ocrdma: Fail connection for MTU lesser than 512
Date: Tue, 19 May 2015 11:32:39 +0530	[thread overview]
Message-ID: <1432015360-15447-9-git-send-email-selvin.xavier@avagotech.com> (raw)
In-Reply-To: <1432015360-15447-1-git-send-email-selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>

From: Naga Irrinki <naga.irrinki-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>

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

Signed-off-by: Naga Irrinki <naga.irrinki-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
Signed-off-by: Selvin Xavier <selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
---
 drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index ac7347a..47615ff 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -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;
 		}
-- 
2.2.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-05-19  6:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  6:02 [PATCH V2 for-4.1 0/9] ocrdma bug fixes Selvin Xavier
     [not found] ` <1432015360-15447-1-git-send-email-selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>
2015-05-19  6:02   ` [PATCH V2 for-4.1 1/9] RDMA/ocrdma: Fix EQ destroy failure during driver unload Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 2/9] RDMA/ocrdma: Report EQ full fatal error Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 3/9] RDMA/ocrdma: Fix QP state transition in destroy_qp Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 4/9] RDMA/ocrdma: Use VID 0 if PFC is enabled and vlan is not configured Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 5/9] RDMA/ocrdma: Fix the request length for RDMA_QUERY_QP mailbox command to FW Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 6/9] RDMA/ocrdma: Prevent allocation of DPP PDs if FW doesnt support it Selvin Xavier
2015-05-19  6:02   ` [PATCH V2 for-4.1 7/9] RDMA/ocrdma: Fix dmac resolution for link local address Selvin Xavier
2015-05-19  6:02   ` Selvin Xavier [this message]
2015-05-19  6:02   ` [PATCH V2 for-4.1 9/9] RDMA/ocrdma: Update ocrdma version number Selvin Xavier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432015360-15447-9-git-send-email-selvin.xavier@avagotech.com \
    --to=selvin.xavier-1wcphe2jlwo1z/+hsey0gg@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=naga.irrinki-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.