...
- 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 remote network with the highest priority is examined
- 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
- then select the remote peer network with the highest priority
- Otherwise for local peers, select the peer_ni from the peer.
- highest priority peer NI is selected
- NID Rule
- highest priority peer NI is selected
- Select the local NI to send from
- If the peer has a set of preferred local NIs select the highest priority from them. Otherwise select in round robin
- NID Pair Rule
- If the peer has a set of preferred local NIs select the highest priority from them. Otherwise select in round robin
DLC APIs
The DLC library will provide the outlined APIs to expose a way to create, delete and show rules.
Once rules are created and stored in the kernel, they are assigned an ID. This ID is returned and shown in the show command, which dumps the rules. This ID can be referenced later to delete a rule. The process is described in more details below.
| Code Block |
|---|
/* * lustre_lnet_udsp_str_to_action * Given a string format of the action, convert it to an enumerated type * action - string format for the action. */ enum lnet_udsp_action_type lustre_lnet_udsp_str_to_action(char *action); /* * lustre_lnet_add_udsp * Add a selection policy. * src - source NID descriptor * dst - destination NID descriptor * rte - router NID descriptor * type - action type * action - union of the action * idx - the index to delete * seq_no - sequence number of the request * err_rc - [OUT] struct cYAML tree describing the error. Freed by * caller */ int lustre_lnet_add_udsp(char *src, char *dst, char *rte, enum lnet_udsp_action_type type, union action, unsigned int idx, int seq_no, struct cYAML **err_rc); /* * lustre_lnet_del_udsp * Delete a net selection policy. * idx - the index to delete * seq_no - sequence number of the request * err_rc - [OUT] struct cYAML tree describing the error. Freed by * caller */ int lustre_lnet_del_udsp(int idx, int seq_no, struct cYAML **err_rc); /* * lustre_lnet_show_udsp * Show configured net selection policies. * seq_no - sequence number of the request * show_rc - [OUT] struct cYAML tree containing the UDSPs * err_rc - [OUT] struct cYAML tree describing the error. Freed by * caller */ int lustre_lnet_show_udsp(char *net); |
...