]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcd9dcd05b78c359a3de6394798bba7a03f87c69b
tree7bab4cd044dc3a355242f694a579e2e7a0493bab
parentce9e2279f461d4d1b7f949d513c1f9b2e60d43d3
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