All of lore.kernel.org
 help / color / mirror / Atom feed
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 2/3] IB/core: Fix ib_resolve_eth_dmac for Raw Packet QP
Date: Sun,  3 Jul 2016 15:42:06 +0300	[thread overview]
Message-ID: <1467549727-23479-3-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>

For Raw Packet QP, the AV attribute is passed in INIT to RTR in order
to set the Ethernet Priority using the SL. The rest of the fields
aren't necessarily valid, which causes the ib_resolve_eth_dmac to fail.

Since no release address resolution is needed, don't do anything in
ib_resolve_eth_dmac for Raw Packet QP.

Fixes: dbf727de7440 ('IB/core: Use GID table in AH creation and ...')
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/core/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index ba75780..d41e403 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1171,7 +1171,7 @@ int ib_resolve_eth_dmac(struct ib_qp *qp,
 {
 	int           ret = 0;
 
-	if (*qp_attr_mask & IB_QP_AV) {
+	if ((*qp_attr_mask & IB_QP_AV) && (qp->qp_type != IB_QPT_RAW_PACKET)) {
 		if (qp_attr->ah_attr.port_num < rdma_start_port(qp->device) ||
 		    qp_attr->ah_attr.port_num > rdma_end_port(qp->device))
 			return -EINVAL;
-- 
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

  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   ` Leon Romanovsky [this message]
     [not found]     ` <1467549727-23479-3-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 13:52       ` [PATCH for-next 2/3] IB/core: Fix ib_resolve_eth_dmac for Raw Packet QP 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   ` [PATCH for-next 3/3] IB/mlx5: Fix mlx5_set_path " Leon Romanovsky
     [not found]     ` <1467549727-23479-4-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-07-03 21:55       ` 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-3-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 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.