/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define DEBUG_SUBSYSTEM S_LNET
#include <lnet/lib-lnet.h>
-#if defined(__KERNEL__) || defined(HAVE_PTHREAD)
+#if defined(__KERNEL__) || defined(HAVE_LIBPTHREAD)
static int accept_port = 988;
static int accept_backlog = 127;
#define cfs_mt_wait_for_completion(c) cfs_wait_for_completion(c)
#define cfs_mt_complete(c) cfs_complete(c)
#define cfs_mt_fini_completion(c) cfs_fini_completion(c)
-#define cfs_create_thread(func, a) cfs_kernel_thread(func, a, 0)
EXPORT_SYMBOL(lnet_acceptor_port);
switch (rc) {
/* "normal" errors */
case -ECONNREFUSED:
- CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u "
- "on port %d was refused: "
- "check that Lustre is running on that node.\n",
- libcfs_nid2str(peer_nid),
- HIPQUAD(peer_ip), peer_port);
+ CNETERR("Connection to %s at host %u.%u.%u.%u on port %d was "
+ "refused: check that Lustre is running on that node.\n",
+ libcfs_nid2str(peer_nid),
+ HIPQUAD(peer_ip), peer_port);
break;
case -EHOSTUNREACH:
case -ENETUNREACH:
- CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u "
- "was unreachable: the network or that node may "
- "be down, or Lustre may be misconfigured.\n",
- libcfs_nid2str(peer_nid), HIPQUAD(peer_ip));
+ CNETERR("Connection to %s at host %u.%u.%u.%u "
+ "was unreachable: the network or that node may "
+ "be down, or Lustre may be misconfigured.\n",
+ libcfs_nid2str(peer_nid), HIPQUAD(peer_ip));
break;
case -ETIMEDOUT:
- CDEBUG(D_NETERROR, "Connection to %s at host %u.%u.%u.%u on "
- "port %d took too long: that node may be hung "
- "or experiencing high load.\n",
- libcfs_nid2str(peer_nid),
- HIPQUAD(peer_ip), peer_port);
+ CNETERR("Connection to %s at host %u.%u.%u.%u on "
+ "port %d took too long: that node may be hung "
+ "or experiencing high load.\n",
+ libcfs_nid2str(peer_nid),
+ HIPQUAD(peer_ip), peer_port);
break;
case -ECONNRESET:
LCONSOLE_ERROR_MSG(0x11b, "Connection to %s at host %u.%u.%u.%u"
str = "'old' socknal/tcpnal";
else if (lnet_accept_magic(magic, LNET_PROTO_RA_MAGIC))
str = "'old' ranal";
- else if (lnet_accept_magic(magic, LNET_PROTO_OPENIB_MAGIC))
- str = "'old' openibnal";
else
str = "unrecognised";
libcfs_sock_release(lnet_acceptor_state.pta_sock);
lnet_acceptor_state.pta_sock = NULL;
- LCONSOLE(0, "Acceptor stopping\n");
+ CDEBUG(D_NET, "Acceptor stopping\n");
/* unblock lnet_acceptor_stop() */
cfs_mt_complete(&lnet_acceptor_state.pta_signal);
if (lnet_count_acceptor_nis() == 0) /* not required */
return 0;
- rc2 = cfs_create_thread(lnet_acceptor, (void *)(ulong_ptr_t)secure);
+ rc2 = cfs_create_thread(lnet_acceptor, (void *)(ulong_ptr_t)secure, 0);
if (rc2 < 0) {
CERROR("Can't start acceptor thread: %d\n", rc);
cfs_mt_fini_completion(&lnet_acceptor_state.pta_signal);
lnet_acceptor_stop(void)
{
}
-#endif /* defined(__KERNEL__) || defined(HAVE_PTHREAD) */
+#endif /* defined(__KERNEL__) || defined(HAVE_LIBPTHREAD) */