* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
static inline int lnet_is_wire_handle_none (lnet_handle_wire_t *wh)
{
- return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_NONE.wh_interface_cookie &&
- wh->wh_object_cookie == LNET_WIRE_HANDLE_NONE.wh_object_cookie);
+ return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
+ wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
}
static inline int lnet_md_exhausted (lnet_libmd_t *md)
md = (lnet_libmd_t *)lnet_freelist_alloc(&the_lnet.ln_free_mds);
LNET_UNLOCK();
+ if (md != NULL)
+ CFS_INIT_LIST_HEAD(&md->md_list);
+
return (md);
}
{
/* NEVER called with liblock held */
lnet_libmd_t *md;
- int size;
+ unsigned int size;
unsigned int niov;
if ((umd->options & LNET_MD_KIOV) != 0) {
/* Set here in case of early free */
md->md_options = umd->options;
md->md_niov = niov;
+ CFS_INIT_LIST_HEAD(&md->md_list);
}
return (md);
lnet_md_free (lnet_libmd_t *md)
{
/* ALWAYS called with liblock held */
- int size;
+ unsigned int size;
if ((md->md_options & LNET_MD_KIOV) != 0)
size = offsetof(lnet_libmd_t, md_iov.kiov[md->md_niov]);
lnet_eq2handle (lnet_handle_eq_t *handle, lnet_eq_t *eq)
{
if (eq == NULL) {
- *handle = LNET_EQ_NONE;
+ LNetInvalidateHandle(handle);
return;
}
LNET_UNLOCK();
}
-static inline lnet_nid_t
-lnet_ptlcompat_srcnid(lnet_nid_t src, lnet_nid_t dst)
-{
- /* Give myself a portals srcnid if I'm sending to portals */
- if (the_lnet.ln_ptlcompat > 0 &&
- LNET_NIDNET(dst) == 0)
- return LNET_MKNID(0, LNET_NIDADDR(src));
-
- return src;
-}
-
-static inline int
-lnet_ptlcompat_matchnid(lnet_nid_t lnet_nid, lnet_nid_t ptl_nid)
-{
- return ((ptl_nid == lnet_nid) ||
- (the_lnet.ln_ptlcompat > 0 &&
- LNET_NIDNET(ptl_nid) == 0 &&
- LNET_NETTYP(LNET_NIDNET(lnet_nid)) != LOLND &&
- LNET_NIDADDR(ptl_nid) == LNET_NIDADDR(lnet_nid)));
-}
-
-static inline int
-lnet_ptlcompat_matchnet(__u32 lnet_net, __u32 ptl_net)
-{
- return ((ptl_net == lnet_net) ||
- (the_lnet.ln_ptlcompat > 0 &&
- ptl_net == 0 &&
- LNET_NETTYP(lnet_net) != LOLND));
-}
-
static inline struct list_head *
lnet_nid2peerhash (lnet_nid_t nid)
{
__u32 local_ip, __u32 peer_ip, int peer_port);
void lnet_connect_console_error(int rc, lnet_nid_t peer_nid,
__u32 peer_ip, int port);
-int lnet_count_acceptor_nis(lnet_ni_t **first_ni);
-int lnet_accept(lnet_ni_t *blind_ni, cfs_socket_t *sock, __u32 magic);
+int lnet_count_acceptor_nis(void);
int lnet_acceptor_timeout(void);
int lnet_acceptor_port(void);
#endif
#ifdef HAVE_LIBPTHREAD
-int lnet_count_acceptor_nis(lnet_ni_t **first_ni);
+int lnet_count_acceptor_nis(void);
int lnet_acceptor_port(void);
#endif