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

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

 



On Tue, Mar 3, 2020 at 3:05 PM Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> On Tue, Mar 03, 2020 at 02:52:19PM +0100, Jinpu Wang wrote:
> > On Tue, Mar 3, 2020 at 10:45 AM Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> > >
> > > On Fri, Feb 21, 2020 at 11:46:59AM +0100, Jack Wang wrote:
> > > > From: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>
> > > >
> > > > These are common private headers with rtrs protocol structures,
> > > > logging, sysfs and other helper functions, which are used on
> > > > both client and server sides.
> > > >
> > > > Signed-off-by: Danil Kipnis <danil.kipnis@xxxxxxxxxxxxxxx>
> > > > Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>
> > > >  drivers/infiniband/ulp/rtrs/rtrs-log.h |  28 ++
> > > >  drivers/infiniband/ulp/rtrs/rtrs-pri.h | 401 +++++++++++++++++++++++++
> > > >  2 files changed, 429 insertions(+)
> > > >  create mode 100644 drivers/infiniband/ulp/rtrs/rtrs-log.h
> > > >  create mode 100644 drivers/infiniband/ulp/rtrs/rtrs-pri.h
> > > >
> > > > diff --git a/drivers/infiniband/ulp/rtrs/rtrs-log.h b/drivers/infiniband/ulp/rtrs/rtrs-log.h
> > > > new file mode 100644
> > > > index 000000000000..53c785b992f2
> > > > +++ b/drivers/infiniband/ulp/rtrs/rtrs-log.h
> > > > @@ -0,0 +1,28 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > > > +/*
> > > > + * RDMA Transport Layer
> > > > + *
> > > > + * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved.
> > > > + * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved.
> > > > + * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved.
> > > > + */
> > > > +#ifndef RTRS_LOG_H
> > > > +#define RTRS_LOG_H
> > > > +
> > > > +#define rtrs_log(fn, obj, fmt, ...)                          \
> > > > +     fn("<%s>: " fmt, obj->sessname, ##__VA_ARGS__)
> > > > +
> > > > +#define rtrs_err(obj, fmt, ...)      \
> > > > +     rtrs_log(pr_err, obj, fmt, ##__VA_ARGS__)
> > > > +#define rtrs_err_rl(obj, fmt, ...)   \
> > > > +     rtrs_log(pr_err_ratelimited, obj, fmt, ##__VA_ARGS__)
> > > > +#define rtrs_wrn(obj, fmt, ...)      \
> > > > +     rtrs_log(pr_warn, obj, fmt, ##__VA_ARGS__)
> > > > +#define rtrs_wrn_rl(obj, fmt, ...) \
> > > > +     rtrs_log(pr_warn_ratelimited, obj, fmt, ##__VA_ARGS__)
> > > > +#define rtrs_info(obj, fmt, ...) \
> > > > +     rtrs_log(pr_info, obj, fmt, ##__VA_ARGS__)
> > > > +#define rtrs_info_rl(obj, fmt, ...) \
> > > > +     rtrs_log(pr_info_ratelimited, obj, fmt, ##__VA_ARGS__)
> > > > +
> > > > +#endif /* RTRS_LOG_H */
> > > > diff --git a/drivers/infiniband/ulp/rtrs/rtrs-pri.h b/drivers/infiniband/ulp/rtrs/rtrs-pri.h
> > > > new file mode 100644
> > > > index 000000000000..aecf01a7d8dc
> > > > +++ b/drivers/infiniband/ulp/rtrs/rtrs-pri.h
> > > > @@ -0,0 +1,401 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > > > +/*
> > > > + * RDMA Transport Layer
> > > > + *
> > > > + * Copyright (c) 2014 - 2018 ProfitBricks GmbH. All rights reserved.
> > > > + * Copyright (c) 2018 - 2019 1&1 IONOS Cloud GmbH. All rights reserved.
> > > > + * Copyright (c) 2019 - 2020 1&1 IONOS SE. All rights reserved.
> > > > + */
> > > > +
> > > > +#ifndef RTRS_PRI_H
> > > > +#define RTRS_PRI_H
> > > > +
> > > > +#include <linux/uuid.h>
> > > > +#include <rdma/rdma_cm.h>
> > > > +#include <rdma/ib_verbs.h>
> > > > +#include <rdma/ib.h>
> > > > +
> > > > +#include "rtrs.h"
> > > > +
> > > > +#define RTRS_PROTO_VER_MAJOR 2
> > > > +#define RTRS_PROTO_VER_MINOR 0
> > >
> > > I think that Jason once said that new submission starts from "1".
> > > There is no RTRS_PROTO_VER_MAJOR == 1 in the wild.
> > sorry, v2 protocol is already in our production, we can simple change back to v1
>
Hi Jason,

> You should arrange this so you can use it in your production, if you
> use something else then we are we upstreaming it?
We do have the plan to use upstream once we are in upstream, and
that's the reason why we spend the effort to push it upstream,
and we sure would like to see it been used outside of our company, so
more users could benefit.
>
> As a community we have had bad experience with companies upstreaming
> something that they ultimately do not use.

That's the part we are doing now, we want to discuss with the
community to get to a win-win situation.
For myself I joined the community for more than 10 years now, started
from upstream a SAS adapter driver called pm8001, I'm still
maintaining it,
reviewing patches and so on. For RNBD/RTRS, I sure will do the same.

Thanks!



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux