Whamcloud - gitweb
LU-13306 mgs: use large NIDS in the nid table on the MGS
[fs/lustre-release.git] / lnet / include / lnet / api.h
index f552349..2d15089 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__
@@ -75,10 +74,10 @@ int LNetNIFini(void);
  *
  * \see LNetMEAttach
  * @{ */
-int LNetGetId(unsigned int index, struct lnet_process_id *id);
-int LNetDist(lnet_nid_t nid, lnet_nid_t *srcnid, __u32 *order);
-lnet_nid_t LNetPrimaryNID(lnet_nid_t nid);
-bool LNetIsPeerLocal(lnet_nid_t nid);
+int LNetGetId(unsigned int index, struct lnet_processid *id, bool large_nids);
+int LNetDist(struct lnet_nid *nid, struct lnet_nid *srcnid, __u32 *order);
+void LNetPrimaryNID(struct lnet_nid *nid);
+bool LNetIsPeerLocal(struct lnet_nid *nid);
 
 /** @} lnet_addr */
 
@@ -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
@@ -127,7 +124,8 @@ 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);
+int __LNetMDUnlink(struct lnet_handle_md md_in, bool discard);
+#define LNetMDUnlink(handle) __LNetMDUnlink(handle, false)
 
 void lnet_assert_handler_unused(lnet_handler_t handler);
 /** @} lnet_md */
@@ -137,22 +135,22 @@ void lnet_assert_handler_unused(lnet_handler_t handler);
  * The LNet API provides two data movement operations: LNetPut()
  * and LNetGet().
  * @{ */
-int LNetPut(lnet_nid_t       self,
-           struct lnet_handle_md md_in,
-           enum lnet_ack_req   ack_req_in,
-           struct lnet_process_id target_in,
-           unsigned int      portal_in,
-           __u64             match_bits_in,
-           unsigned int      offset_in,
-           __u64             hdr_data_in);
-
-int LNetGet(lnet_nid_t       self,
-           struct lnet_handle_md md_in,
-           struct lnet_process_id target_in,
-           unsigned int      portal_in,
-           __u64             match_bits_in,
-           unsigned int      offset_in,
-           bool              recovery);
+int LNetPut(struct lnet_nid            *self,
+           struct lnet_handle_md       md_in,
+           enum lnet_ack_req           ack_req_in,
+           struct lnet_processid       *target_in,
+           unsigned int                portal_in,
+           __u64                       match_bits_in,
+           unsigned int                offset_in,
+           __u64                       hdr_data_in);
+
+int LNetGet(struct lnet_nid            *self,
+           struct lnet_handle_md       md_in,
+           struct lnet_processid       *target_in,
+           unsigned int                portal_in,
+           __u64                       match_bits_in,
+           unsigned int                offset_in,
+           bool                        recovery);
 /** @} lnet_data */
 
 
@@ -163,8 +161,9 @@ int LNetGet(lnet_nid_t            self,
 int LNetSetLazyPortal(int portal);
 int LNetClearLazyPortal(int portal);
 int LNetCtl(unsigned int cmd, void *arg);
-void LNetDebugPeer(struct lnet_process_id id);
+void LNetDebugPeer(struct lnet_processid *id);
 int LNetGetPeerDiscoveryStatus(void);
+int LNetAddPeer(struct lnet_nid *nids, u32 num_nids);
 
 /** @} lnet_misc */