diff mbox

[for-next,2/3] IB/core: Fix ib_resolve_eth_dmac for Raw Packet QP

Message ID 1467549727-23479-3-git-send-email-leon@kernel.org (mailing list archive)
State Changes Requested
Headers show

Commit Message

Leon Romanovsky July 3, 2016, 12:42 p.m. UTC
From: Talat Batheesh <talatb@mellanox.com>

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@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
---
 drivers/infiniband/core/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Or Gerlitz July 3, 2016, 1:52 p.m. UTC | #1
On Sun, Jul 3, 2016 at 3:42 PM, Leon Romanovsky <leon@kernel.org> wrote:
> From: Talat Batheesh <talatb@mellanox.com>
>
> 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.

What "release address resolution" means?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Talat Batheesh July 4, 2016, 6:10 a.m. UTC | #2
Sent from my iPhone
> On 3 Jul 2016, at 3:52 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
> 
>> On Sun, Jul 3, 2016 at 3:42 PM, Leon Romanovsky <leon@kernel.org> wrote:
>> From: Talat Batheesh <talatb@mellanox.com>
>> 
>> 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.
> 
> What "release address resolution" means?
Oops sorry for the typo error, "real" not "release".

Yours,
Talat
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Or Gerlitz July 4, 2016, 12:30 p.m. UTC | #3
On Mon, Jul 4, 2016 at 9:10 AM, Talat Batheesh <talatb@mellanox.com> wrote:
>> On 3 Jul 2016, at 3:52 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:

>> What "release address resolution" means?

> Oops sorry for the typo error, "real" not "release".

whatever, fix it for V2, unless you really (really?) want that to be
for ever in the kernel log in this confusing way
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;