Thread (1 message) 1 message, 1 author, 2016-07-03

[PATCH for-next 3/3] IB/mlx5: Fix mlx5_set_path for Raw Packet QP

DORMANTno replies

From: Leon Romanovsky <hidden>
Date: 2016-07-03 12:42:07
Subsystem: infiniband subsystem, mellanox mlx5 ib driver, the rest · Maintainers: Jason Gunthorpe, Leon Romanovsky, Linus Torvalds

Possibly related (same subject, not in this thread)

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help