Whamcloud - gitweb
LU-12222 lnet: Introduce constant for the lolnd NID
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-types.h
index 9898907..1f7828c 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -107,6 +107,9 @@ static inline __u32 LNET_MKNET(__u32 type, __u32 num)
        return (type << 16) | num;
 }
 
+/** The lolnd NID (i.e. myself) */
+#define LNET_NID_LO_0 LNET_MKNID(LNET_MKNET(LOLND, 0), 0)
+
 #define WIRE_ATTR      __attribute__((packed))
 
 /* Packed version of struct lnet_process_id to transfer via network */
@@ -223,20 +226,41 @@ struct lnet_acceptor_connreq {
 
 #define LNET_PROTO_ACCEPTOR_VERSION    1
 
-struct lnet_counters {
-       __u32   msgs_alloc;
-       __u32   msgs_max;
-       __u32   errors;
-       __u32   send_count;
-       __u32   recv_count;
-       __u32   route_count;
-       __u32   drop_count;
-       __u64   send_length;
-       __u64   recv_length;
-       __u64   route_length;
-       __u64   drop_length;
+struct lnet_counters_common {
+       __u32   lcc_msgs_alloc;
+       __u32   lcc_msgs_max;
+       __u32   lcc_errors;
+       __u32   lcc_send_count;
+       __u32   lcc_recv_count;
+       __u32   lcc_route_count;
+       __u32   lcc_drop_count;
+       __u64   lcc_send_length;
+       __u64   lcc_recv_length;
+       __u64   lcc_route_length;
+       __u64   lcc_drop_length;
 } WIRE_ATTR;
 
+struct lnet_counters_health {
+       __u32   lch_rst_alloc;
+       __u32   lch_resend_count;
+       __u32   lch_response_timeout_count;
+       __u32   lch_local_interrupt_count;
+       __u32   lch_local_dropped_count;
+       __u32   lch_local_aborted_count;
+       __u32   lch_local_no_route_count;
+       __u32   lch_local_timeout_count;
+       __u32   lch_local_error_count;
+       __u32   lch_remote_dropped_count;
+       __u32   lch_remote_error_count;
+       __u32   lch_remote_timeout_count;
+       __u32   lch_network_timeout_count;
+};
+
+struct lnet_counters {
+       struct lnet_counters_common lct_common;
+       struct lnet_counters_health lct_health;
+};
+
 #define LNET_NI_STATUS_UP      0x15aac0de
 #define LNET_NI_STATUS_DOWN    0xdeadface
 #define LNET_NI_STATUS_INVALID 0x00000000
@@ -515,9 +539,6 @@ struct lnet_md {
 #define LNET_MTU_BITS  20
 #define LNET_MTU       (1 << LNET_MTU_BITS)
 
-/** limit on the number of fragments in discontiguous MDs */
-#define LNET_MAX_IOV   256
-
 /**
  * Options for the MD structure. See struct lnet_md::options.
  */