IB/mlx5: Set correct SL in completion for RoCE
authorMoni Shoua <monis@mellanox.com>
Thu, 20 Apr 2017 10:26:54 +0000 (13:26 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Apr 2017 16:29:31 +0000 (12:29 -0400)
commit12f8fedef2ec94c783f929126b20440a01512c14
tree7bab4cd044dc3a355242f694a579e2e7a0493bab
parent61c0ddbe97721d69ace947d1afa956b7646bcdc9
IB/mlx5: Set correct SL in completion for RoCE

There is a difference when parsing a completion entry between Ethernet
and IB ports. When link layer is Ethernet the bits describe the type of
L3 header in the packet. In the case when link layer is Ethernet and VLAN
header is present the value of SL is equal to the 3 UP bits in the VLAN
header. If VLAN header is not present then the SL is undefined and consumer
of the completion should check if IB_WC_WITH_VLAN is set.

While that, this patch also fills the vlan_id field in the completion if
present.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/cq.c