Whamcloud - gitweb
LU-10391 lnet: switch to large lnet_processid for matching
[fs/lustre-release.git] / lnet / include / lnet / api.h
index 1bd0f94..c139be1 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  */
 
 #ifndef __LNET_API_H__
@@ -92,18 +91,16 @@ bool LNetIsPeerLocal(lnet_nid_t nid);
  * list is a chain of MEs. Each ME includes a pointer to a memory descriptor
  * and a set of match criteria. The match criteria can be used to reject
  * incoming requests based on process ID or the match bits provided in the
- * request. MEs can be dynamically inserted into a match list by LNetMEAttach()
- * and removed from its list by LNetMEUnlink().
+ * request. MEs can be dynamically inserted into a match list by LNetMEAttach(),
+ * and must then be attached to an MD with LNetMDAttach().
  * @{ */
 struct lnet_me *
 LNetMEAttach(unsigned int portal,
-            struct lnet_process_id match_id_in,
+            struct lnet_processid *match_id_in,
             __u64 match_bits_in,
             __u64 ignore_bits_in,
             enum lnet_unlink unlink_in,
             enum lnet_ins_pos pos_in);
-
-void LNetMEUnlink(struct lnet_me *current_in);
 /** @} lnet_me */
 
 /** \defgroup lnet_md Memory descriptors
@@ -119,42 +116,19 @@ void LNetMEUnlink(struct lnet_me *current_in);
  * associated with a MD: LNetMDUnlink().
  * @{ */
 int LNetMDAttach(struct lnet_me *current_in,
-                struct lnet_md md_in,
+                const struct lnet_md *md_in,
                 enum lnet_unlink unlink_in,
                 struct lnet_handle_md *md_handle_out);
 
-int LNetMDBind(struct lnet_md   md_in,
+int LNetMDBind(const struct lnet_md *md_in,
               enum lnet_unlink unlink_in,
               struct lnet_handle_md *md_handle_out);
 
-int LNetMDUnlink(struct lnet_handle_md md_in);
-/** @} lnet_md */
+int __LNetMDUnlink(struct lnet_handle_md md_in, bool discard);
+#define LNetMDUnlink(handle) __LNetMDUnlink(handle, false)
 
-/** \defgroup lnet_eq Events and event queues
- *
- * Event queues (abbreviated as EQ) are used to log operations performed on
- * local MDs. In particular, they signal the completion of a data transmission
- * into or out of a MD. They can also be used to hold acknowledgments for
- * completed PUT operations and indicate when a MD has been unlinked. Multiple
- * MDs can share a single EQ. An EQ must have an event handler
- * associated with it. It will be run for each event that is deposited into
- * the EQ.
- *
- * In addition to the struct lnet_eq, the LNet API defines two types
- * associated with events: The ::lnet_event_kind defines the kinds of events
- * that can be stored in an EQ. The struct lnet_event defines a structure that
- * holds the information about with an event.
- *
- * There are two functions for dealing with EQs: LNetEQAlloc() is used
- * to create an EQ and allocate the resources needed, while LNetEQFree()
- * releases these resources and frees the EQ.
- * @{ */
-struct lnet_eq *
-LNetEQAlloc(lnet_eq_handler_t handler);
-
-void LNetEQFree(struct lnet_eq *eventq_in);
-
-/** @} lnet_eq */
+void lnet_assert_handler_unused(lnet_handler_t handler);
+/** @} lnet_md */
 
 /** \defgroup lnet_data Data movement operations
  *
@@ -189,6 +163,7 @@ int LNetClearLazyPortal(int portal);
 int LNetCtl(unsigned int cmd, void *arg);
 void LNetDebugPeer(struct lnet_process_id id);
 int LNetGetPeerDiscoveryStatus(void);
+int LNetAddPeer(lnet_nid_t *nids, __u32 num_nids);
 
 /** @} lnet_misc */