#define LUSTRE_CFG_RC_SKIP -8
#define LUSTRE_CFG_RC_LAST_ELEM -9
+enum lnetctl_cmd {
+ LNETCTL_CONFIG_CMD = 1,
+ LNETCTL_UNCONFIG_CMD = 2,
+ LNETCTL_ADD_CMD = 3,
+ LNETCTL_DEL_CMD = 4,
+ LNETCTL_SHOW_CMD = 5,
+ LNETCTL_DBG_CMD = 6,
+ LNETCTL_MANAGE_CMD = 7,
+ LNETCTL_LAST_CMD
+};
+
struct lnet_dlc_network_descr {
struct list_head network_on_rule;
__u32 nw_id;
* gw - gateway
* hops - number of hops passed down by the user
* prio - priority of the route
+ * sen - health sensitivity value for the gateway
* seq_no - sequence number of the request
* err_rc - [OUT] struct cYAML tree describing the error. Freed by caller
*/
int lustre_lnet_config_route(char *nw, char *gw, int hops, int prio,
- int seq_no, struct cYAML **err_rc);
+ int sen, int seq_no, struct cYAML **err_rc);
/*
* lustre_lnet_del_route
int seq_no, struct cYAML **err_rc);
/*
+ * lustre_lnet_config_recov_intrv
+ * set the recovery interval in seconds. That's the interval to ping an
+ * unhealthy interface.
+ *
+ * intrv - recovery interval value to configure
+ * seq_no - sequence number of the request
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_config_recov_intrv(int intrv, int seq_no, struct cYAML **err_rc);
+
+/*
+ * lustre_lnet_show_recov_intrv
+ * show the recovery interval set in the system
+ *
+ * seq_no - sequence number of the request
+ * show_rc - [OUT] struct cYAML tree containing health sensitivity info
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_show_recov_intrv(int seq_no, struct cYAML **show_rc,
+ struct cYAML **err_rc);
+
+/*
+ * lustre_lnet_config_rtr_sensitivity
+ * sets the router sensitivity percentage. If the percentage health
+ * of a router interface drops below that it's considered failed
+ *
+ * sen - sensitivity value to configure
+ * seq_no - sequence number of the request
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_config_rtr_sensitivity(int sen, int seq_no, struct cYAML **err_rc);
+
+/*
* lustre_lnet_config_hsensitivity
* sets the health sensitivity; the value by which to decrement the
* health value of a local or peer NI. If 0 then health is turned off
struct cYAML **err_rc);
/*
+ * lustre_lnet_show_rtr_sensitivity
+ * show the router sensitivity percentage in the system
+ *
+ * seq_no - sequence number of the request
+ * show_rc - [OUT] struct cYAML tree containing health sensitivity info
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_show_rtr_sensitivity(int seq_no, struct cYAML **show_rc,
+ struct cYAML **err_rc);
+
+/*
* lustre_lnet_config_transaction_to
* sets the timeout after which a message expires or a timeout event is
* propagated for an expired response.
int lustre_lnet_show_retry_count(int seq_no, struct cYAML **show_rc,
struct cYAML **err_rc);
+int lustre_lnet_show_local_ni_recovq(int seq_no, struct cYAML **show_rc,
+ struct cYAML **err_rc);
+
+int lustre_lnet_show_peer_ni_recovq(int seq_no, struct cYAML **show_rc,
+ struct cYAML **err_rc);
+
/*
* lustre_lnet_config_max_intf
* Sets the maximum number of interfaces per node. this tunable is
struct cYAML **err_rc);
/*
+ * lustre_lnet_config_drop_asym_route
+ * Drop or accept asymmetrical route messages. Accept by default.
+ *
+ * drop - non-0 drops, 0 accepts
+ * seq_no - sequence number of the request
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_config_drop_asym_route(int drop, int seq_no,
+ struct cYAML **err_rc);
+
+/*
+ * lustre_lnet_show_drop_asym_route
+ * show current drop asym route setting
+ *
+ * seq_no - sequence number of the request
+ * show_rc - [OUT] struct cYAML tree containing NUMA range info
+ * err_rc - [OUT] struct cYAML tree describing the error. Freed by
+ * caller
+ */
+int lustre_lnet_show_drop_asym_route(int seq_no, struct cYAML **show_rc,
+ struct cYAML **err_rc);
+
+/*
* lustre_lnet_config_buffers
* Send down an IOCTL to configure routing buffer sizes. A value of 0 means
* default that particular buffer to default size. A value of -1 means
struct lnet_dlc_network_descr *nw_descr);
/*
+ * lustre_lnet_parse_nidstr
+ * This is a small wrapper around cfs_parse_nidlist.
+ * nidstr - A string parseable by cfs_parse_nidlist
+ * lnet_nidlist - An array of lnet_nid_t to hold the nids specified
+ * by the nidstring.
+ * max_nids - Size of the lnet_nidlist array, and the maximum number of
+ * nids that can be expressed by the nidstring. If the
+ * nidstring expands to a larger number of nids than max_nids
+ * then an error is returned.
+ * err_str - char pointer where we store an informative error
+ * message when an error is encountered
+ * Returns:
+ * The number (> 0) of lnet_nid_t stored in the supplied array, or
+ * LUSTRE_CFG_RC_BAD_PARAM if:
+ * - nidstr is NULL
+ * - nidstr contains an asterisk. This character is not allowed
+ * because it would cause the size of the expanded nidlist to exceed
+ * the maximum number of nids that is supported by expected callers
+ * of this function.
+ * - cfs_parse_nidlist fails to parse the nidstring
+ * - The nidlist populated by cfs_parse_nidlist is empty
+ * - The nidstring expands to a larger number of nids than max_nids
+ * - The nidstring expands to zero nids
+ * LUSTRE_CFG_RC_OUT_OF_MEM if:
+ * - cfs_expand_nidlist can return ENOMEM. We return out of mem in
+ * this case.
+ */
+int lustre_lnet_parse_nidstr(char *nidstr, lnet_nid_t *lnet_nidlist,
+ int max_nids, char *err_str);
+
+/*
* lustre_lnet_parse_nids
* Parse a set of nids into a locally allocated array and return the
* pointer of the array to the caller. The caller is responsible for