#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_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_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;
+};
+
+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;
+};
+
+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 {
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;