IB/core: Set RoCEv2 MGID according to spec
authorNoa Osherovich <[email protected]>
Mon, 12 Jun 2017 08:14:03 +0000 (11:14 +0300)
committerDoug Ledford <[email protected]>
Mon, 24 Jul 2017 14:40:23 +0000 (10:40 -0400)
commitbe1d325a335840a86c133a56c6a911c368bac0fd
tree99f54a1d65b2ae6726e8f76f47d281dab31e5bbf
parent5236333592244557a19694a51337df6ac018f0a7
IB/core: Set RoCEv2 MGID according to spec

RoCEv2 Annex states that for RoCEv2 over IPv4, the corresponding
IPv4 address is encoded into the GID according to the following rule:
GID= :ffff:<IPv4 address>

Remove the 0xff0e prefix for RoCEv2 packets with IPv4 and leave it
zeroed and change rdma_is_multicast_addr() to consider the new logic.

Signed-off-by: Noa Osherovich <[email protected]>
Reviewed-by: Moni Shoua <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/infiniband/core/cma.c
drivers/infiniband/core/verbs.c
include/rdma/ib_addr.h