diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2020-09-10 18:48:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-10 15:24:26 -0700 |
commit | 7b2977d0830493452f1afaa8d8e1b4f8248df9d1 (patch) | |
tree | 5c0a1c2d49cd070db002b2ea378bb3026e1e7355 /net/smc/smc_pnet.c | |
parent | 3d9725a6a1330bed78f452ba3b171b24d9b83ac7 (diff) |
net/smc: improve server ISM device determination
Move check whether peer can be reached into smc_pnet_find_ism_by_pnetid().
Thus searching continues for another ism device, if check fails.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_pnet.c')
-rw-r--r-- | net/smc/smc_pnet.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c index 30e5fac7034e..70684c49510e 100644 --- a/net/smc/smc_pnet.c +++ b/net/smc/smc_pnet.c @@ -928,7 +928,10 @@ static void smc_pnet_find_ism_by_pnetid(struct net_device *ndev, mutex_lock(&smcd_dev_list.mutex); list_for_each_entry(ismdev, &smcd_dev_list.list, list) { if (smc_pnet_match(ismdev->pnetid, ndev_pnetid) && - !ismdev->going_away) { + !ismdev->going_away && + (!ini->ism_peer_gid || + !smc_ism_cantalk(ini->ism_peer_gid, ini->vlan_id, + ismdev))) { ini->ism_dev = ismdev; break; } |