Whamcloud - gitweb
LU-10391 socklnd: factor out key calculation for ksnd_peers
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-dlc.h
index bba8aa3..fccadbe 100644 (file)
@@ -81,9 +81,16 @@ struct lnet_ioctl_config_o2iblnd_tunables {
        __u16 lnd_ntx;
 };
 
+struct lnet_ioctl_config_socklnd_tunables {
+       __u32 lnd_version;
+       __u16 lnd_conns_per_peer;
+       __u16 lnd_pad;
+};
+
 struct lnet_lnd_tunables {
        union {
                struct lnet_ioctl_config_o2iblnd_tunables lnd_o2ib;
+               struct lnet_ioctl_config_socklnd_tunables lnd_sock;
        } lnd_tun_u;
 };
 
@@ -93,7 +100,7 @@ struct lnet_ioctl_config_lnd_tunables {
 };
 
 struct lnet_ioctl_net_config {
-       char ni_interfaces[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
+       char ni_interface[LNET_MAX_STR_LEN];
        __u32 ni_status;
        __u32 ni_cpts[LNET_MAX_SHOW_NUM_CPT];
        char cfg_bulk[0];
@@ -190,7 +197,10 @@ struct lnet_ioctl_local_ni_hstats {
        __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 {
@@ -199,6 +209,8 @@ 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 {
@@ -222,12 +234,11 @@ struct lnet_ioctl_element_msg_stats {
 struct lnet_ioctl_config_ni {
        struct libcfs_ioctl_hdr lic_cfg_hdr;
        lnet_nid_t              lic_nid;
-       char                    lic_ni_intf[LNET_INTERFACES_NUM][LNET_MAX_STR_LEN];
+       char                    lic_ni_intf[LNET_MAX_STR_LEN];
        char                    lic_legacy_ip2nets[LNET_MAX_STR_LEN];
        __u32                   lic_cpts[LNET_MAX_SHOW_NUM_CPT];
        __u32                   lic_ncpts;
        __u32                   lic_status;
-       __u32                   lic_tcp_bonding;
        __u32                   lic_idx;
        __s32                   lic_dev_cpt;
        char                    pad[4];
@@ -276,6 +287,13 @@ struct lnet_ioctl_reset_health_cfg {
        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;
@@ -293,4 +311,88 @@ struct lnet_ioctl_lnet_stats {
        struct lnet_counters st_cntrs;
 };
 
+/* An IP, numeric NID or a Net number is composed of 1 or more of these
+ * descriptor structures.
+ */
+struct lnet_range_expr {
+       __u32 re_lo;
+       __u32 re_hi;
+       __u32 re_stride;
+};
+
+/* le_count identifies the number of lnet_range_expr in the bulk
+ * which follows
+ */
+struct lnet_expressions {
+       __u32 le_count;
+};
+
+/* A net descriptor has the net type, IE: O2IBLND, SOCKLND, etc and an
+ * expression describing a net number range.
+ */
+struct lnet_ioctl_udsp_net_descr {
+       __u32 ud_net_type;
+       struct lnet_expressions ud_net_num_expr;
+};
+
+/* The UDSP descriptor header contains the type of matching criteria, SRC,
+ * DST, RTE, etc and how many lnet_expressions compose the LNet portion of
+ * the LNet NID. For example an IP can be
+ * composed of 4 lnet_expressions , a gni can be composed of 1
+ */
+struct lnet_ioctl_udsp_descr_hdr {
+       /* The literals SRC, DST and RTE are encoded
+        * here.
+        */
+       __u32 ud_descr_type;
+       __u32 ud_descr_count;
+};
+
+/* each matching expression in the UDSP is described with this.
+ * The bulk format is as follows:
+ *     1. 1x struct lnet_ioctl_udsp_net_descr
+ *             -> the net part of the NID
+ *     2. >=0 struct lnet_expressions
+ *             -> the address part of the NID
+ */
+struct lnet_ioctl_udsp_descr {
+       struct lnet_ioctl_udsp_descr_hdr iud_src_hdr;
+       struct lnet_ioctl_udsp_net_descr iud_net;
+};
+
+/* The cumulative UDSP descriptor
+ * The bulk format is as follows:
+ *     1. >=1 struct lnet_ioctl_udsp_descr
+ *
+ * The size indicated in iou_hdr is the total size of the UDSP.
+ *
+ */
+struct lnet_ioctl_udsp {
+       struct libcfs_ioctl_hdr iou_hdr;
+       __s32 iou_idx;
+       __u32 iou_action_type;
+       __u32 iou_bulk_size;
+       union {
+               __u32 priority;
+       } iou_action;
+       void __user *iou_bulk;
+};
+
+/* structure used to request udsp instantiation information on the
+ * specified construct.
+ *   cud_nid: the NID of the local or remote NI to pull info on.
+ *   cud_nid_priority: NID prio of the requested NID.
+ *   cud_net_priority: net prio of network of the requested NID.
+ *   cud_pref_nid: array of preferred NIDs if it exists.
+ */
+struct lnet_ioctl_construct_udsp_info {
+       struct libcfs_ioctl_hdr cud_hdr;
+       __u32 cud_peer:1;
+       lnet_nid_t cud_nid;
+       __u32 cud_nid_priority;
+       __u32 cud_net_priority;
+       lnet_nid_t cud_pref_nid[LNET_MAX_SHOW_NUM_NID];
+       lnet_nid_t cud_pref_rtr_nid[LNET_MAX_SHOW_NUM_NID];
+};
+
 #endif /* _LNET_DLC_H_ */