summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_diag.c
diff options
context:
space:
mode:
authorHans Wippel2018-06-28 19:05:07 +0200
committerDavid S. Miller2018-06-30 13:42:25 +0200
commitc6ba7c9ba43de1b57e9a53946e7ff988554c84ed (patch)
treef33c624945a384089b599be4550c98735c674ff8 /net/smc/smc_diag.c
parentnet/smc: optimize consumer cursor updates (diff)
downloadkernel-qcow2-linux-c6ba7c9ba43de1b57e9a53946e7ff988554c84ed.tar.gz
kernel-qcow2-linux-c6ba7c9ba43de1b57e9a53946e7ff988554c84ed.tar.xz
kernel-qcow2-linux-c6ba7c9ba43de1b57e9a53946e7ff988554c84ed.zip
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>
Diffstat (limited to 'net/smc/smc_diag.c')
-rw-r--r--net/smc/smc_diag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/smc/smc_diag.c b/net/smc/smc_diag.c
index 839354402215..64ce107c24d9 100644
--- a/net/smc/smc_diag.c
+++ b/net/smc/smc_diag.c
@@ -136,7 +136,8 @@ static int __smc_diag_dump(struct sock *sk, struct sk_buff *skb,
goto errout;
}
- if ((req->diag_ext & (1 << (SMC_DIAG_LGRINFO - 1))) && smc->conn.lgr &&
+ if (smc->conn.lgr && !smc->conn.lgr->is_smcd &&
+ (req->diag_ext & (1 << (SMC_DIAG_LGRINFO - 1))) &&
!list_empty(&smc->conn.lgr->list)) {
struct smc_diag_lgrinfo linfo = {
.role = smc->conn.lgr->role,