netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next 00/11] Add network namespace support in the RDMA-CM
@ 2015-02-01 11:28 Shachar Raindel
  2015-02-01 11:28 ` [PATCH for-next 01/10] IB/addr: Pass network namespace as a parameter Shachar Raindel
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Shachar Raindel @ 2015-02-01 11:28 UTC (permalink / raw)
  To: roland-DgEjT+Ai2ygdnm+yROfE0A, sean.hefty-ral2JQCrhuEAvxtiuMwx3w
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	liranl-VPRAkNaXOzVWk0Htik3J/w, Shachar Raindel

RDMA-CM uses IP based addressing and routing to setup RDMA connections between
hosts. Currently, all of the IP interfaces and addresses used by the RDMA-CM
must reside in the init_net namespace. This restricts the usage of containers
with RDMA to only work with host network namespace (aka the kernel init_net NS
instance).

This patchset allows using network namespaces with the RDMA-CM.

Each RDMA-CM and CM id is keeping a reference to a network namespace.

This reference is based on the process network namespace at the time of the
creation of the object or inherited from the listener.

This network namespace is used to perform all IP and network related
operations. Specifically, the local device lookup, as well as the remote GID
address resolution are done in the context of the RDMA-CM object's namespace.
This allows outgoing connections to reach the right target, even if the same
IP address exists in multiple network namespaces. This can happen if each
network namespace resides on a different pkey.

Additionally, the network namespace is used to split the listener service ID
table. From the user point of view, each network namespace has a unique,
completely independent table of service IDs. This allows running multiple
instances of a single service on the same machine, using containers. To
implement this, the CM layer now parses the IP address from the CM connect
requests, and searches for the matching networking device. The namespace of
the device found is used when looking up the service ID in the listener table.

The functionnality introduced by this series would come into play when the
transport is InfiniBand and IPoIB interfaces are assigned to each namespace.
Multiple IPoIB interfaces can be created and assigned to different RDMA-CM
capable containers, for example using pipework [1].

Full support for RoCE will be introduced in a later stage.

The patches apply against kernel v3.19-rc5, with the patch "RDMA/CMA: Mark
IPv4 addresses correctly when the listener is IPv6" [2] applied.

The patchset is structured as follows:

Patches 1 and 2 are relatively trivial API extensions, requiring the callers
of certain ib_addr and ib_core functions to provide a network namespace, as
needed.

Patches 3 and 4 adds the ability to lookup a network namespace according to
the IP address, device and pkey. It finds the matching IPoIB interfaces, and
safely takes a reference on the network namespace before returning to the
caller.

Patch 5 moves the logic that extracts the IP address from a connect request
into the CM layer. This is needed for the upcoming listener lookup by
namespace.

Patch 6 adds support for network namespaces in the CM layer. All callers are
still passing init_net as the namespace, to maintain backward compatibility.
For incoming requests, the namespace of the relevant IPoIB device is used.

Patches 7 and 8 add proper namespace support to the RDMA-CM module.

Patches 9 and 10 add namespace support to the relevant user facing modules in
the IB stack.


[1] https://github.com/jpetazzo/pipework/pull/108
[2] https://patchwork.kernel.org/patch/5298971/

Guy Shapiro (7):
  IB/addr: Pass network namespace as a parameter
  IB/core: Pass network namespace as a parameter to relevant functions
  IB/ipoib: Return IPoIB devices as possible matches to
    get_net_device_by_port_pkey_ip
  IB/cm,cma: Move RDMA IP CM private-data parsing code from ib_cma to
    ib_cm
  IB/cm: Add network namespace support
  IB/cma: Add support for network namespaces
  IB/ucma: Take the network namespace from the process

Shachar Raindel (1):
  IB/ucm: Add partial support for network namespaces

Yotam Kenneth (2):
  IB/core: Find the network namespace matching connection parameters
  IB/cma: Separate port allocation to network namespaces

 drivers/infiniband/core/addr.c                     |  31 +-
 drivers/infiniband/core/agent.c                    |   4 +-
 drivers/infiniband/core/cm.c                       | 298 ++++++++++++++++--
 drivers/infiniband/core/cma.c                      | 332 +++++++++------------
 drivers/infiniband/core/device.c                   |  57 ++++
 drivers/infiniband/core/mad_rmpp.c                 |  10 +-
 drivers/infiniband/core/ucm.c                      |   4 +-
 drivers/infiniband/core/ucma.c                     |   4 +-
 drivers/infiniband/core/user_mad.c                 |   4 +-
 drivers/infiniband/core/verbs.c                    |  22 +-
 drivers/infiniband/hw/ocrdma/ocrdma_ah.c           |   3 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c            |  21 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c          | 122 +++++++-
 drivers/infiniband/ulp/iser/iser_verbs.c           |   2 +-
 drivers/infiniband/ulp/isert/ib_isert.c            |   2 +-
 drivers/infiniband/ulp/srp/ib_srp.c                |   2 +-
 drivers/infiniband/ulp/srpt/ib_srpt.c              |   5 +-
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h    |   4 +-
 include/rdma/ib_addr.h                             |  44 ++-
 include/rdma/ib_cm.h                               |  53 +++-
 include/rdma/ib_verbs.h                            |  44 ++-
 include/rdma/rdma_cm.h                             |   6 +-
 net/9p/trans_rdma.c                                |   2 +-
 net/rds/ib.c                                       |   2 +-
 net/rds/ib_cm.c                                    |   2 +-
 net/rds/iw.c                                       |   2 +-
 net/rds/iw_cm.c                                    |   2 +-
 net/rds/rdma_transport.c                           |   2 +-
 net/sunrpc/xprtrdma/svc_rdma_transport.c           |   2 +-
 net/sunrpc/xprtrdma/verbs.c                        |   3 +-
 30 files changed, 823 insertions(+), 268 deletions(-)

-- 
1.7.11.2

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

end of thread, other threads:[~2015-02-01 14:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-01 11:28 [PATCH for-next 00/11] Add network namespace support in the RDMA-CM Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 01/10] IB/addr: Pass network namespace as a parameter Shachar Raindel
     [not found]   ` <1422790133-28725-2-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 12:22     ` Yann Droneaud
     [not found]       ` <1422793376.3030.37.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 13:46         ` Shachar Raindel
     [not found]           ` <AM3PR05MB0935B7B53439298A7429158BDC3F0-LOZWmgKjnYgQouBfZGh8ttqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-02-01 14:38             ` Yann Droneaud
2015-02-01 11:28 ` [PATCH for-next 03/10] IB/core: Find the network namespace matching connection parameters Shachar Raindel
     [not found] ` <1422790133-28725-1-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 11:28   ` [PATCH for-next 02/10] IB/core: Pass network namespace as a parameter to relevant functions Shachar Raindel
     [not found]     ` <1422790133-28725-3-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 12:26       ` Yann Droneaud
2015-02-01 14:10         ` Shachar Raindel
2015-02-01 11:28   ` [PATCH for-next 04/10] IB/ipoib: Return IPoIB devices as possible matches to get_net_device_by_port_pkey_ip Shachar Raindel
2015-02-01 11:28   ` [PATCH for-next 05/10] IB/cm,cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm Shachar Raindel
2015-02-01 12:55     ` Yann Droneaud
     [not found]       ` <1422795359.3030.43.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 14:29         ` Shachar Raindel
2015-02-01 11:28   ` [PATCH for-next 06/10] IB/cm: Add network namespace support Shachar Raindel
2015-02-01 11:28   ` [PATCH for-next 08/10] IB/cma: Add support for network namespaces Shachar Raindel
2015-02-01 13:44     ` Yann Droneaud
     [not found]       ` <1422798272.3030.48.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 14:16         ` Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 07/10] IB/cma: Separate port allocation to " Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 09/10] IB/ucma: Take the network namespace from the process Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 10/10] IB/ucm: Add partial support for network namespaces Shachar Raindel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).