#define __user
#endif
+#define LNET_GENL_NAME "lnet"
+#define LNET_GENL_VERSION 0x05
+
+/* enum lnet_commands - Supported core LNet Netlink commands
+ *
+ * @LNET_CMD_UNSPEC: unspecified command to catch errors
+ *
+ * @LNET_CMD_CONFIGURE: command to setup LNet stack
+ * @LNET_CMD_NETS: command to manage the LNet networks
+ * @LNET_CMD_ROUTES: command to manage LNet routes
+ * @LNET_CMD_PING: command to send pings to LNet connections
+ * @LNET_CMD_CPT_OF_NID: command to calculate the CPT of specified NIDs
+ */
+enum lnet_commands {
+ LNET_CMD_UNSPEC = 0,
+
+ LNET_CMD_CONFIGURE = 1,
+ LNET_CMD_NETS = 2,
+ LNET_CMD_PEERS = 3,
+ LNET_CMD_ROUTES = 4,
+ LNET_CMD_CONNS = 5,
+ LNET_CMD_PING = 6,
+ LNET_CMD_CPT_OF_NID = 7,
+ LNET_CMD_PEER_DIST = 8,
+
+ __LNET_CMD_MAX_PLUS_ONE
+};
+
+#define LNET_CMD_MAX (__LNET_CMD_MAX_PLUS_ONE - 1)
+
/*
* To allow for future enhancements to extend the tunables
* add a hdr to this structure, so that the version can be set
__u32 lnd_fmr_cache;
__u16 lnd_conns_per_peer;
__u16 lnd_ntx;
+ __u32 lnd_timeout;
+ __s16 lnd_tos;
+};
+
+struct lnet_ioctl_config_kfilnd_tunables {
+ __u32 lnd_version;
+ __u32 lnd_prov_major_version;
+ __u32 lnd_prov_minor_version;
+ __u32 lnd_auth_key;
+ char lnd_traffic_class_str[LNET_MAX_STR_LEN];
+ __u32 lnd_traffic_class;
+};
+
+struct lnet_ioctl_config_socklnd_tunables {
+ __u32 lnd_version;
+ __u16 lnd_conns_per_peer;
+ __u16 lnd_pad;
+ __u32 lnd_timeout;
+ __s16 lnd_tos;
+};
+
+struct lnet_ioctl_config_gnilnd_tunables {
+ __u32 lnd_version;
+ __u32 lnd_timeout;
};
struct lnet_lnd_tunables {
union {
struct lnet_ioctl_config_o2iblnd_tunables lnd_o2ib;
+ struct lnet_ioctl_config_socklnd_tunables lnd_sock;
+ struct lnet_ioctl_config_kfilnd_tunables lnd_kfi;
+ struct lnet_ioctl_config_gnilnd_tunables lnd_gni;
} lnd_tun_u;
};
__u32 mr_info;
struct lnet_process_id ping_id;
struct lnet_process_id __user *ping_buf;
+ lnet_nid_t ping_src;
};
struct lnet_ioctl_config_data {
__u32 hlni_local_no_route;
__u32 hlni_local_timeout;
__u32 hlni_local_error;
+ __s32 hlni_fatal_error;
__s32 hlni_health_value;
+ __u32 hlni_ping_count;
+ __u64 hlni_next_ping;
};
struct lnet_ioctl_peer_ni_hstats {
__u32 hlpni_remote_error;
__u32 hlpni_network_timeout;
__s32 hlpni_health_value;
+ __u32 hlpni_ping_count;
+ __u64 hlpni_next_ping;
};
struct lnet_ioctl_element_msg_stats {
struct libcfs_ioctl_hdr prcfg_hdr;
lnet_nid_t prcfg_prim_nid;
lnet_nid_t prcfg_cfg_nid;
- __u32 prcfg_count;
+ __u32 prcfg_count; /* ADD_PEER_NI: used for 'lock_prim' option
+ * DEL_PEER_NI: used for 'force' option
+ */
__u32 prcfg_mr;
__u32 prcfg_state;
__u32 prcfg_size;
lnet_nid_t rh_nid;
};
+struct lnet_ioctl_reset_conns_per_peer_cfg {
+ struct libcfs_ioctl_hdr rcpp_hdr;
+ __u16 rcpp_all:1;
+ __s16 rcpp_value;
+ lnet_nid_t rcpp_nid;
+};
+
struct lnet_ioctl_recovery_list {
struct libcfs_ioctl_hdr rlst_hdr;
enum lnet_health_type rlst_type:32;