Message ID | 20201016212459.23140-1-rpearson@hpe.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | [for-next] provider/rxe: Support UD network_type patch | expand |
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.
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
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;
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(-)