Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnetctl.h
index 49d7215..bf86aed 100644 (file)
@@ -1,36 +1,17 @@
-/*
- *   This file is part of Lustre, https://wiki.hpdd.intel.com/
- *
- *   Portals is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Portals 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 for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with Portals; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// SPDX-License-Identifier: GPL-2.0
+
+/* Copyright (c) 2014, 2017, Intel Corporation. */
+
+/* This file is part of Lustre, http://www.lustre.org/
  *
  * header for lnet ioctl
  */
-/*
- * Copyright (c) 2014, Intel Corporation.
- */
+
 #ifndef __UAPI_LNETCTL_H_
 #define __UAPI_LNETCTL_H_
 
-/*
- * This is due to us being out of kernel and the way the OpenSFS branch
- * handles CFLAGS.
- */
-#ifdef __KERNEL__
-# include <uapi/linux/lnet/lnet-types.h>
-#else
-# include <linux/lnet/lnet-types.h>
-#endif
+#include <linux/types.h>
+#include <linux/lnet/lnet-types.h>
 
 /** \addtogroup lnet_fault_simulation
  * @{ */
@@ -51,6 +32,19 @@ enum {
 #define LNET_GET_BIT           (1 << 2)
 #define LNET_REPLY_BIT         (1 << 3)
 
+#define HSTATUS_END                    11
+#define HSTATUS_LOCAL_INTERRUPT_BIT    (1 << 1)
+#define HSTATUS_LOCAL_DROPPED_BIT      (1 << 2)
+#define HSTATUS_LOCAL_ABORTED_BIT      (1 << 3)
+#define HSTATUS_LOCAL_NO_ROUTE_BIT     (1 << 4)
+#define HSTATUS_LOCAL_ERROR_BIT                (1 << 5)
+#define HSTATUS_LOCAL_TIMEOUT_BIT      (1 << 6)
+#define HSTATUS_REMOTE_ERROR_BIT       (1 << 7)
+#define HSTATUS_REMOTE_DROPPED_BIT     (1 << 8)
+#define HSTATUS_REMOTE_TIMEOUT_BIT     (1 << 9)
+#define HSTATUS_NETWORK_TIMEOUT_BIT    (1 << 10)
+#define HSTATUS_RANDOM                 0xffffffff
+
 /** ioctl parameter for LNet fault simulation */
 struct lnet_fault_attr {
        /**
@@ -61,6 +55,10 @@ struct lnet_fault_attr {
        lnet_nid_t                      fa_src;
        /** destination NID of drop rule, see \a dr_src for details */
        lnet_nid_t                      fa_dst;
+       /** local NID. In case of router this is the NID we're ceiving
+        * messages on
+        */
+       lnet_nid_t                      fa_local_nid;
        /**
         * Portal mask to drop, -1 means all portals, for example:
         * fa_ptl_mask = (1 << _LDLM_CB_REQUEST_PORTAL ) |
@@ -88,6 +86,12 @@ struct lnet_fault_attr {
                         * with da_rate
                         */
                        __u32                   da_interval;
+                       /** error type mask */
+                       __u32                   da_health_error_mask;
+                       /** randomize error generation */
+                       __u32                   da_random:1,
+                       /** drop all messages if flag is set */
+                                               da_drop_all:1;
                } drop;
                /** message latency simulation */
                struct {