OSDN Git Service

net/smc: add base infrastructure for SMC-D and ISM
authorHans Wippel <hwippel@linux.ibm.com>
Thu, 28 Jun 2018 17:05:07 +0000 (19:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 11:42:25 +0000 (20:42 +0900)
commitc6ba7c9ba43de1b57e9a53946e7ff988554c84ed
treef33c624945a384089b599be4550c98735c674ff8
parente82f2e31f5597a3de44bd27b7427f577f637c552
net/smc: add base infrastructure for SMC-D and ISM

SMC supports two variants: SMC-R and SMC-D. For data transport, SMC-R
uses RDMA devices, SMC-D uses so-called Internal Shared Memory (ISM)
devices. An ISM device only allows shared memory communication between
SMC instances on the same machine. For example, this allows virtual
machines on the same host to communicate via SMC without RDMA devices.

This patch adds the base infrastructure for SMC-D and ISM devices to
the existing SMC code. It contains the following:

* ISM driver interface:
  This interface allows an ISM driver to register ISM devices in SMC. In
  the process, the driver provides a set of device ops for each device.
  SMC uses these ops to execute SMC specific operations on or transfer
  data over the device.

* Core SMC-D link group, connection, and buffer support:
  Link groups, SMC connections and SMC buffers (in smc_core) are
  extended to support SMC-D.

* SMC type checks:
  Some type checks are added to prevent using SMC-R specific code for
  SMC-D and vice versa.

To actually use SMC-D, additional changes to pnetid, CLC, CDC, etc. are
required. These are added in follow-up patches.

Signed-off-by: Hans Wippel <hwippel@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Suggested-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/smc.h
net/smc/Makefile
net/smc/af_smc.c
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_diag.c
net/smc/smc_ism.c [new file with mode: 0644]
net/smc/smc_ism.h [new file with mode: 0644]