provider/rxe: Support UD network_type patch
PATCH 1/1 provider/rxe: Support UD network_type patch
The patch referenced below changed the type of the enum to be returned in send WQEs to the kernel. This patch makes the corresponding change to the rxe provider. Without this change the driver is not functional.
Reference: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI")
--- kernel-headers/rdma/rdma_user_rxe.h | 6 ++++++ providers/rxe/rxe.c | 2 +- providers/rxe/rxe.h | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-)
kernel-headers/rdma/rdma_user_rxe.h +6 -0
@@ -39,6 +39,11 @@#include <linux/in.h> #include <linux/in6.h> +enum { +RXE_NETWORK_TYPE_IPV4 =1 , +RXE_NETWORK_TYPE_IPV6 =2 , +}; +union rxe_gid {__u8 raw[16 ];struct {
@@ -57,6 +62,7 @@ struct rxe_global_route {struct rxe_av {__u8 port_num; +/* From RXE_NETWORK_TYPE_* */ __u8 network_type;__u8 dmac[6 ];struct rxe_global_route grh;
providers/rxe/rxe.c +1 -1
@@ -801,7 +801,7 @@ static struct ibv_ah *rxe_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr)memcpy (&av->grh, &attr->grh,sizeof (attr->grh)); av->network_type =ipv6_addr_v4mapped ((struct in6_addr *)attr->grh.dgid.raw) ? -RDMA_NETWORK_IPV4 :RDMA_NETWORK_IPV6 ; +RXE_NETWORK_TYPE_IPV4 :RXE_NETWORK_TYPE_IPV6 ;rdma_gid2ip (&av->sgid_addr, &sgid);rdma_gid2ip (&av->dgid_addr, &attr->grh.dgid);
providers/rxe/rxe.h +0 -6
@@ -42,12 +42,6 @@#include <rdma/rdma_user_rxe.h> /* struct rxe_av */ #include "rxe-abi.h" -enum rdma_network_type { -RDMA_NETWORK_IB , -RDMA_NETWORK_IPV4 , -RDMA_NETWORK_IPV6 -}; -struct rxe_device {struct verbs_device ibv_dev;int abi_version;
Signature · 1 line
2.25.1
From: Bob Pearson <[email protected]>
Sent: Friday, October 16, 2020 4:25 PM
To: [email protected]; [email protected]; [email protected]
Cc: Pearson, Robert B <[email protected]>
Subject: [PATCH for-next] provider/rxe: Support UD network_type patch
The patch referenced below changed the type of the enum to be returned in send WQEs to the kernel. This patch makes the corresponding change to the rxe provider. Without this change the driver is not functional.
Reference: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI")
---
Actually the last sentence is wrong. The existing version will also work.
Jason Gunthorpe
maintainerQuoted 3 lines · Bob Pearson
The patch referenced below changed the type of the enum to be returned in send WQEs to the kernel. This patch makes the corresponding change to the rxe provider. Without this change the driver is not functional.
?? The enum values didn't change so it should be functional, right?
kernel-headers/rdma/rdma_user_rxe.h line 40
Quoted 13 lines
Reference:
e0d696d201dd("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI")Signed-off-by Bob Pearson <[email protected]>kernel-headers/rdma/rdma_user_rxe.h | 6 ++++++ providers/rxe/rxe.c | 2 +- providers/rxe/rxe.h | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-)kernel-headers/rdma/rdma_user_rxe.h +1
-0+++ b/kernel-headers/rdma/rdma_user_rxe.h@@ -39,6 +39,11 @@#include <linux/in.h> #include <linux/in6.h>
Updating kernel-headers/ requires two commits the first is made automatically by the kernel-headers/update script which keeps everything in sync
Jason