Re: [PATCH v6 03/25] rtrs: private headers with rtrs protocol structs and helpers

Jinpu Wang
2020-01-03T12:31:22Z

On Thu, Jan 2, 2020 at 7:26 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Thu, Jan 02, 2020 at 09:00:53AM -0800, Bart Van Assche wrote:
>
> > > > > +/**
> > > > > + * struct rtrs_msg_conn_req - Client connection request to the server
> > > > > + * @magic: RTRS magic
> > > > > + * @version: RTRS protocol version
> > > > > + * @cid: Current connection id
> > > > > + * @cid_num: Number of connections per session
> > > > > + * @recon_cnt: Reconnections counter
> > > > > + * @sess_uuid: UUID of a session (path)
> > > > > + * @paths_uuid: UUID of a group of sessions (paths)
> > > > > + *
> > > > > + * NOTE: max size 56 bytes, see man rdma_connect().
> > > > > + */
> > > > > +struct rtrs_msg_conn_req {
> > > > > + u8 __cma_version; /* Is set to 0 by cma.c in case of
> > > > > + * AF_IB, do not touch that.
> > > > > + */
> > > > > + u8 __ip_version; /* On sender side that should be
> > > > > + * set to 0, or cma_save_ip_info()
> > > > > + * extract garbage and will fail.
> > > > > + */
> > > >
> > > > The above two fields and the comments next to it look suspicious to me.
> > > > Does RTRS perhaps try to generate CMA-formatted messages without using
> > > > the CMA to format these messages?
> > > The problem is in cma_format_hdr over-writes the first byte for AF_IB
> > > https://www.spinics.net/lists/linux-rdma/msg22397.html
> > >
> > > No one fixes the problem since then.
> >
> > How about adding that URL to the comment block above struct
> > rtrs_msg_conn_req?
>
> Or just fixing whatever the problem is..
>
> Jason
I can do another try if no one else fix the problem, but I have plenty of to-do.

Thanks