summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_ib.h
diff options
context:
space:
mode:
authorHans Wippel <ndev@hwipl.net>2020-02-25 22:41:22 +0100
committerDavid S. Miller <davem@davemloft.net>2020-02-26 20:27:06 -0800
commita082ec897ffed754aae39a9665af161f1a6fa44b (patch)
tree35c6162e15cb025fbdddd50d37fba2724d26c0f9 /net/smc/smc_ib.h
parent366bb249b58381bc415a83608859019736b23766 (diff)
downloadlinux-a082ec897ffed754aae39a9665af161f1a6fa44b.tar.bz2
net/smc: improve peer ID in CLC decline for SMC-R
According to RFC 7609, all CLC messages contain a peer ID that consists of a unique instance ID and the MAC address of one of the host's RoCE devices. But if a SMC-R connection cannot be established, e.g., because no matching pnet table entry is found, the current implementation uses a zero value in the CLC decline message although the host's peer ID is set to a proper value. If no RoCE and no ISM device is usable for a connection, there is no LGR and the LGR check in smc_clc_send_decline() prevents that the peer ID is copied into the CLC decline message for both SMC-D and SMC-R. So, this patch modifies the check to also accept the case of no LGR. Also, only a valid peer ID is copied into the decline message. Signed-off-by: Hans Wippel <ndev@hwipl.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_ib.h')
-rw-r--r--net/smc/smc_ib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/smc/smc_ib.h b/net/smc/smc_ib.h
index 255db87547d3..5c2b115d36da 100644
--- a/net/smc/smc_ib.h
+++ b/net/smc/smc_ib.h
@@ -84,4 +84,5 @@ void smc_ib_sync_sg_for_device(struct smc_ib_device *smcibdev,
enum dma_data_direction data_direction);
int smc_ib_determine_gid(struct smc_ib_device *smcibdev, u8 ibport,
unsigned short vlan_id, u8 gid[], u8 *sgid_index);
+bool smc_ib_is_valid_local_systemid(void);
#endif