IB/mlx4: Handle IPv4 header when demultiplexing MAD
authorMoni Shoua <monis@mellanox.com>
Thu, 10 Nov 2016 09:30:56 +0000 (11:30 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 17 Nov 2016 01:04:48 +0000 (20:04 -0500)
commit850d8fd765079d223d47de89f1f03ab95d1036cb
treee27fdfc27ddc792284e47f01c504a4c49e94f7c9
parentaf4295c117b82a521b05d0daf39ce879d26e6cb1
IB/mlx4: Handle IPv4 header when demultiplexing MAD

When MAD arrives to the hypervisor, we need to identify which slave it
should be sent by destination GID. When L3 protocol is IPv4 the
GRH is replaced by an IPv4 header. This patch detects when IPv4 header
needs to be parsed instead of GRH.

Fixes: b6ffaeffaea4 ('mlx4: In RoCE allow guests to have multiple GIDS')
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/mlx4/mad.c
include/rdma/ib_verbs.h