diff options
author | Bryan Tan <bryantan@vmware.com> | 2017-08-22 23:19:00 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-24 17:34:57 -0400 |
commit | 05297b66ad874f6b650498a39af5a4e353e5ba19 (patch) | |
tree | 28605b9a9d295cf8d9b104b0f7b250b6dbad95e7 /drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | |
parent | IB/ipoib: Enable ioctl for to IPoIB rdma netdevs (diff) | |
download | linux-dev-05297b66ad874f6b650498a39af5a4e353e5ba19.tar.xz linux-dev-05297b66ad874f6b650498a39af5a4e353e5ba19.zip |
RDMA/vmw_pvrdma: Add RoCEv2 support
The driver version is bumped for compatibility purposes. Also, send correct
GID type during register to device. Added compatibility check macros for
the device.
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Signed-off-by: Bryan Tan <bryantan@vmware.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c')
-rw-r--r-- | drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c index ec6a4ca1eeb7..fb0c5c0976b3 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_misc.c @@ -303,3 +303,10 @@ void rdma_ah_attr_to_pvrdma(struct pvrdma_ah_attr *dst, dst->port_num = rdma_ah_get_port_num(src); memcpy(&dst->dmac, src->roce.dmac, sizeof(dst->dmac)); } + +u8 ib_gid_type_to_pvrdma(enum ib_gid_type gid_type) +{ + return (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) ? + PVRDMA_GID_TYPE_FLAG_ROCE_V2 : + PVRDMA_GID_TYPE_FLAG_ROCE_V1; +} |