-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
+/*
+ * GPL HEADER START
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Intel Corporation.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
+ *
+ * lnet/include/lnet/lnetst.h
*
* Author: Liang Zhen <liangzhen@clusterfs.com>
- *
- * This file is part of Lustre, http://www.lustre.org
*/
#ifndef __LNET_ST_H__
#define __LNET_ST_H__
-#include <libcfs/kp30.h>
+#include <libcfs/libcfs.h>
#include <lnet/lnet.h>
#include <lnet/lib-types.h>
+#define LST_FEAT_NONE (0)
+#define LST_FEAT_BULK_LEN (1 << 0) /* enable variable page size */
+
+#define LST_FEATS_EMPTY (LST_FEAT_NONE)
+#define LST_FEATS_MASK (LST_FEAT_NONE | LST_FEAT_BULK_LEN)
+
#define LST_NAME_SIZE 32 /* max name buffer length */
#define LSTIO_DEBUG 0xC00 /* debug */
__u64 ses_stamp; /* time stamp */
} lst_sid_t; /*** session id */
-#define LST_INVALID_SID ((const lst_sid_t){.ses_nid = LNET_NID_ANY,\
- .ses_stamp = -1})
+extern lst_sid_t LST_INVALID_SID;
typedef struct {
__u64 bat_id; /* unique id in session */
*** for list_batch command */
typedef struct {
- struct list_head rpe_link; /* link chain */
+ cfs_list_t rpe_link; /* link chain */
lnet_process_id_t rpe_peer; /* peer's id */
struct timeval rpe_stamp; /* time stamp of RPC */
int rpe_state; /* peer's state */
int lstio_ses_key; /* IN: local key */
int lstio_ses_timeout; /* IN: session timeout */
int lstio_ses_force; /* IN: force create ? */
+ /** IN: session features */
+ unsigned lstio_ses_feats;
lst_sid_t *lstio_ses_idp; /* OUT: session id */
int lstio_ses_nmlen; /* IN: name length */
char *lstio_ses_namep; /* IN: session name */
typedef struct {
lst_sid_t *lstio_ses_idp; /* OUT: session id */
int *lstio_ses_keyp; /* OUT: local key */
+ /** OUT: session features */
+ unsigned *lstio_ses_featp;
lstcon_ndlist_ent_t *lstio_ses_ndinfo; /* OUT: */
int lstio_ses_nmlen; /* IN: name length */
char *lstio_ses_namep; /* OUT: session name */
char *lstio_dbg_namep; /* IN: name of group|batch */
int lstio_dbg_count; /* IN: # of test nodes to debug */
lnet_process_id_t *lstio_dbg_idsp; /* IN: id of test nodes */
- struct list_head *lstio_dbg_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_dbg_resultp; /* OUT: list head of result buffer */
} lstio_debug_args_t;
typedef struct {
char *lstio_grp_namep; /* IN: group name */
int lstio_grp_count; /* IN: # of nodes id */
lnet_process_id_t *lstio_grp_idsp; /* IN: array of nodes */
- struct list_head *lstio_grp_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_grp_resultp; /* OUT: list head of result buffer */
} lstio_group_update_args_t;
typedef struct {
int lstio_grp_nmlen; /* IN: name length */
char *lstio_grp_namep; /* IN: group name */
int lstio_grp_count; /* IN: # of nodes */
+ /** OUT: session features */
+ unsigned *lstio_grp_featp;
lnet_process_id_t *lstio_grp_idsp; /* IN: nodes */
- struct list_head *lstio_grp_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_grp_resultp; /* OUT: list head of result buffer */
} lstio_group_nodes_args_t;
typedef struct {
int lstio_bat_timeout; /* IN: timeout for the batch */
int lstio_bat_nmlen; /* IN: name length */
char *lstio_bat_namep; /* IN: batch name */
- struct list_head *lstio_bat_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_bat_resultp; /* OUT: list head of result buffer */
} lstio_batch_run_args_t;
typedef struct {
int lstio_bat_force; /* IN: abort unfinished test RPC */
int lstio_bat_nmlen; /* IN: name length */
char *lstio_bat_namep; /* IN: batch name */
- struct list_head *lstio_bat_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_bat_resultp; /* OUT: list head of result buffer */
} lstio_batch_stop_args_t;
typedef struct {
int lstio_bat_timeout; /* IN: timeout for waiting */
int lstio_bat_nmlen; /* IN: name length */
char *lstio_bat_namep; /* IN: batch name */
- struct list_head *lstio_bat_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_bat_resultp; /* OUT: list head of result buffer */
} lstio_batch_query_args_t;
typedef struct {
char *lstio_sta_namep; /* IN: group name */
int lstio_sta_count; /* IN: # of pid */
lnet_process_id_t *lstio_sta_idsp; /* IN: pid */
- struct list_head *lstio_sta_resultp; /* OUT: list head of result buffer */
+ cfs_list_t *lstio_sta_resultp; /* OUT: list head of result buffer */
} lstio_stat_args_t;
typedef enum {
lstio_bulk_param_t,
lstio_ping_param_t,
... more */
- struct list_head *lstio_tes_resultp; /* OUT: list head of result buffer */
+ int *lstio_tes_retp; /* OUT: private returned value */
+ cfs_list_t *lstio_tes_resultp; /* OUT: list head of result buffer */
} lstio_test_args_t;
typedef enum {
typedef struct {
int blk_opc; /* bulk operation code */
- int blk_npg; /* # pages */
+ int blk_size; /* size (bytes) */
int blk_time; /* time of running the test*/
int blk_flags; /* reserved flags */
-} lst_test_bulk_param_t, lst_bulk_param_t;
+} lst_test_bulk_param_t;
typedef struct {
int png_size; /* size of ping message */
int png_time; /* time */
int png_loop; /* loop */
int png_flags; /* reserved flags */
-} lst_test_ping_param_t, lst_ping_param_t;
+} lst_test_ping_param_t;
/* more tests */
-
+#ifdef __WINNT__
+#include <libcfs/libcfs_pack.h>
+#include <libcfs/libcfs_unpack.h>
+#endif
typedef struct {
__u32 errors;
__u32 rpcs_sent;
__u32 rpcs_expired;
__u64 bulk_get;
__u64 bulk_put;
-} srpc_counters_t;
+} WIRE_ATTR srpc_counters_t;
typedef struct {
- __u32 active_tests;
+ /** milliseconds since current session started */
+ __u32 running_ms;
__u32 active_batches;
__u32 zombie_sessions;
__u32 brw_errors;
-} sfw_counters_t;
+ __u32 ping_errors;
+} WIRE_ATTR sfw_counters_t;
#endif