IB/mlx4: Create and use another QP1 for RoCEv2
authorMoni Shoua <monis@mellanox.com>
Thu, 14 Jan 2016 15:50:42 +0000 (17:50 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:35:01 +0000 (15:35 -0500)
commite1b866c677d69334e2981b19696b7e3d88dff707
tree8e1312541663284bfafca5c2dd0b1cd46d57810c
parent3ef967a4affeef7bb3b7713dcfed6518b99737c6
IB/mlx4: Create and use another QP1 for RoCEv2

The mlx4 driver uses a special QP to implement the GSI QP. This kind
of QP allows to build the InfiniBand headers in software.
When mlx4 hardware builds the packet, it calculates the ICRC and puts
it at the end of the payload. However, this ICRC calculation depends
on the QP configuration, which is determined when the QP is modified
(roce_mode during INIT->RTR).
When receiving a packet, the ICRC verification doesn't depend on this
configuration.
Therefore, using two GSI QPs for send (one for each RoCE version) and
one GSI QP for receive are required.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/infiniband/hw/mlx4/qp.c