libcfs_nidstr(peer_nid), sa);
break;
case -ECONNRESET:
- LCONSOLE_ERROR_MSG(0x11b,
- "Connection to %s at host %pIScp was reset: is it running a compatible version of Lustre and is %s one of its NIDs?\n",
- libcfs_nidstr(peer_nid), sa,
- libcfs_nidstr(peer_nid));
+ LCONSOLE_ERROR("Connection to %s at host %pIScp was reset: is it running a compatible version of Lustre and is %s one of its NIDs?\n",
+ libcfs_nidstr(peer_nid), sa,
+ libcfs_nidstr(peer_nid));
break;
case -EPROTO:
- LCONSOLE_ERROR_MSG(0x11c,
- "Protocol error connecting to %s at host %pIScp: is it running a compatible version of Lustre?\n",
- libcfs_nidstr(peer_nid), sa);
+ LCONSOLE_ERROR("Protocol error connecting to %s at host %pIScp: is it running a compatible version of Lustre?\n",
+ libcfs_nidstr(peer_nid), sa);
break;
case -EADDRINUSE:
- LCONSOLE_ERROR_MSG(0x11d,
- "No privileged ports available to connect to %s at host %pIScp\n",
- libcfs_nidstr(peer_nid), sa);
+ LCONSOLE_ERROR("No privileged ports available to connect to %s at host %pIScp\n",
+ libcfs_nidstr(peer_nid), sa);
break;
default:
- LCONSOLE_ERROR_MSG(0x11e,
- "Unexpected error %d connecting to %s at host %pIScp\n",
- rc, libcfs_nidstr(peer_nid), sa);
+ LCONSOLE_ERROR("Unexpected error %d connecting to %s at host %pIScp\n",
+ rc, libcfs_nidstr(peer_nid), sa);
break;
}
}
else
str = "unrecognised";
- LCONSOLE_ERROR_MSG(0x11f, "Refusing connection from %pISc"
- " magic %08x: %s acceptor protocol\n",
- &peer, magic, str);
+ LCONSOLE_ERROR("Refusing connection from %pISc magic %08x: %s acceptor protocol\n",
+ &peer, magic, str);
return -EPROTO;
}
/* right NET, wrong NID! */
if (ni != NULL)
lnet_ni_decref(ni);
- LCONSOLE_ERROR_MSG(0x120,
- "Refusing connection from %pISc for %s: No matching NI\n",
- &peer, libcfs_nidstr(&nid));
+ LCONSOLE_ERROR("Refusing connection from %pISc for %s: No matching NI\n",
+ &peer, libcfs_nidstr(&nid));
return -EPERM;
}
if (ni->ni_net->net_lnd->lnd_accept == NULL) {
/* This catches a request for the loopback LND */
lnet_ni_decref(ni);
- LCONSOLE_ERROR_MSG(0x121,
- "Refusing connection from %pISc for %s: NI doesn not accept IP connections\n",
- &peer, libcfs_nidstr(&nid));
+ LCONSOLE_ERROR("Refusing connection from %pISc for %s: NI doesn not accept IP connections\n",
+ &peer, libcfs_nidstr(&nid));
return -EPERM;
}
if (IS_ERR(lnet_acceptor_state.pta_sock)) {
rc = PTR_ERR(lnet_acceptor_state.pta_sock);
if (rc == -EADDRINUSE)
- LCONSOLE_ERROR_MSG(0x122, "Can't start acceptor on port"
- " %d: port already in use\n",
- accept_port);
+ LCONSOLE_ERROR("Can't start acceptor on port %d: port already in use\n",
+ accept_port);
else
- LCONSOLE_ERROR_MSG(0x123, "Can't start acceptor on port "
- "%d: unexpected error %d\n",
- accept_port, rc);
+ LCONSOLE_ERROR("Can't start acceptor on port %d: unexpected error %d\n",
+ accept_port, rc);
lnet_acceptor_state.pta_sock = NULL;
} else {
} else if (!strcmp(acc, "none")) {
return 0;
} else {
- LCONSOLE_ERROR_MSG(0x124, "Can't parse 'accept=\"%s\"'\n",
- acc);
+ LCONSOLE_ERROR("Can't parse 'accept=\"%s\"'\n", acc);
return -EINVAL;
}
}
memset(dashes, '-', sizeof(dashes));
dashes[sizeof(dashes)-1] = 0;
- LCONSOLE_ERROR_MSG(0x10f, "Error parsing '%s=\"%s\"'\n", name, str);
- LCONSOLE_ERROR_MSG(0x110, "here...........%.*s..%.*s|%.*s|\n",
- (int)strlen(name), dots, offset, dots,
- (width < 1) ? 0 : width - 1, dashes);
+ LCONSOLE_ERROR("Error parsing '%s=\"%s\"'\n", name, str);
+ LCONSOLE_ERROR("here...........%.*s..%.*s|%.*s|\n",
+ (int)strlen(name), dots, offset, dots,
+ (width < 1) ? 0 : width - 1, dashes);
}
static int
-lnet_issep (char c)
+lnet_issep(char c)
{
switch (c) {
case '\n':
return -ENOMEM;
if (ni->ni_interface != NULL) {
- LCONSOLE_ERROR_MSG(0x115, "%s: interface %s already set for net %s: rc = %d\n",
- iface, ni->ni_interface,
- libcfs_net2str(LNET_NID_NET(&ni->ni_nid)),
- -EINVAL);
+ LCONSOLE_ERROR("%s: interface %s already set for net %s: rc = %d\n",
+ iface, ni->ni_interface,
+ libcfs_net2str(LNET_NID_NET(&ni->ni_nid)),
+ -EINVAL);
return -EINVAL;
}
if (strlen(networks) > LNET_SINGLE_TEXTBUF_NOB) {
/* _WAY_ conservative */
- LCONSOLE_ERROR_MSG(0x112, "Can't parse networks: string too "
- "long\n");
+ LCONSOLE_ERROR("Can't parse networks: string too long\n");
return -EINVAL;
}
*/
net_id = libcfs_str2net(name);
if (net_id == LNET_NET_ANY) {
- LCONSOLE_ERROR_MSG(0x113,
- "Unrecognised network type\n");
+ LCONSOLE_ERROR("Unrecognised network type\n");
str = name;
goto failed_syntax;
}
the_lnet.ln_nis_use_large_nids);
if (nip < 0) {
if (nip != -ENOENT) {
- LCONSOLE_ERROR_MSG(0x117,
- "Error %d enumerating local IP interfaces for ip2nets to match\n",
+ LCONSOLE_ERROR("Error %d enumerating local IP interfaces for ip2nets to match\n",
nip);
} else {
- LCONSOLE_ERROR_MSG(0x118,
- "No local IP interfaces for ip2nets to match\n");
+ LCONSOLE_ERROR("No local IP interfaces for ip2nets to match\n");
}
return nip;
}
rc = lnet_match_networks(networksp, ip2nets, ipaddrs, nip);
if (rc < 0) {
- LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc);
+ LCONSOLE_ERROR("Error %d parsing ip2nets\n", rc);
} else if (rc == 0) {
- LCONSOLE_ERROR_MSG(0x11a, "ip2nets does not match "
- "any local IP interfaces\n");
+ LCONSOLE_ERROR("ip2nets does not match any local IP interfaces\n");
rc = -ENOENT;
}
CFS_FREE_PTR_ARRAY(ipaddrs, nip);
int nrbs = LNET_NRB_TINY;
if (tiny_router_buffers < 0) {
- LCONSOLE_ERROR_MSG(0x10c,
- "tiny_router_buffers=%d invalid when "
- "routing enabled\n", tiny_router_buffers);
+ LCONSOLE_ERROR("tiny_router_buffers=%d invalid when routing enabled\n",
+ tiny_router_buffers);
return -EINVAL;
}
int nrbs = LNET_NRB_SMALL;
if (small_router_buffers < 0) {
- LCONSOLE_ERROR_MSG(0x10c,
- "small_router_buffers=%d invalid when "
- "routing enabled\n", small_router_buffers);
+ LCONSOLE_ERROR("small_router_buffers=%d invalid when routing enabled\n",
+ small_router_buffers);
return -EINVAL;
}
int nrbs = LNET_NRB_LARGE;
if (large_router_buffers < 0) {
- LCONSOLE_ERROR_MSG(0x10c,
- "large_router_buffers=%d invalid when "
- "routing enabled\n", large_router_buffers);
+ LCONSOLE_ERROR("large_router_buffers=%d invalid when routing enabled\n",
+ large_router_buffers);
return -EINVAL;
}
/* explicitly enabled */
} else {
rc = -EINVAL;
- LCONSOLE_ERROR_MSG(0x10b,
- "lnet: forwarding='%s' not set to either 'enabled' or 'disabled': rc = %d\n",
- forwarding, rc);
+ LCONSOLE_ERROR("lnet: forwarding='%s' not set to either 'enabled' or 'disabled': rc = %d\n",
+ forwarding, rc);
return rc;
}
sizeof(struct lnet_rtrbufpool));
if (the_lnet.ln_rtrpools == NULL) {
rc = -ENOMEM;
- LCONSOLE_ERROR_MSG(0x10c,
- "lnet: error allocating router buffer pool: rc = %d\n",
- rc);
+ LCONSOLE_ERROR("lnet: error allocating router buffer pool: rc = %d\n",
+ rc);
return rc;
}