Whamcloud - gitweb
LU-7734 lnet: preferred NIs for non-Multi-Rail peers
When a node sends a message to a peer NI, there may be
a preferred local NI that should be the source of the
message. This is in particular the case for non-Multi-
Rail (NMR) peers, as an NMR peer depends in some cases
on the source address of a message to correctly identify
its origin. (This as opposed to using a UUID provided by
a higher protocol layer.)
Implement this by keeping an array of preferred local
NIDs in the lnet_peer_ni structure. The case where only
a single NID needs to be stored is optimized so that this
can be done without needing to allocate any memory.
A flag in the lnet_peer_ni, LNET_PEER_NI_NON_MR_PREF,
indicates that the preferred NI was automatically added
for an NMR peer. Note that a peer which has not been
explicitly configured as Multi-Rail will be treated as
non-Multi-Rail until proven otherwise. These automatic
preferences will be cleared if the peer is changed to
Multi-Rail.
- lnet_peer_ni_set_non_mr_pref_nid()
set NMR preferred NI for peer_ni
- lnet_peer_ni_clr_non_mr_pref_nid()
clear NMR preferred NI for peer_ni
- lnet_peer_clr_non_mr_pref_nids()
clear NMR preferred NIs for all peer_ni
- lnet_peer_add_pref_nid()
add a preferred NID
- lnet_peer_del_pref_nid()
delete a preferred NID
Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I99b891c28c09a1365ef47b4b7deb3eef7e0ad77d