Whamcloud - gitweb
LU-10391 socklnd: factor out key calculation for ksnd_peers
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnetst.h
index 06d5283..8749f8a 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * Author: Liang Zhen <liangzhen@clusterfs.com>
  */
 #ifndef __UAPI_LNET_ST_H__
 #define __UAPI_LNET_ST_H__
 
+#include <linux/types.h>
+#include <linux/lnet/lnet-types.h>
+#include <linux/time.h>
+
 #define LST_FEAT_NONE          (0)
 #define LST_FEAT_BULK_LEN      (1 << 0)        /* enable variable page size */
 
 #define LSTIO_BATCH_QUERY      0xC27           /* query batch status */
 #define LSTIO_STAT_QUERY       0xC30           /* get stats */
 
+/*
+ * sparse kernel source annotations
+ */
+#ifndef __user
+#define __user
+#endif
+
 struct lst_sid {
        lnet_nid_t      ses_nid;        /* nid of console node */
        __s64           ses_stamp;      /* time stamp in milliseconds */
@@ -115,10 +125,23 @@ struct lstcon_test_batch_ent {
 };                                                     /*** test/batch verbose information entry,
                                                         *** for list_batch command */
 
+/* This will go away once we move to netlink */
+#if !defined(__KERNEL__) && !defined(__LIBCFS_UTIL_LIST_H__)
+struct list_head {
+       struct list_head *next, *prev;
+};
+#endif
+
 struct lstcon_rpc_ent {
        struct list_head        rpe_link;               /* link chain */
        struct lnet_process_id  rpe_peer;               /* peer's id */
-       struct timeval          rpe_stamp;              /* time stamp of RPC */
+       /* This has not been used since Lustre 2.2 so its safe to use.
+        * Update to allow future use of timespec64
+        */
+       struct {
+               __s64           tv_sec;
+               __s64           tv_nsec;
+       } rpe_stamp;                                    /* time stamp of RPC */
        int                     rpe_state;              /* peer's state */
        int                     rpe_rpc_errno;          /* RPC errno */
 
@@ -491,6 +514,7 @@ struct lst_test_ping_param {
        int png_flags;          /* reserved flags */
 };
 
+/* Both struct srpc_counters and struct sfw_counters are sent over the wire */
 struct srpc_counters {
        __u32 errors;
        __u32 rpcs_sent;
@@ -499,7 +523,7 @@ struct srpc_counters {
        __u32 rpcs_expired;
        __u64 bulk_get;
        __u64 bulk_put;
-} WIRE_ATTR;
+} __attribute__((packed));
 
 struct sfw_counters {
        /** milliseconds since current session started */
@@ -508,6 +532,6 @@ struct sfw_counters {
        __u32 zombie_sessions;
        __u32 brw_errors;
        __u32 ping_errors;
-} WIRE_ATTR;
+} __attribute__((packed));
 
 #endif