IB/mlx: Set slid to zero in Ethernet completion struct
authorMoni Shoua <monis@mellanox.com>
Sun, 25 Feb 2018 11:39:54 +0000 (13:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:07 +0000 (07:52 +0200)
commitb73bc820c4d1ca3d8cf46a09898c43a446eff6b6
tree4843469e30e2a8d7d8955cfc53f332fda9e820c0
parent2a71d94e4f6b0426cc938d6ae276bd9f8bde3c38
IB/mlx: Set slid to zero in Ethernet completion struct

[ Upstream commit 65389322b28f81cc137b60a41044c2d958a7b950 ]

IB spec says that a lid should be ignored when link layer is Ethernet,
for example when building or parsing a CM request message (CA17-34).
However, since ib_lid_be16() and ib_lid_cpu16()  validates the slid,
not only when link layer is IB, we set the slid to zero to prevent
false warnings in the kernel log.

Fixes: 62ede7779904 ("Add OPA extended LID support")
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx4/cq.c
drivers/infiniband/hw/mlx5/cq.c