net/smc: rework peer ID handling
authorHans Wippel <ndev@hwipl.net>
Tue, 25 Feb 2020 21:41:21 +0000 (22:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 04:27:06 +0000 (20:27 -0800)
commit366bb249b58381bc415a83608859019736b23766
treecb1fe57818629f7b2d6e999af04ea1d717c462a5
parent0b7f41f68710ccbf7d029c749616e5d26ae8f74d
net/smc: rework peer ID handling

This patch initializes the peer ID to a random instance ID and a zero
MAC address. If a RoCE device is in the host, the MAC address part of
the peer ID is overwritten with the respective address. Also, a function
for checking if the peer ID is valid is added. A peer ID is considered
valid if the MAC address part contains a non-zero MAC address.

Signed-off-by: Hans Wippel <ndev@hwipl.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_ib.c