Whamcloud - gitweb
LU-9121 lnet: UDSP handling
authorAmir Shehata <ashehata@whamcloud.com>
Fri, 22 Feb 2019 01:39:06 +0000 (17:39 -0800)
committerAmir Shehata <ashehata@whamcloud.com>
Mon, 22 Feb 2021 17:10:56 +0000 (09:10 -0800)
commite5ea6387eb9f8829a694b169d78685e2303422e0
tree7e49dec57fbe1532a17604d74d6df519638168a3
parent7d309d57fd843f101d0d4954c810adbdd4eac632
LU-9121 lnet: UDSP handling

This patch adds the following functionality:
1. Add UDSPs
2. Delete UDSPs
3. Apply UDSPs

- 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 peer NIDs.
- Adding a NID pair udsp: allows to specify local] NIDs
to be added to 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 the 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.
- Deleting a udsp: use the specified policy index to remove it
from the policy list.

Generally, the syntax is as follows
 lnetctl policy <add | del | show>
  --src: ip2nets syntax specifying the local NID to match
  --dst: ip2nets syntax specifying the remote NID to match
  --rte: ip2nets syntax specifying the router NID to match
  --priority: Priority to apply to rule matches
  --idx: Index of where to insert the rule. By default it appends
 to the end of the rule list

Test-Parameters: trivial testlist=lnet-selftest,sanity-lnet
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: If588b78f3d5fce286270afb02e0e7683185d6898
Reviewed-on: https://review.whamcloud.com/34354
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
libcfs/libcfs/util/nidstrings.c
lnet/include/lnet/Makefile.am
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/udsp.h [new file with mode: 0644]
lnet/include/uapi/linux/lnet/nidstr.h
lnet/lnet/Makefile.in
lnet/lnet/api-ni.c
lnet/lnet/nidstrings.c
lnet/lnet/peer.c
lnet/lnet/udsp.c [new file with mode: 0644]