Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-07 Thread Roman Penyaev
On Tue, Feb 6, 2018 at 5:10 PM, Jason Gunthorpe wrote: > On Tue, Feb 06, 2018 at 01:01:23PM +0100, Roman Penyaev wrote: > >> >> +static int ibtrs_ib_dev_init(struct ibtrs_ib_dev *d, struct ib_device >> >> *dev) >> >> +{ >> >> + int err; >> >> + >> >> + d->pd = ib_alloc_pd(dev, IB_PD_UN

Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-06 Thread Jason Gunthorpe
On Tue, Feb 06, 2018 at 01:01:23PM +0100, Roman Penyaev wrote: > >> +static int ibtrs_ib_dev_init(struct ibtrs_ib_dev *d, struct ib_device > >> *dev) > >> +{ > >> + int err; > >> + > >> + d->pd = ib_alloc_pd(dev, IB_PD_UNSAFE_GLOBAL_RKEY); > >> + if (IS_ERR(d->pd)) > >> +

Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-06 Thread Roman Penyaev
Hi Sagi, On Mon, Feb 5, 2018 at 11:52 AM, Sagi Grimberg wrote: > Hi Roman, > > Here are some comments below. > >> +int ibtrs_post_recv_empty(struct ibtrs_con *con, struct ib_cqe *cqe) >> +{ >> + struct ib_recv_wr wr, *bad_wr; >> + >> + wr.next= NULL; >> + wr.wr_cqe = cqe; >

Re: [PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-05 Thread Sagi Grimberg
Hi Roman, Here are some comments below. +int ibtrs_post_recv_empty(struct ibtrs_con *con, struct ib_cqe *cqe) +{ + struct ib_recv_wr wr, *bad_wr; + + wr.next= NULL; + wr.wr_cqe = cqe; + wr.sg_list = NULL; + wr.num_sge = 0; + + return ib_post_recv(con->qp

[PATCH 03/24] ibtrs: core: lib functions shared between client and server modules

2018-02-02 Thread Roman Pen
This is a set of library functions existing as a ibtrs-core module, used by client and server modules. Mainly these functions wrap IB and RDMA calls and provide a bit higher abstraction for implementing of IBTRS protocol on client or server sides. Signed-off-by: Roman Pen Signed-off-by: Danil Ki