All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] XRC upstream merge reboot
@ 2011-05-16 21:13 Hefty, Sean
       [not found] ` <1828884A29C6694DAF28B7E6B8A82373F7AB-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 53+ messages in thread
From: Hefty, Sean @ 2011-05-16 21:13 UTC (permalink / raw)
  To: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

I've been working on a set of XRC patches aimed at upstream inclusion to the kernel, libibverbs, and librdmacm.  I'm using existing patches as the major starting point.  A goal is to maintain the user space ABI.  Before proceeding further, I wanted to get broader feedback.  Starting at the top and working down, these are the basic ideas:


librdmacm
---------
The API is basically unchanged.  XRC usage is indicated through the QP type.  The challenge is determining if XRC maps to a specific rdma_port_space.


libibverbs
----------
We define a new device capability flag IBV_DEVICE_EXT_OPS, indicating that the library supports extended operations.  If set, the provider library returns an extended structure from ibv_open_device():

	struct ibv_context_ext {
		struct ibv_context context;
		int                version;
		struct ibv_ext_ops ext_ops;
	};

The ext_ops will allow for additional operations not provided by ibv_context_ops, for example:

	struct ibv_ext_ops {
		int	(share_pd)(struct ibv_pd *pd, int fd, int oflags);
	};

In order for libibverbs to check for ext_ops support, it steals a byte from the device name:

	/*
	 * Support for extended operations is recorded at the end of
	 * the name character array.
	 */
	#define ext_ops_cap            name[IBV_SYSFS_NAME_MAX - 1]

(If strlen(name) indicates that this byte terminates the string, extended operation support is disabled for this device.)

Hopefully, this provides the framework needed for libibverbs to support both old and new provider libraries.

>From an architecture viewpoint, XRC adds 4 new XRC specific objects: domains, INI QPs, TGT QPs, and SRQs.  For the purposes of the libibverbs API only, I'm suggesting the following mappings:

XRC domains - Hidden under a PD, dynamically allocated when needed.  An extended ops call allows the xrcd to be shared between processes.  This minimizes changes to existing structures and APIs which only take a struct ibv_pd.

INI QPs - Exposed through a new IBV_QPT_XRC_SQ qp type.  This is a send-only QP with minimal differences from an RC QP from a user's perspective.

TGT QPs - Not exposed to user space.  XRC TGT QP creation and setup is handled by the kernel.

XRC SRQs - Exposed through a new IBV_QPT_XRC_RQ qp type.  This is an SRQ that is tracked using a struct ibv_qp.  This minimizes API changes to both libibverbs and librdmacm.

If ext_ops are supported and in active use, extended structures may be expected with some calls, such as ibv_post_send() requiring a struct ibv_xrc_send_wr for XRC QPs.

	struct ibv_xrc_send_wr {
		struct ibv_send_wr wr;
		uint32_t remote_qpn;
	};


uverbs
------
(Ideas for kernel changes are sketchier, but the existing patches cover most of the functionality except for IB CM interactions.)

Need new uverbs commands to support alloc/dealloc xrcd and create xrc srq.  Create QP must handle XRC INI QPs.  XRC TGT QPs are not exposed; ***all XRC INI->TGT QP setup is done in band***.

Somewhere, an xrc sub-module listens on a SID and accepts incoming XRC connection requests.  This requires associating the xrcd and SID, the details of which I'm not clear on.  The xrcd is most readily known to uverbs, but a SID is usually formed by the rdma_cm.  Even how the latter is done is unclear.

The usage model I envision is for a user to call listen on an XRC SRQ (IBV_QPT_XRC_RQ), which listens for a SIDR REQ to resolve the SRQN and a REQ to setup the INI->TGT QPs.  The issue is sync'ing the lifetime of any formed connections with the xrcd.


verbs
-----
The patch for this is basically available.  3 new calls are added: ib_create_xrc_srq, ib_alloc_xrcd, and ib_dealloc_xrcd.  The IB_QPT_XRC is split into 2 types: IB_QPT_INI_XRC and IB_QPT_TGT_XRC.  An INI QP has a pd, but no xrcd, while the TGT QP is the reverse.


Existing patches to the mlx4 driver and library would be modified to handle these changes.  If anyone has any thoughts on these changes, I'd appreciate them before I have them implemented.  :)

- Sean
--
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] 53+ messages in thread

end of thread, other threads:[~2011-08-22 15:46 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 21:13 [RFC] XRC upstream merge reboot Hefty, Sean
     [not found] ` <1828884A29C6694DAF28B7E6B8A82373F7AB-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-18 14:54   ` Jack Morgenstein
     [not found]     ` <201105181754.33759.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-05-18 15:27       ` Hefty, Sean
2011-06-22  7:17       ` Jack Morgenstein
     [not found]         ` <201106221017.06212.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-22 16:14           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373029A95-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-06-22 17:03               ` Jack Morgenstein
     [not found]                 ` <201106222003.50214.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-22 18:19                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373029B3F-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-06-22 19:21                       ` Jack Morgenstein
     [not found]                         ` <201106222221.05993.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-22 19:32                           ` Tziporet Koren
2011-06-22 19:57                           ` Hefty, Sean
     [not found]                             ` <1828884A29C6694DAF28B7E6B8A82373029BDE-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-06-23  6:11                               ` Jack Morgenstein
2011-06-23  6:35                               ` Jack Morgenstein
     [not found]                                 ` <201106230935.07425.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-23 18:03                                   ` Hefty, Sean
2011-07-20 18:51                                   ` Hefty, Sean
     [not found]                                     ` <1828884A29C6694DAF28B7E6B8A82373136F63B9-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-07-21  7:38                                       ` Jack Morgenstein
     [not found]                                         ` <201107211038.23000.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-07-21  7:57                                           ` Jack Morgenstein
2011-07-21 11:58                                           ` Jeff Squyres
     [not found]                                             ` <D8276D45-5FE8-464C-B3A4-14404DE8C760-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-07-21 12:47                                               ` Jack Morgenstein
     [not found]                                                 ` <201107211547.31850.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-07-21 12:46                                                   ` Jeff Squyres
2011-07-21 16:06                                                   ` Hefty, Sean
2011-07-21 17:53                                           ` Hefty, Sean
     [not found]                                             ` <1828884A29C6694DAF28B7E6B8A82373136F6691-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-07-26 20:04                                               ` Shamis, Pavel
     [not found]                                                 ` <26AE60A9-D055-4D40-A830-5AADDBA20ED8-1Heg1YXhbW8@public.gmane.org>
2011-08-01 15:03                                                   ` Hefty, Sean
     [not found]                                                     ` <1828884A29C6694DAF28B7E6B8A82373136F9075-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-01 16:20                                                       ` Shamis, Pavel
     [not found]                                                         ` <AE625966-FD97-4DBF-A024-22B83B5F3E39-1Heg1YXhbW8@public.gmane.org>
2011-08-01 18:28                                                           ` Hefty, Sean
     [not found]                                                             ` <1828884A29C6694DAF28B7E6B8A82373136F9194-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-02 10:44                                                               ` Jack Morgenstein
     [not found]                                                                 ` <201108021344.25284.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-02 16:29                                                                   ` Shamis, Pavel
     [not found]                                                                     ` <32D25205-3E9C-4757-B0AB-7117BDF3F2F7-1Heg1YXhbW8@public.gmane.org>
2011-08-03 10:37                                                                       ` Jack Morgenstein
     [not found]                                                                         ` <201108031337.24527.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-10 22:20                                                                           ` Hefty, Sean
     [not found]                                                                             ` <1828884A29C6694DAF28B7E6B8A8237316E3E55C-Q3cL8pyY+6ukrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-11 14:12                                                                               ` Shamis, Pavel
2011-08-21 14:42                                                                               ` Jack Morgenstein
     [not found]                                                                                 ` <201108211742.18803.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-22 15:46                                                                                   ` Hefty, Sean
2011-08-02 19:08                                                               ` Shamis, Pavel
     [not found]                                                                 ` <EABE213A-448A-45F8-B131-AE1EE3F9547F-1Heg1YXhbW8@public.gmane.org>
2011-08-02 21:25                                                                   ` Hefty, Sean
     [not found]                                                                     ` <1828884A29C6694DAF28B7E6B8A82373136F962C-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-02 23:00                                                                       ` Shamis, Pavel
     [not found]                                                                         ` <DE779D97-F54F-45E4-B3D4-DBEB10F9302D-1Heg1YXhbW8@public.gmane.org>
2011-08-02 23:53                                                                           ` Hefty, Sean
     [not found]                                                                             ` <1828884A29C6694DAF28B7E6B8A82373136F967E-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-03 13:47                                                                               ` Shamis, Pavel
     [not found]                                                                                 ` <5C691E518F345F4882FAB9E9839E60BA0BCA4622F4-vxojlfkN5A++qDdrU24kdQ@public.gmane.org>
2011-08-03 15:52                                                                                   ` Hefty, Sean
     [not found]                                                                                     ` <1828884A29C6694DAF28B7E6B8A82373136F97AC-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-03 20:22                                                                                       ` Shamis, Pavel
     [not found]                                                                                         ` <5C691E518F345F4882FAB9E9839E60BA0BCA462300-vxojlfkN5A++qDdrU24kdQ@public.gmane.org>
2011-08-03 20:49                                                                                           ` Hefty, Sean
     [not found]                                                                                             ` <1828884A29C6694DAF28B7E6B8A82373136F9A13-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-03 21:16                                                                                               ` Shamis, Pavel
     [not found]                                                                                                 ` <5C691E518F345F4882FAB9E9839E60BA0BCA462301-vxojlfkN5A++qDdrU24kdQ@public.gmane.org>
2011-08-03 21:36                                                                                                   ` Jason Gunthorpe
     [not found]                                                                                                     ` <20110803213642.GE28465-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-08-04  0:06                                                                                                       ` Hefty, Sean
     [not found]                                                                                                         ` <1828884A29C6694DAF28B7E6B8A82373136F9A7E-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-08-04  4:05                                                                                                           ` Jason Gunthorpe
     [not found]                                                                                                             ` <20110804040503.GA13935-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-08-04  5:53                                                                                                               ` Hefty, Sean
2011-05-18 16:44   ` Roland Dreier
     [not found]     ` <BANLkTimWMU9ohSQGYEEnFR0HbBaypFR51A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-18 17:02       ` Jason Gunthorpe
     [not found]         ` <20110518170226.GA2595-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-05-18 17:30           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373FBC7-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-18 18:05               ` Jason Gunthorpe
     [not found]                 ` <20110518180519.GA11860-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-05-18 18:13                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373FC13-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-18 18:22                       ` Jason Gunthorpe
2011-05-18 19:22               ` Roland Dreier
     [not found]                 ` <BANLkTi=cLjErM3pKzihyFtGWZ0kSu9BiPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-19  5:29                   ` Hefty, Sean

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.