Whamcloud - gitweb
LU-9121 lnet: UDSP handling 89/40189/1
authorAmir Shehata <ashehata@whamcloud.com>
Fri, 22 Feb 2019 01:39:06 +0000 (17:39 -0800)
committerAmir Shehata <ashehata@whamcloud.com>
Thu, 8 Oct 2020 21:27:29 +0000 (14:27 -0700)
commitcf5f7c8dff9d5b24b229226c97f037021bbdb8a8
tree6d290ed9dee64096e273abaa784c67312f8a391e
parent6e6a8e25164d2e73cde4a41503364a247e7596d9
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]