summaryrefslogtreecommitdiff
path: root/net/smc/smc_clc.c
diff options
context:
space:
mode:
authorKarsten Graul <kgraul@linux.ibm.com>2021-09-14 11:35:06 +0300
committerDavid S. Miller <davem@davemloft.net>2021-09-14 14:49:10 +0300
commit11a26c59fc510091facd0d80236ac848da844830 (patch)
treedc4d16c101e0296b1c209679bf4a5c5b29a91de9 /net/smc/smc_clc.c
parentfa0866625543b4d8b3d026e4e0ef5ec25a453920 (diff)
downloadlinux-11a26c59fc510091facd0d80236ac848da844830.tar.xz
net/smc: keep static copy of system EID
The system EID is retrieved using an registered ISM device each time when needed. This adds some unnecessary complexity at all places where the system EID is needed, but no ISM device is at hand. Simplify the code and save the system EID in a static variable in smc_ism.c. Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Reviewed-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.c')
-rw-r--r--net/smc/smc_clc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c
index a3d99f894f52..5a5ebf752860 100644
--- a/net/smc/smc_clc.c
+++ b/net/smc/smc_clc.c
@@ -796,10 +796,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini)
offsetofend(struct smc_clnt_opts_area_hdr,
smcd_v2_ext_offset) +
v2_ext->hdr.eid_cnt * SMC_MAX_EID_LEN);
- if (ini->ism_dev[0])
- smc_ism_get_system_eid(ini->ism_dev[0], &eid);
- else
- smc_ism_get_system_eid(ini->ism_dev[1], &eid);
+ smc_ism_get_system_eid(&eid);
if (eid && v2_ext->hdr.flag.seid)
memcpy(smcd_v2_ext->system_eid, eid, SMC_MAX_EID_LEN);
plen += sizeof(*v2_ext) + sizeof(*smcd_v2_ext);