Skip to contentSkip to conversation

provider/rxe: Support UD network_type patch

PATCH In review Bob Pearson 3 participants 3 messages Oct 16, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

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
index d8f2e0e4..e591d8c1 100644
@@ -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
index 3af58bfb..f270d410 100644
@@ -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
index 96f4ee9c..628adf21 100644
@@ -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
#1 lore raw

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.

maintainer
#2 lore raw
In reply to Bob Pearson
Quoted 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")

 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
index d8f2e0e4..e591d8c1 100644
+++ 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