From: Amir Shehata Date: Mon, 22 Feb 2021 17:20:31 +0000 (-0800) Subject: LU-9121 lnet: User Defined Selection Policy (UDSP) X-Git-Tag: 2.14.51~177^2 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=389d6570641446ecc03f9bc3248d4340821f713c LU-9121 lnet: User Defined Selection Policy (UDSP) User Defined Selection Policies (UDSP) are introduced to add ability of fine traffic control. The policies are instantiated on LNet constructs and allow preference of some constructs over others as an extension of the selection algorithm. The order of operation is defined by the selection algorithm logical flow: 1. Iterate over all the networks that a peer can be reached on and select the best local network - The remote network with the highest priority is examined (Network Rule) - The local network with the highest priority is selected (Network Rule) - The local NI with the highest priority is selected (NID Rule) 2. If the peer is a remote peer and has no local networks, - then select the remote peer network with the highest priority (Network Rule) - Select the highest priority remote peer_ni on the network selected (NID Rule) - Now that the peer's network and NI are decided, select the router in round robin from the peer NI's preferred router list. (Router Rule) - Select the highest priority local NI on the local net of the selected route. (NID Rule) 3. Otherwise for local peers, select the peer_ni from the peer. - highest priority peer NI is selected (NID Rule) - Select the peer NI which has the local NI selected on its preferred list. (NID Pair Rule) Accordingly, the User Interface allows for the following: - Adding a local network udsp: if multiple local networks are available, each one can have a priority. - Adding a local NID udsp: after a local network is chosen, if there are multiple NIs, each one can have a priority. - Adding a remote NID udsp: assign priority to a peer NID. - Adding a NID pair udsp: allows to specify local NIDs to be added on the list on the specified peer NIs When selecting a peer NI, the one with the local NID being used on its list is preferred. - Adding a Router udsp: similar to the NID pair udsp. Specified router NIDs are added on the list on the specified peer NIs. When sending to a remote peer, remote net is selected and the peer NID is selected. The router which has its nid on the peer NI list is preferred. Signed-off-by: Serguei Smirnov Signed-off-by: Amir Shehata Change-Id: I0d94d160bdb8c09c1cf467f1c155e14ab761a47e --- 389d6570641446ecc03f9bc3248d4340821f713c