Whamcloud - gitweb
LU-13004 net: discard LNET_MD_IOVEC
[fs/lustre-release.git] / lnet / include / uapi / linux / lnet / lnet-types.h
index f30f284..e488e7d 100644 (file)
@@ -223,20 +223,41 @@ struct lnet_acceptor_connreq {
 
 #define LNET_PROTO_ACCEPTOR_VERSION    1
 
-struct lnet_counters {
-       __u32   msgs_alloc;
-       __u32   msgs_max;
-       __u32   errors;
-       __u32   send_count;
-       __u32   recv_count;
-       __u32   route_count;
-       __u32   drop_count;
-       __u64   send_length;
-       __u64   recv_length;
-       __u64   route_length;
-       __u64   drop_length;
+struct lnet_counters_common {
+       __u32   lcc_msgs_alloc;
+       __u32   lcc_msgs_max;
+       __u32   lcc_errors;
+       __u32   lcc_send_count;
+       __u32   lcc_recv_count;
+       __u32   lcc_route_count;
+       __u32   lcc_drop_count;
+       __u64   lcc_send_length;
+       __u64   lcc_recv_length;
+       __u64   lcc_route_length;
+       __u64   lcc_drop_length;
 } WIRE_ATTR;
 
+struct lnet_counters_health {
+       __u32   lch_rst_alloc;
+       __u32   lch_resend_count;
+       __u32   lch_response_timeout_count;
+       __u32   lch_local_interrupt_count;
+       __u32   lch_local_dropped_count;
+       __u32   lch_local_aborted_count;
+       __u32   lch_local_no_route_count;
+       __u32   lch_local_timeout_count;
+       __u32   lch_local_error_count;
+       __u32   lch_remote_dropped_count;
+       __u32   lch_remote_error_count;
+       __u32   lch_remote_timeout_count;
+       __u32   lch_network_timeout_count;
+};
+
+struct lnet_counters {
+       struct lnet_counters_common lct_common;
+       struct lnet_counters_health lct_health;
+};
+
 #define LNET_NI_STATUS_UP      0x15aac0de
 #define LNET_NI_STATUS_DOWN    0xdeadface
 #define LNET_NI_STATUS_INVALID 0x00000000
@@ -307,28 +328,6 @@ struct lnet_ping_info {
  */
 #define LNET_WIRE_HANDLE_COOKIE_NONE   (-1)
 
-struct lnet_handle_eq {
-       __u64   cookie;
-};
-
-/**
- * Invalidate eq handle \a h.
- */
-static inline void LNetInvalidateEQHandle(struct lnet_handle_eq *h)
-{
-       h->cookie = LNET_WIRE_HANDLE_COOKIE_NONE;
-}
-
-/**
- * Check whether eq handle \a h is invalid.
- *
- * \return 1 if handle is invalid, 0 if valid.
- */
-static inline int LNetEQHandleIsInvalid(struct lnet_handle_eq h)
-{
-       return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie);
-}
-
 struct lnet_handle_md {
        __u64   cookie;
 };
@@ -351,10 +350,6 @@ static inline int LNetMDHandleIsInvalid(struct lnet_handle_md h)
        return (LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie);
 }
 
-struct lnet_handle_me {
-       __u64   cookie;
-};
-
 /**
  * Global process ID.
  */
@@ -408,15 +403,10 @@ struct lnet_md {
         * Specify the memory region associated with the memory descriptor.
         * If the options field has:
         * - LNET_MD_KIOV bit set: The start field points to the starting
-        * address of an array of lnet_kiov_t and the length field specifies
+        * address of an array of struct bio_vec and the length field specifies
         * the number of entries in the array. The length can't be bigger
-        * than LNET_MAX_IOV. The lnet_kiov_t is used to describe page-based
+        * than LNET_MAX_IOV. The struct bio_vec is used to describe page-based
         * fragments that are not necessarily mapped in virtal memory.
-        * - LNET_MD_IOVEC bit set: The start field points to the starting
-        * address of an array of struct kvec and the length field specifies
-        * the number of entries in the array. The length can't be bigger
-        * than LNET_MAX_IOV. The struct kvec is used to describe fragments
-        * that have virtual addresses.
         * - Otherwise: The memory region is contiguous. The start field
         * specifies the starting address for the memory region and the
         * length field specifies its length.
@@ -470,15 +460,13 @@ struct lnet_md {
         *   acknowledgment. Acknowledgments are never sent for GET operations.
         *   The data sent in the REPLY serves as an implicit acknowledgment.
         * - LNET_MD_KIOV: The start and length fields specify an array of
-        *   lnet_kiov_t.
-        * - LNET_MD_IOVEC: The start and length fields specify an array of
-        *   struct iovec.
+        *   struct bio_vec.
         * - LNET_MD_MAX_SIZE: The max_size field is valid.
         * - LNET_MD_BULK_HANDLE: The bulk_handle field is valid.
         *
         * Note:
-        * - LNET_MD_KIOV or LNET_MD_IOVEC allows for a scatter/gather
-        *   capability for memory descriptors. They can't be both set.
+        * - LNET_MD_KIOV allows for a scatter/gather capability for memory
+        *   descriptors.
         * - When LNET_MD_MAX_SIZE is set, the total length of the memory
         *   region (i.e. sum of all fragment lengths) must not be less than
         *   \a max_size.
@@ -493,11 +481,10 @@ struct lnet_md {
        void            *user_ptr;
        /**
         * A handle for the event queue used to log the operations performed on
-        * the memory region. If this argument is a NULL handle (i.e. nullified
-        * by LNetInvalidateHandle()), operations performed on this memory
-        * descriptor are not logged.
+        * the memory region. If this argument is a NULL handle operations
+        * performed on this memory descriptor are not logged.
         */
-       struct lnet_handle_eq eq_handle;
+       struct lnet_eq *eq_handle;
        /**
         * The bulk MD handle which was registered to describe the buffers
         * either to be used to transfer data to the peer or receive data
@@ -529,7 +516,7 @@ struct lnet_md {
 /** See struct lnet_md::options. */
 #define LNET_MD_ACK_DISABLE         (1 << 5)
 /** See struct lnet_md::options. */
-#define LNET_MD_IOVEC               (1 << 6)
+/* deprecated #define LNET_MD_IOVEC  (1 << 6) */
 /** See struct lnet_md::options. */
 #define LNET_MD_MAX_SIZE            (1 << 7)
 /** See struct lnet_md::options. */
@@ -543,21 +530,6 @@ struct lnet_md {
 /** Infinite threshold on MD operations. See struct lnet_md::threshold */
 #define LNET_MD_THRESH_INF      (-1)
 
-/**
- * A page-based fragment of a MD.
- */
-typedef struct {
-       /** Pointer to the page where the fragment resides */
-       struct page      *kiov_page;
-       /** Length in bytes of the fragment */
-       unsigned int     kiov_len;
-       /**
-        * Starting offset of the fragment within the page. Note that the
-        * end of the fragment must not pass the end of the page; i.e.,
-        * kiov_len + kiov_offset <= PAGE_SIZE.
-        */
-       unsigned int     kiov_offset;
-} lnet_kiov_t;
 /** @} lnet_md */
 
 /** \addtogroup lnet_eq