Whamcloud - gitweb
bz-13516
[fs/lustre-release.git] / lnet / selftest / selftest.h
index 72cc17a..f27106e 100644 (file)
 
 #define LNET_ONLY
 
+#ifndef __KERNEL__
+#include <liblustre.h> /* userland spinlock_t and atomic_t */
+#endif
+
 #include <libcfs/kp30.h>
 #include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
+#include <lnet/lib-lnet.h>
 #include <lnet/lib-types.h>
 #include <lnet/lnetst.h>
 
-#ifndef __KERNEL__
-#include <liblustre.h> /* userland spinlock_t and atomic_t */
-#endif
-
 #include "rpc.h"
 #include "timer.h"
 
@@ -316,6 +317,7 @@ typedef struct {
         struct list_head  sn_batches; /* list of batches */
         char              sn_name[LST_NAME_SIZE];
         atomic_t          sn_brw_errors;
+        atomic_t          sn_ping_errors;
 } sfw_session_t;
 
 #define sfw_sid_equal(sid0, sid1)     ((sid0).ses_nid == (sid1).ses_nid && \
@@ -347,10 +349,10 @@ typedef struct sfw_test_instance {
         sfw_test_client_ops_t  *tsi_ops;          /* test client operations */
 
         /* public parameter for all test units */
-        int                     tsi_is_client:1;  /* is test client */
-        int                     tsi_stop_onerr:1; /* stop on error */
-        int                     tsi_concur;       /* concurrency */
-        int                     tsi_loop;         /* loop count */
+        int                     tsi_is_client:1;     /* is test client */
+        int                     tsi_stoptsu_onerr:1; /* stop tsu on error */
+        int                     tsi_concur;          /* concurrency */
+        int                     tsi_loop;            /* loop count */
 
         /* status of test instance */
         spinlock_t              tsi_lock;         /* serialize */
@@ -377,7 +379,6 @@ typedef struct sfw_test_unit {
         struct list_head        tsu_list;         /* chain on lst_test_instance */
         lnet_process_id_t       tsu_dest;         /* id of dest node */
         int                     tsu_loop;         /* loop count of the test */
-        int                     tsu_error;        /* error code */
         sfw_test_instance_t    *tsu_instance;     /* pointer to test instance */
         void                   *tsu_private;      /* private data */
         swi_workitem_t          tsu_worker;       /* workitem of the test unit */
@@ -516,6 +517,7 @@ swi_state2str (int state)
 #ifndef __KERNEL__
 
 int stt_poll_interval(void);
+int sfw_session_removed(void);
 
 int stt_check_events(void);
 int swi_check_events(void);