Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH for-next] provider/rxe: Support UD network_type patch
@ 2020-10-16 21:25 Bob Pearson
  2020-10-16 21:44 ` Pearson, Robert B
  2020-10-16 22:25 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Bob Pearson @ 2020-10-16 21:25 UTC (permalink / raw)
  To: jgg, zyjzyj2000, linux-rdma; +Cc: 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.

Reference: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI")
Signed-off-by: Bob Pearson <rpearson@hpe.com>
---
 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(-)

diff --git a/kernel-headers/rdma/rdma_user_rxe.h b/kernel-headers/rdma/rdma_user_rxe.h
index d8f2e0e4..e591d8c1 100644
--- a/kernel-headers/rdma/rdma_user_rxe.h
+++ b/kernel-headers/rdma/rdma_user_rxe.h
@@ -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;
diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index 3af58bfb..f270d410 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -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);
diff --git a/providers/rxe/rxe.h b/providers/rxe/rxe.h
index 96f4ee9c..628adf21 100644
--- a/providers/rxe/rxe.h
+++ b/providers/rxe/rxe.h
@@ -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;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH for-next] provider/rxe: Support UD network_type patch
  2020-10-16 21:25 [PATCH for-next] provider/rxe: Support UD network_type patch Bob Pearson
@ 2020-10-16 21:44 ` Pearson, Robert B
  2020-10-16 22:25 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Pearson, Robert B @ 2020-10-16 21:44 UTC (permalink / raw)
  To: Bob Pearson, jgg, zyjzyj2000, linux-rdma

From: Bob Pearson <rpearsonhpe@gmail.com> 
Sent: Friday, October 16, 2020 4:25 PM
To: jgg@nvidia.com; zyjzyj2000@gmail.com; linux-rdma@vger.kernel.org
Cc: Pearson, Robert B <robert.pearson2@hpe.com>
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")
Signed-off-by: Bob Pearson <rpearson@hpe.com>
---


Actually the last sentence is wrong. The existing version will also work.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next] provider/rxe: Support UD network_type patch
  2020-10-16 21:25 [PATCH for-next] provider/rxe: Support UD network_type patch Bob Pearson
  2020-10-16 21:44 ` Pearson, Robert B
@ 2020-10-16 22:25 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-10-16 22:25 UTC (permalink / raw)
  To: Bob Pearson; +Cc: zyjzyj2000, linux-rdma, Bob Pearson

On Fri, Oct 16, 2020 at 04:25:00PM -0500, Bob Pearson wrote:
> 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?

> Reference: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI")
> Signed-off-by: Bob Pearson <rpearson@hpe.com>
>  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(-)
> 
> diff --git a/kernel-headers/rdma/rdma_user_rxe.h b/kernel-headers/rdma/rdma_user_rxe.h
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 21:25 [PATCH for-next] provider/rxe: Support UD network_type patch Bob Pearson
2020-10-16 21:44 ` Pearson, Robert B
2020-10-16 22:25 ` Jason Gunthorpe

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git