Re: [PATCH v1 rdma-next 2/2] RDMA/CMA: Add rdma_port_space to UAPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 28, 2018 at 12:58:36PM -0500, Steve Wise wrote:
> 
> 
> On 3/28/2018 11:57 AM, Steve Wise wrote:
> >
> > On 3/28/2018 11:44 AM, Jason Gunthorpe wrote:
> >> On Wed, Mar 28, 2018 at 10:40:56AM -0500, Steve Wise wrote:
> >>> Doug/Jason,
> >>>
> >>> Seems like I got the authdates screwed up again. These show up in
> >>> reverse order in patchwork. Would you like a respin?
> >> I can manage..
> >>
> >>> These two will enable me to finalize the associated rdma tool submission.
> >> I can't find a user API user of this though? Is netlink introducing
> >> the first user? I'm confused. I thought umca used this
> >> someplace. Maybe I just can't find it today.
> > Hrm... you're right. I don't see any code using rdma_ucm_create_id. I
> > do see ucma_abi_create_id from rdma_cma_abi.h used in
> > librdmacm:rdma_create_id2() called by rdma_create_id() . And
> > ucma_abi_create_id has a ps field. So perhaps the correct header file
> > is rdma_cma_abi.h? But I don't see that file in the kernel at all.
> >
> > /me confused. 
> 
> The kernel side, in ucma.c, is using struct rdma_ucm_create_id to parse
> the u->k RDMA_USER_CM_CMD_CREATE_ID command. So its UAPI header is
> include/uapi/rdma/rdma_user_cm.h. The user side is using struct
> ucma_abi_create_id from rdma-core/librdmacm/rdma_cma_abi.h.
> 
> Jason, how should I proceed?

I grabbed the patch but revised it so someone else might be able to
figure this out..

--- a/include/uapi/rdma/rdma_user_cm.h
+++ b/include/uapi/rdma/rdma_user_cm.h
@@ -70,6 +70,14 @@ enum {
        RDMA_USER_CM_CMD_JOIN_MCAST
 };
 
+/* See IBTA Annex A11, servies ID bytes 4 & 5 */
+enum rdma_ucm_port_space {
+       RDMA_PS_IPOIB = 0x0002,
+       RDMA_PS_IB    = 0x013F,
+       RDMA_PS_TCP   = 0x0106,
+       RDMA_PS_UDP   = 0x0111,
+};
+
 /*
  * command ABI structures.
  */
@@ -82,7 +90,7 @@ struct rdma_ucm_cmd_hdr {
 struct rdma_ucm_create_id {
        __aligned_u64 uid;
        __aligned_u64 response;
-       __u16 ps;
+       __u16 ps;                  /* use enum rdma_port_space */
        __u8  qp_type;
        __u8  reserved[5];
 };

And all the changes to rename to rdma_ucm_port_space

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux