From: "Steve Wise" <swise@opengridcomputing.com>
To: 'Leon Romanovsky' <leon@kernel.org>
Cc: 'Jason Gunthorpe' <jgg@ziepe.ca>,
'David Ahern' <dsahern@gmail.com>,
stephen@networkplumber.org, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org
Subject: RE: [PATCH v2 iproute2-next 3/6] rdma: Add CM_ID resource tracking information
Date: Tue, 27 Mar 2018 11:20:25 -0500 [thread overview]
Message-ID: <026701d3c5e7$838c65d0$8aa53170$@opengridcomputing.com> (raw)
In-Reply-To: <20180327160150.GB1877@mtr-leonro.local>
> On Tue, Mar 27, 2018 at 10:45:30AM -0500, Steve Wise wrote:
> >
> > >
> > > On Tue, Mar 27, 2018 at 06:15:44PM +0300, Leon Romanovsky wrote:
> > > > On Tue, Mar 27, 2018 at 08:44:55AM -0600, Jason Gunthorpe wrote:
> > > > > On Tue, Mar 27, 2018 at 06:21:41AM +0300, Leon Romanovsky
> wrote:
> > > > > > On Mon, Mar 26, 2018 at 04:30:33PM -0600, Jason Gunthorpe
> wrote:
> > > > > > > On Mon, Mar 26, 2018 at 04:34:44PM -0500, Steve Wise wrote:
> > > > > > > >
> > > > > > > > On 3/26/2018 4:15 PM, Jason Gunthorpe wrote:
> > > > > > > > > On Mon, Mar 26, 2018 at 09:30:41AM -0500, Steve Wise
> wrote:
> > > > > > > > >>
> > > > > > > > >> On 3/26/2018 9:17 AM, David Ahern wrote:
> > > > > > > > >>> On 2/27/18 9:07 AM, Steve Wise wrote:
> > > > > > > > >>>> diff --git a/rdma/rdma.h b/rdma/rdma.h
> > > > > > > > >>>> index 5809f70..e55205b 100644
> > > > > > > > >>>> +++ b/rdma/rdma.h
> > > > > > > > >>>> @@ -18,10 +18,12 @@
> > > > > > > > >>>> #include <libmnl/libmnl.h>
> > > > > > > > >>>> #include <rdma/rdma_netlink.h>
> > > > > > > > >>>> #include <time.h>
> > > > > > > > >>>> +#include <net/if_arp.h>
> > > > > > > > >>>>
> > > > > > > > >>>> #include "list.h"
> > > > > > > > >>>> #include "utils.h"
> > > > > > > > >>>> #include "json_writer.h"
> > > > > > > > >>>> +#include <rdma/rdma_cma.h>
> > > > > > > > >>>>
> > > > > > > > >>> did you forget to add rdma_cma.h? I don't see that file
in
> my
> > > repo.
> > > > > > > > >> It is provided by the rdma-core package, upon which rdma
> tool
> > > now
> > > > > > > > >> depends for the rdma_port_space enum.
> > > > > > > > > It is a kernel bug that enum is not in an
include/uapi/rdma
> > > header
> > > > > > > > >
> > > > > > > > > Fix it there and don't try to use rdma-core headers to get
> kernel
> > > ABI.
> > > > > > > > >
> > > > > > > > > Jason
> > > > > > > >
> > > > > > > > I wish you'd commented on this just a little sooner. I just
> resent
> > > v3
> > > > > > > > of this series... with rdma_cma.h included. :)
> > > > > > > >
> > > > > > > > How about the restrack/nldev code just translates the port
> space
> > > from
> > > > > > > > enum rdma_port_space to a new ABI enum, say
> > > nldev_rdma_port_space, that
> > > > > > > > i add to rdma_netlink.h? I'd hate to open the can of worms
of
> > > trying to
> > > > > > > > split rdma_cma.h into uabi and no uabi headers. :(
> > > > > > >
> > > > > > > If port space is already part of the ABI there isn't much
reason to
> > > > > > > translate it.
> > > > > > >
> > > > > > > You just need to pick the right header to put it in, since it
is a
> verbs
> > > > > > > define it doesn't belong in the netlink header.
> > > > > >
> > > > > > I completely understand Steve's concerns.
> > > > > >
> > > > > > I tried to do such thing (expose kernel headers) in first
incarnation
> of
> > > > > > rdmatool with attempt to clean IB/core as well to ensure that we
> > > won't expose
> > > > > > anything that is not implemented. It didn't go well.
> > > > >
> > > > > rdma-core is now using the kernel uapi/ headers natively, seems to
> be
> > > > > going OK. What problem did you face?
> > > >
> > > > I didn't agree to move to UAPI defines which are not implemented and
> > > not
> > > > used in the kernel, so I sent small number of patches similar to
those
> [1,
> > > 2].
> > > >
> > > > Those patches were rejected.
> > > >
> > > > So please don't mix Steve's need to use 3 defines with very large
and
> > > > painful task to expose proper UAPIs.
> > >
> > > Steve can just move the 3 defines he needs to the uapi, we are doing
> > > this incrementally..
> > >
> > > rdma_core does not define kernel ABI and it is totally wrong to use
> > > random constants from rdma_cma.h as kernel ABI.
> > >
> >
> > Proposal:
> >
> > Since the cm_id port space is part of the rdma_ucm_create_id struct in
> include/uapi/rdma/rdma_user_cm.h, I'll move the rdma_port_space enum
> there. And then my iproute2 series will have to add a copy of
> rdma_user_cm.h locally into rdma/include/uapi/rdma, right?
> >
> > Will that work for everyone?
>
> You need to remove _PS from that structure and from the kernel with
> justification that it is safe to do.
>
> Thanks
I'm pretty sure port space is needed. That struct is used to create a user
mode cm_id...
WARNING: multiple messages have this Message-ID (diff)
From: "Steve Wise" <swise@opengridcomputing.com>
To: "'Leon Romanovsky'" <leon@kernel.org>
Cc: "'Jason Gunthorpe'" <jgg@ziepe.ca>,
"'David Ahern'" <dsahern@gmail.com>, <stephen@networkplumber.org>,
<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH v2 iproute2-next 3/6] rdma: Add CM_ID resource tracking information
Date: Tue, 27 Mar 2018 11:20:25 -0500 [thread overview]
Message-ID: <026701d3c5e7$838c65d0$8aa53170$@opengridcomputing.com> (raw)
In-Reply-To: <20180327160150.GB1877@mtr-leonro.local>
> On Tue, Mar 27, 2018 at 10:45:30AM -0500, Steve Wise wrote:
> >
> > >
> > > On Tue, Mar 27, 2018 at 06:15:44PM +0300, Leon Romanovsky wrote:
> > > > On Tue, Mar 27, 2018 at 08:44:55AM -0600, Jason Gunthorpe wrote:
> > > > > On Tue, Mar 27, 2018 at 06:21:41AM +0300, Leon Romanovsky
> wrote:
> > > > > > On Mon, Mar 26, 2018 at 04:30:33PM -0600, Jason Gunthorpe
> wrote:
> > > > > > > On Mon, Mar 26, 2018 at 04:34:44PM -0500, Steve Wise wrote:
> > > > > > > >
> > > > > > > > On 3/26/2018 4:15 PM, Jason Gunthorpe wrote:
> > > > > > > > > On Mon, Mar 26, 2018 at 09:30:41AM -0500, Steve Wise
> wrote:
> > > > > > > > >>
> > > > > > > > >> On 3/26/2018 9:17 AM, David Ahern wrote:
> > > > > > > > >>> On 2/27/18 9:07 AM, Steve Wise wrote:
> > > > > > > > >>>> diff --git a/rdma/rdma.h b/rdma/rdma.h
> > > > > > > > >>>> index 5809f70..e55205b 100644
> > > > > > > > >>>> +++ b/rdma/rdma.h
> > > > > > > > >>>> @@ -18,10 +18,12 @@
> > > > > > > > >>>> #include <libmnl/libmnl.h>
> > > > > > > > >>>> #include <rdma/rdma_netlink.h>
> > > > > > > > >>>> #include <time.h>
> > > > > > > > >>>> +#include <net/if_arp.h>
> > > > > > > > >>>>
> > > > > > > > >>>> #include "list.h"
> > > > > > > > >>>> #include "utils.h"
> > > > > > > > >>>> #include "json_writer.h"
> > > > > > > > >>>> +#include <rdma/rdma_cma.h>
> > > > > > > > >>>>
> > > > > > > > >>> did you forget to add rdma_cma.h? I don't see that file
in
> my
> > > repo.
> > > > > > > > >> It is provided by the rdma-core package, upon which rdma
> tool
> > > now
> > > > > > > > >> depends for the rdma_port_space enum.
> > > > > > > > > It is a kernel bug that enum is not in an
include/uapi/rdma
> > > header
> > > > > > > > >
> > > > > > > > > Fix it there and don't try to use rdma-core headers to get
> kernel
> > > ABI.
> > > > > > > > >
> > > > > > > > > Jason
> > > > > > > >
> > > > > > > > I wish you'd commented on this just a little sooner. I just
> resent
> > > v3
> > > > > > > > of this series... with rdma_cma.h included. :)
> > > > > > > >
> > > > > > > > How about the restrack/nldev code just translates the port
> space
> > > from
> > > > > > > > enum rdma_port_space to a new ABI enum, say
> > > nldev_rdma_port_space, that
> > > > > > > > i add to rdma_netlink.h? I'd hate to open the can of worms
of
> > > trying to
> > > > > > > > split rdma_cma.h into uabi and no uabi headers. :(
> > > > > > >
> > > > > > > If port space is already part of the ABI there isn't much
reason to
> > > > > > > translate it.
> > > > > > >
> > > > > > > You just need to pick the right header to put it in, since it
is a
> verbs
> > > > > > > define it doesn't belong in the netlink header.
> > > > > >
> > > > > > I completely understand Steve's concerns.
> > > > > >
> > > > > > I tried to do such thing (expose kernel headers) in first
incarnation
> of
> > > > > > rdmatool with attempt to clean IB/core as well to ensure that we
> > > won't expose
> > > > > > anything that is not implemented. It didn't go well.
> > > > >
> > > > > rdma-core is now using the kernel uapi/ headers natively, seems to
> be
> > > > > going OK. What problem did you face?
> > > >
> > > > I didn't agree to move to UAPI defines which are not implemented and
> > > not
> > > > used in the kernel, so I sent small number of patches similar to
those
> [1,
> > > 2].
> > > >
> > > > Those patches were rejected.
> > > >
> > > > So please don't mix Steve's need to use 3 defines with very large
and
> > > > painful task to expose proper UAPIs.
> > >
> > > Steve can just move the 3 defines he needs to the uapi, we are doing
> > > this incrementally..
> > >
> > > rdma_core does not define kernel ABI and it is totally wrong to use
> > > random constants from rdma_cma.h as kernel ABI.
> > >
> >
> > Proposal:
> >
> > Since the cm_id port space is part of the rdma_ucm_create_id struct in
> include/uapi/rdma/rdma_user_cm.h, I'll move the rdma_port_space enum
> there. And then my iproute2 series will have to add a copy of
> rdma_user_cm.h locally into rdma/include/uapi/rdma, right?
> >
> > Will that work for everyone?
>
> You need to remove _PS from that structure and from the kernel with
> justification that it is safe to do.
>
> Thanks
I'm pretty sure port space is needed. That struct is used to create a user
mode cm_id...
next prev parent reply other threads:[~2018-03-27 16:20 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 19:55 [PATCH v2 iproute2-next 0/6] cm_id, cq, mr, and pd resource tracking Steve Wise
2018-02-27 16:06 ` [PATCH v2 iproute2-next 1/6] rdma: update rdma_netlink.h Steve Wise
2018-02-27 16:07 ` [PATCH v2 iproute2-next 2/6] rdma: initialize the rd struct Steve Wise
2018-03-13 18:11 ` Leon Romanovsky
2018-02-27 16:07 ` [PATCH v2 iproute2-next 3/6] rdma: Add CM_ID resource tracking information Steve Wise
2018-03-13 18:07 ` Leon Romanovsky
2018-03-13 19:44 ` Steve Wise
2018-03-26 14:17 ` David Ahern
2018-03-26 14:30 ` Steve Wise
2018-03-26 14:44 ` David Ahern
2018-03-26 14:55 ` Steve Wise
2018-03-26 15:08 ` Leon Romanovsky
2018-03-26 15:24 ` Steve Wise
2018-03-26 17:06 ` Leon Romanovsky
2018-03-26 17:13 ` Steve Wise
2018-03-26 17:27 ` Leon Romanovsky
2018-03-26 21:15 ` Jason Gunthorpe
2018-03-26 21:34 ` Steve Wise
2018-03-26 22:30 ` Jason Gunthorpe
2018-03-27 3:21 ` Leon Romanovsky
2018-03-27 14:44 ` Jason Gunthorpe
2018-03-27 15:15 ` Leon Romanovsky
2018-03-27 15:23 ` Jason Gunthorpe
2018-03-27 15:45 ` Steve Wise
2018-03-27 15:45 ` Steve Wise
2018-03-27 16:01 ` Leon Romanovsky
2018-03-27 16:20 ` Steve Wise [this message]
2018-03-27 16:20 ` Steve Wise
2018-03-27 16:30 ` Leon Romanovsky
2018-03-27 16:38 ` Steve Wise
2018-03-27 16:38 ` Steve Wise
2018-03-26 15:40 ` David Ahern
2018-03-26 19:55 ` Steve Wise
2018-02-27 16:07 ` [PATCH v2 iproute2-next 4/6] rdma: Add CQ " Steve Wise
2018-03-13 19:05 ` Leon Romanovsky
2018-02-27 16:07 ` [PATCH v2 iproute2-next 5/6] rdma: Add MR " Steve Wise
2018-03-13 19:06 ` Leon Romanovsky
2018-02-27 16:07 ` [PATCH v2 iproute2-next 6/6] rdma: Add PD " Steve Wise
2018-03-13 19:07 ` Leon Romanovsky
2018-03-12 15:16 ` [PATCH v2 iproute2-next 0/6] cm_id, cq, mr, and pd resource tracking Steve Wise
2018-03-12 17:53 ` David Ahern
2018-03-12 18:43 ` Steve Wise
2018-03-13 8:32 ` Leon Romanovsky
2018-03-13 20:45 ` David Ahern
2018-03-13 20:58 ` Doug Ledford
2018-03-16 16:18 ` David Ahern
2018-03-20 17:21 ` Doug Ledford
2018-03-21 16:59 ` David Ahern
2018-03-22 20:20 ` Steve Wise
2018-03-22 20:26 ` David Ahern
2018-03-13 21:13 ` Jason Gunthorpe
2018-03-15 3:14 ` David Ahern
2018-03-15 3:29 ` Jason Gunthorpe
2018-03-16 16:08 ` David Ahern
2018-03-16 16:23 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='026701d3c5e7$838c65d0$8aa53170$@opengridcomputing.com' \
--to=swise@opengridcomputing.com \
--cc=dsahern@gmail.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.