2 * This file is part of Lustre, https://wiki.hpdd.intel.com/
4 * Portals is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
8 * Portals is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Portals; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 * header for lnet ioctl
20 * Copyright (c) 2014, Intel Corporation.
25 #include <lnet/types.h>
27 /** \addtogroup lnet_fault_simulation
41 #define LNET_ACK_BIT (1 << 0)
42 #define LNET_PUT_BIT (1 << 1)
43 #define LNET_GET_BIT (1 << 2)
44 #define LNET_REPLY_BIT (1 << 3)
46 /** ioctl parameter for LNet fault simulation */
47 struct lnet_fault_attr {
49 * source NID of drop rule
50 * LNET_NID_ANY is wildcard for all sources
51 * 255.255.255.255@net is wildcard for all addresses from @net
54 /** destination NID of drop rule, see \a dr_src for details */
57 * Portal mask to drop, -1 means all portals, for example:
58 * fa_ptl_mask = (1 << _LDLM_CB_REQUEST_PORTAL ) |
59 * (1 << LDLM_CANCEL_REQUEST_PORTAL)
61 * If it is non-zero then only PUT and GET will be filtered, otherwise
62 * there is no portal filter, all matched messages will be checked.
66 * message types to drop, for example:
67 * dra_type = LNET_DROP_ACK_BIT | LNET_DROP_PUT_BIT
69 * If it is non-zero then only specified message types are filtered,
70 * otherwise all message types will be checked.
74 /** message drop simulation */
76 /** drop rate of this rule */
79 * time interval of message drop, it is exclusive
84 /** message latency simulation */
88 * time interval of message delay, it is exclusive
92 /** latency to delay */
100 /** fault simluation stats */
101 struct lnet_fault_stat {
102 /** total # matched messages */
104 /** # dropped LNET_MSG_PUT by this rule */
106 /** # dropped LNET_MSG_ACK by this rule */
108 /** # dropped LNET_MSG_GET by this rule */
110 /** # dropped LNET_MSG_REPLY by this rule */
114 /** total # dropped messages */
118 /** total # delayed messages */
125 /** @} lnet_fault_simulation */
127 #define LNET_DEV_ID 0
128 #define LNET_DEV_PATH "/dev/lnet"
129 #define LNET_DEV_MAJOR 10
130 #define LNET_DEV_MINOR 240