Skip to content
Commit a082ec89 authored by Hans Wippel's avatar Hans Wippel Committed by David S. Miller
Browse files

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: default avatarHans Wippel <ndev@hwipl.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 366bb249
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment