Whamcloud - gitweb
LU-13790 socklnd: NID to interface mapping issues 08/39408/3
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Thu, 16 Jul 2020 18:16:48 +0000 (14:16 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 7 Aug 2020 05:00:07 +0000 (05:00 +0000)
Fix the NID to interface mapping in ksocknal_startup to make sure
the messages go out the interface assigned by LNet on a system
with multiple interfaces configured.

Test-Parameters: trivial
Fixes: b770d7117f35 ("LU-11893 lnet: consoldate secondary IP address handling")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I22a47fcf17dc0b8b2bf2abebb6b295f4b0550c00
Reviewed-on: https://review.whamcloud.com/39408
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/socklnd/socklnd.c

index 19777ae..19f4b27 100644 (file)
@@ -2696,7 +2696,8 @@ ksocknal_startup(struct lnet_ni *ni)
                                           ni->ni_interfaces[i]) != 0)
                                        continue;
 
-                               ksi = &net->ksnn_interfaces[j];
+                               ksi =
+                                 &net->ksnn_interfaces[net->ksnn_ninterfaces];
                                ni->ni_dev_cpt = ifaces[j].li_cpt;
                                ksi->ksni_ipaddr = ifaces[j].li_ipaddr;
                                ksi->ksni_index =