All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libibverbs V3 0/3] Add support for UD QPs under RoCE IP addressing
@ 2014-05-08  6:51 Or Gerlitz
       [not found] ` <1399531883-30599-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Or Gerlitz @ 2014-05-08  6:51 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, matanb-VPRAkNaXOzVWk0Htik3J/w,
	yishaih-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	Or Gerlitz

Hi Roland,

This series adds support for Ethernet L2 address resolution for RoCE UD QPs,
whose L2 address-handles, unlike RC/UC/XRC/etc QPs are set from user space
without going through uverbs and the kernel IB core. The code is also
compatible both with old kernels that don't run IP based addressing.

Matan and Or.

changes from V2:
  - when using libnl3, link libibverbs itself with libnl3 and not the utilities
  - fix memory leak which took place when nl_addr_cmp_prefix_msb returns non zero.
  - rebased against libibverbs-1.1.8

changes from V1, addressed feedback from Yann Droneaud:
  - ported the code to libnl3 with automatic fallback option to libnl1
  - better error handling (more checks to erroneous flows)
  - fixed typos and removed blank lines
  - set close-on-exec open flag for the relevant fds
  - remove wrong comment from the change-log of patch #1

changes from V0:
 - don't change struct ibv_port_attr flags field from uint32_t
   to enum (size could change)
 - ibv_ah_attr_ex is extendable and contains ibv_ah_attr

Matan Barak (3):
  Add ibv_port_cap_flags
  Use neighbour lookup for RoCE UD QPs Eth L2 resolution
  Add ibv_query_port_ex support

 Makefile.am                |   10 +-
 configure.ac               |   31 ++
 include/infiniband/verbs.h |  160 +++++++-
 src/device.c               |    2 +
 src/neigh.c                | 1001 ++++++++++++++++++++++++++++++++++++++++++++
 src/neigh.h                |   53 +++
 src/verbs.c                |  164 +++++++-
 7 files changed, 1415 insertions(+), 6 deletions(-)
 create mode 100644 src/neigh.c
 create mode 100644 src/neigh.h

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: [PATCH libibverbs V3 2/3] Use neighbour lookup for RoCE UD QPs Eth L2 resolution
@ 2014-05-08 20:05 Or Gerlitz
       [not found] ` <CAJZOPZLrLL444ce_hXdnN5_JPfUVAy_Qsj+eVo2-YG3Jqqe01Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Or Gerlitz @ 2014-05-08 20:05 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Or Gerlitz, Roland Dreier, linux-rdma, Matan Barak, Yishai Hadas,
	Doug Ledford

On Thu, May 8, 2014 at 10:29 PM, Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
>
> On Thu, May 08, 2014 at 09:51:22AM +0300, Or Gerlitz wrote:
>
> > In order to implement RoCE IP based addressing for UD QPs, without
> > introducing uverbs changes, we need a way to resolve the L2 Ethernet
> > addresses from user-space.
>
> Please put anything that changes the public verbs ABI in a seperate
> patch.
>
> Burying the create_ah_ex stuff in this giant thing is not condusive to
> reviewing the ABI portion.
>
> The ABI is *important* do everything you can to bring as many eyes as
> possible to those changes!!
>
> > +struct ibv_ah_attr_ex {
> > +     struct ibv_global_route grh;
> > +     uint16_t                dlid;
> > +     uint8_t                 sl;
> > +     uint8_t                 src_path_bits;
> > +     uint8_t                 static_rate;
> > +     uint8_t                 is_global;
> > +     uint8_t                 port_num;
> > +     uint32_t                comp_mask;
> > +     struct {
> > +             enum ll_address_type type;
> > +             uint32_t        len;
> > +             char            *address;
> > +     } ll_address;
> > +     uint16_t                vid;
> > +};
>
> The above looks sorta reasonable, but:
>
> What is the 'char *address'? Should it be 'const void *' ?????



Hi Jason,

Thanks for looking && commenting, Matan and myself will digest your
feedback and respond/fix what's needed. BTW - note that this is V3
where V0/1/2 were posted three months ago, where the earlier rounds of
reviewers were focused on other portions of the series. So better late
than never, review on the verbs extensions elements now happens :)

>
>
> Who owns that memory? Who allocates it, who frees it? Seems sketchy
> as heck.
>
> What happens if a ibv_ah_attr_ex is returned in some kind of
> ibv_qp_attr_ex structure from a future query_qp?
>
> Can you just put in a 'uint64_t address[8];' or sockaddr_storage, or
> something?
>
> > +
> >  enum ibv_srq_attr_mask {
> >       IBV_SRQ_MAX_WR  = 1 << 0,
> >       IBV_SRQ_LIMIT   = 1 << 1
> > @@ -968,11 +998,14 @@ enum verbs_context_mask {
> >       VERBS_CONTEXT_QP        = 1 << 2,
> >       VERBS_CONTEXT_CREATE_FLOW = 1 << 3,
> >       VERBS_CONTEXT_DESTROY_FLOW = 1 << 4,
> > -     VERBS_CONTEXT_RESERVED  = 1 << 5
> > +     VERBS_CONTEXT_CREATE_AH = 1 << 5,
> > +     VERBS_CONTEXT_RESERVED  = 1 << 6
> >  };
>
> What is going on here??
>
> verbs_context_mask is messed up already!?
>
> It is NOT supposed to be a mask if the function is available - we
> can already test for NULL for that.
>
> It is supposed to indicate if structures *allocated by the provider*
> are extended.
>
> For instance if VERBS_CONTEXT_QP is set, then everyone knows that the
> 'struct ibv_qp' returned by *any* driver function (crate_qp, open_qp,
> create_qp_ex) is convertible to 'verbs_qp'.
>
> VERBS_CONTEXT_CREATE_FLOW/VERBS_CONTEXT_DESTROY_FLOW are screwed
> up. They shouldn't even exist, there is no unextended ibv_flow
> structure to worry about.
>
> Fix this patch to not add VERBS_CONTEXT_CREATE_AH, ibv_ah_attr_ex is
> not a provider allocated structure so it doesn't need an entry.
>
> Please send a patch to remove the screwed up two above and replace
> with RESERVED.
>
> And BE MORE CAREFUL. THIS SHOULD NOT HAVE HAPPENED!
>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-05-13 20:02 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-08  6:51 [PATCH libibverbs V3 0/3] Add support for UD QPs under RoCE IP addressing Or Gerlitz
     [not found] ` <1399531883-30599-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-08  6:51   ` [PATCH libibverbs V3 1/3] Add ibv_port_cap_flags Or Gerlitz
2014-05-08  6:51   ` [PATCH libibverbs V3 2/3] Use neighbour lookup for RoCE UD QPs Eth L2 resolution Or Gerlitz
     [not found]     ` <1399531883-30599-3-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-08 19:29       ` Jason Gunthorpe
2014-05-08  6:51   ` [PATCH libibverbs V3 3/3] Add ibv_query_port_ex support Or Gerlitz
     [not found]     ` <1399531883-30599-4-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-08 19:09       ` Jason Gunthorpe
     [not found]         ` <20140508190951.GB25849-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-08 19:40           ` Christoph Lameter
     [not found]             ` <alpine.DEB.2.10.1405081439370.26267-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-08 19:47               ` Jason Gunthorpe
2014-05-09 14:01           ` Roland Dreier
     [not found]             ` <CAL1RGDUiBtOaYKZVR3ghOZzG6J0p5EV5o4FTTW0E43mHz-BaVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-09 18:10               ` Jason Gunthorpe
     [not found]                 ` <20140509181043.GC18257-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-09 18:20                   ` Roland Dreier
     [not found]                     ` <CAL1RGDVmeTKz1TXGLP+h4t9ffuaVeBCkWKPC2AuFyygcNweRWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-09 18:39                       ` Hefty, Sean
2014-05-09 18:40                       ` Jason Gunthorpe
2014-05-11 12:35                   ` Or Gerlitz
     [not found]                     ` <536F6EAC.8020109-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-12  6:35                       ` Jason Gunthorpe
2014-05-12 12:22           ` Matan Barak
     [not found]             ` <5370BCF2.7050107-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-12 16:43               ` Jason Gunthorpe
     [not found]                 ` <20140512164323.GA20666-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-12 21:57                   ` Roland Dreier
     [not found]                     ` <CAL1RGDXYwPHrS7dSWg0ojyiPG7TF1Y0800q801kWvMxoyn3c8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-13 13:18                       ` Doug Ledford
     [not found]                     ` <23840589.5954.1399987081862.JavaMail."DougLedford"@Phenom>
2014-05-13 20:02                       ` Jason Gunthorpe
2014-05-08 20:05 [PATCH libibverbs V3 2/3] Use neighbour lookup for RoCE UD QPs Eth L2 resolution Or Gerlitz
     [not found] ` <CAJZOPZLrLL444ce_hXdnN5_JPfUVAy_Qsj+eVo2-YG3Jqqe01Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-08 20:15   ` Jason Gunthorpe
     [not found]     ` <20140508201549.GA32622-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-08 20:22       ` Or Gerlitz
     [not found]         ` <CAJZOPZJzcvQLar+Hkgbg3CGhVGrydsbgomocpiEAagan63MmdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-08 20:46           ` Jason Gunthorpe
2014-05-09 14:03       ` Roland Dreier

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.