WSL2-Linux-Kernel/drivers/infiniband/hw/mlx4
Jack Morgenstein eed7624552 RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled
The cited patch added a type field to structures ib_ah and rdma_ah_attr.

Function mlx4_ib_query_ah() builds an rdma_ah_attr structure from the
data in an mlx4_ib_ah structure (which contains both an ib_ah structure
and an address vector).

For mlx4_ib_query_ah() to work properly, the type field in the contained
ib_ah structure must be set correctly.

In the outgoing MAD tunneling flow, procedure mlx4_ib_multiplex_mad()
paravirtualizes a MAD received from a slave and sends the processed
mad out over the wire. During this processing, it populates an
mlx4_ib_ah structure and calls mlx4_ib_query_ah().

The cited commit overlooked setting the type field in the contained
ib_ah structure before invoking mlx4_ib_query_ah(). As a result, the
type field remained uninitialized, and the rdma_ah_attr structure was
incorrectly built. This resulted in improperly built MADs being sent out
over the wire.

This patch properly initializes the type field in the contained ib_ah
structure before calling mlx4_ib_query_ah(). The rdma_ah_attr structure
is then generated correctly.

Fixes: 44c58487d5 ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-06-01 17:04:51 -04:00
..
Kconfig net: mellanox: add DEVLINK dependencies 2016-03-03 17:08:59 -05:00
Makefile
ah.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
alias_GUID.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00
cm.c IB/mlx4: Fix incorrect order of formal and actual parameters 2017-05-01 15:04:23 -04:00
cq.c IB: Replace ib_umem page_size by page_shift 2017-04-25 15:40:28 -04:00
doorbell.c IB: Refactor umem to use linear SG table 2014-03-04 10:34:28 -08:00
mad.c RDMA/mlx4: Fix MAD tunneling when SRIOV is enabled 2017-06-01 17:04:51 -04:00
main.c IB/mlx4: Change vma from shared to private 2017-04-21 12:26:05 -04:00
mcg.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
mlx4_ib.h IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
mr.c IB: Replace ib_umem page_size by page_shift 2017-04-25 15:40:28 -04:00
qp.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
srq.c IB: Replace ib_umem page_size by page_shift 2017-04-25 15:40:28 -04:00
sysfs.c IB: Query ports via the core instead of direct into the driver 2017-02-14 11:41:22 -05:00