]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC
authorBryan Tan <bryantan@vmware.com>
Tue, 19 Jan 2021 03:16:29 +0000 (19:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Jan 2021 12:55:18 +0000 (13:55 +0100)
commit1fa2fa7932f9f2e695453ed7160d557eced07bb4
tree8102148c969a5e5c3218f3d1ec00ccbd5e8793f6
parent77727dfda786ce1d333ebc9c8777d821fe86466a
RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC

commit 9f206f7398f6f6ec7dd0198c045c2459b4f720b6 upstream.

The PVRDMA device HW interface defines network_hdr_type according to an
old definition of the internal kernel rdma_network_type enum that has
since changed, resulting in the wrong rdma_network_type being reported.

Fix this by explicitly defining the enum used by the PVRDMA device and
adding a function to convert the pvrdma_network_type to rdma_network_type
enum.

Cc: stable@vger.kernel.org # 5.10+
Fixes: 1c15b4f2a42f ("RDMA/core: Modify enum ib_gid_type and enum rdma_network_type")
Link: https://lore.kernel.org/r/1611026189-17943-1-git-send-email-bryantan@vmware.com
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Signed-off-by: Bryan Tan <bryantan@vmware.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
include/uapi/rdma/vmw_pvrdma-abi.h