From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Talat Batheesh <talatb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH for-next 3/3] IB/mlx5: Fix mlx5_set_path for Raw Packet QP
Date: Sun, 3 Jul 2016 15:42:07 +0300 [thread overview]
Message-ID: <1467549727-23479-4-git-send-email-leon@kernel.org> (raw)
In-Reply-To: <1467549727-23479-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
From: Talat Batheesh <talatb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
mlx5_set_path returns error when called without GRH in Ethernet
link layer. Since this is not mandatory for Raw Packet QP, it
shouldn't fail in this case.
Added additional check of QP type to make the decision.
Fixes: 2811ba51b049 ('IB/mlx5: Add RoCE fields to Address Vector')
Signed-off-by: Talat Batheesh <talatb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/hw/mlx5/qp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index e9b3a1f..fbd94a9 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2175,7 +2175,8 @@ static int mlx5_set_path(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
}
if (ll == IB_LINK_LAYER_ETHERNET) {
- if (!(ah->ah_flags & IB_AH_GRH))
+ if (!(ah->ah_flags & IB_AH_GRH) &&
+ (qp->ibqp.qp_type != IB_QPT_RAW_PACKET))
return -EINVAL;
memcpy(path->rmac, ah->dmac, sizeof(ah->dmac));
path->udp_sport = mlx5_get_roce_udp_sport(dev, port,
--
2.1.4
--
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
next prev parent reply other threads:[~2016-07-03 12:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-03 12:42 [PATCH for-next 0/3] Raw Packet QP Fixes for 4.8 Leon Romanovsky
[not found] ` <1467549727-23479-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 12:42 ` [PATCH for-next 1/3] IB/core: Add optional AV attribute for Raw Packet QP in INIT to RTR Leon Romanovsky
[not found] ` <1467549727-23479-2-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 21:51 ` Or Gerlitz
[not found] ` <CAJ3xEMiaD99d96RKGwD3OpgEOn0RXjXoaRuFWT6PJdXQSOo5rQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-04 15:33 ` Jason Gunthorpe
[not found] ` <20160704153337.GB23122-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-07-05 6:17 ` Leon Romanovsky
2016-07-03 12:42 ` [PATCH for-next 2/3] IB/core: Fix ib_resolve_eth_dmac for Raw Packet QP Leon Romanovsky
[not found] ` <1467549727-23479-3-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 13:52 ` Or Gerlitz
[not found] ` <CAJ3xEMg+kqmEQ7B_JAKGnu3ubwu5f-40jbeL4Wg9udUeoxEZJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-04 6:10 ` Talat Batheesh
[not found] ` <C8D4A0D8-4D97-4BAB-8FE4-DDEDDDAF9775-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-07-04 12:30 ` Or Gerlitz
2016-07-03 12:42 ` Leon Romanovsky [this message]
[not found] ` <1467549727-23479-4-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 21:55 ` [PATCH for-next 3/3] IB/mlx5: Fix mlx5_set_path " Or Gerlitz
[not found] ` <CAJ3xEMhZiBjQwjgXj8peLYW4wETEE96UJ8BC7TLyO0G_jn-iBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-04 5:14 ` Leon Romanovsky
[not found] ` <20160704051403.GB5289-2ukJVAZIZ/Y@public.gmane.org>
2016-07-04 12:29 ` Or Gerlitz
2016-07-05 6:20 ` [PATCH for-next 0/3] Raw Packet QP Fixes for 4.8 Leon Romanovsky
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=1467549727-23479-4-git-send-email-leon@kernel.org \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=talatb-VPRAkNaXOzVWk0Htik3J/w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox