Re: [PATCH rdma-next] RDMA/ucma: Return stable IB device index as identifier

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

 



On Mon, May 04, 2020 at 02:09:29PM +0300, Leon Romanovsky wrote:
> On Mon, May 04, 2020 at 02:01:23PM +0300, Gal Pressman wrote:
> > On 30/04/2020 18:29, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > >
> > > The librdmacm uses node_guid as identifier to correlate between
> > > IB devices and CMA devices. However FW resets cause to such
> > > "connection" to be lost and require from the user to restart
> > > its application.
> > >
> > > Extend UCMA to return IB device index, which is stable identifier.
> > >
> > > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> > > ---
> > > diff --git a/include/uapi/rdma/rdma_user_cm.h b/include/uapi/rdma/rdma_user_cm.h
> > > index e545f2de1e13..14d48b462d91 100644
> > > --- a/include/uapi/rdma/rdma_user_cm.h
> > > +++ b/include/uapi/rdma/rdma_user_cm.h
> > > @@ -168,6 +168,7 @@ struct rdma_ucm_query_route_resp {
> > >  	__u32 num_paths;
> > >  	__u8 port_num;
> > >  	__u8 reserved[3];
> > > +	__u32 ibdev_index;
> > >  };
> > >
> > >  struct rdma_ucm_query_addr_resp {
> > > @@ -179,6 +180,7 @@ struct rdma_ucm_query_addr_resp {
> > >  	__u16 dst_size;
> > >  	struct __kernel_sockaddr_storage src_addr;
> > >  	struct __kernel_sockaddr_storage dst_addr;
> > > +	__u32 ibdev_index;
> > >  };
> >
> > Should both these structs size be aligned to 8 bytes?
>
> Are you asking about 8 bytes or 64 bytes?
> Because u32 is aligned to 8 bytes.

Sorry, of course, you are right.

>
> Thanks



[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