From e84e89c90bfbe7a9e3bcfc9cdadb79dd9ee6c11b Mon Sep 17 00:00:00 2001 From: jitendra Date: Wed, 13 Jun 2007 07:28:20 +0000 Subject: [PATCH] This update includes Hex error ID's and checksum calculation for console error messages. It also includes code fixes for first five improved error messages. b=10595 i=adilger i=braam --- lnet/include/libcfs/libcfs.h | 10 +++++++++- lnet/klnds/iiblnd/iiblnd.c | 2 +- lnet/klnds/iiblnd/iiblnd_cb.c | 2 +- lnet/klnds/o2iblnd/o2iblnd_cb.c | 4 ++-- lnet/klnds/openiblnd/openiblnd_cb.c | 2 +- lnet/klnds/ptllnd/ptllnd_peer.c | 6 +++--- lnet/klnds/qswlnd/qswlnd.c | 2 +- lnet/klnds/ralnd/ralnd_cb.c | 2 +- lnet/klnds/socklnd/socklnd.c | 2 +- lnet/klnds/socklnd/socklnd_cb.c | 2 +- lnet/klnds/viblnd/viblnd_cb.c | 8 ++++---- lnet/libcfs/nidstrings.c | 4 ++-- lnet/lnet/acceptor.c | 20 ++++++++++---------- lnet/lnet/api-ni.c | 26 +++++++++++++------------- lnet/lnet/config.c | 24 ++++++++++++------------ lnet/lnet/router.c | 10 +++++----- 16 files changed, 67 insertions(+), 59 deletions(-) diff --git a/lnet/include/libcfs/libcfs.h b/lnet/include/libcfs/libcfs.h index 82a3c51..4918ae0 100644 --- a/lnet/include/libcfs/libcfs.h +++ b/lnet/include/libcfs/libcfs.h @@ -224,6 +224,13 @@ do { \ #endif /* !__KERNEL__ */ +/* + * Lustre Error Checksum: calculates checksum + * of Hex number by XORing each bit. + */ +#define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \ + ((hexnum) >> 8 & 0xf)) + #define CWARN(format, a...) CDEBUG_LIMIT(D_WARNING, format, ## a) #define CERROR(format, a...) CDEBUG_LIMIT(D_ERROR, format, ## a) #define CEMERG(format, a...) CDEBUG_LIMIT(D_EMERG, format, ## a) @@ -231,7 +238,8 @@ do { \ #define LCONSOLE(mask, format, a...) CDEBUG(D_CONSOLE | (mask), format, ## a) #define LCONSOLE_INFO(format, a...) CDEBUG_LIMIT(D_CONSOLE, format, ## a) #define LCONSOLE_WARN(format, a...) CDEBUG_LIMIT(D_CONSOLE | D_WARNING, format, ## a) -#define LCONSOLE_ERROR(format, a...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, format, ## a) +#define LCONSOLE_ERROR(errnum, format, a...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \ + "%x-%x: " format, errnum, LERRCHKSUM(errnum), ## a) #define LCONSOLE_EMERG(format, a...) CDEBUG(D_CONSOLE | D_EMERG, format, ## a) #ifdef CDEBUG_ENABLED diff --git a/lnet/klnds/iiblnd/iiblnd.c b/lnet/klnds/iiblnd/iiblnd.c index 27b31a5..288fea1 100644 --- a/lnet/klnds/iiblnd/iiblnd.c +++ b/lnet/klnds/iiblnd/iiblnd.c @@ -2128,7 +2128,7 @@ kibnal_module_init (void) int rc; if (the_lnet.ln_ptlcompat != 0) { - LCONSOLE_ERROR("IIB does not support portals compatibility mode\n"); + LCONSOLE_ERROR(0x12c, "IIB does not support portals compatibility mode\n"); return -ENODEV; } diff --git a/lnet/klnds/iiblnd/iiblnd_cb.c b/lnet/klnds/iiblnd/iiblnd_cb.c index fb4bba0..91a22b8 100644 --- a/lnet/klnds/iiblnd/iiblnd_cb.c +++ b/lnet/klnds/iiblnd/iiblnd_cb.c @@ -1707,7 +1707,7 @@ kibnal_eager_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, if (conn->ibc_version == IBNAL_MSG_VERSION_RDMAREPLYNOTRSRVD) { /* Can't block if RDMA completions need normal credits */ - LCONSOLE_ERROR("Dropping message from %s: no buffers free. " + LCONSOLE_ERROR(0x12d, "Dropping message from %s: no buffers free. " "%s is running an old version of LNET that may " "deadlock if messages wait for buffers)\n", libcfs_nid2str(conn->ibc_peer->ibp_nid), diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index fbc98cb..c13c4c0 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2746,8 +2746,8 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return 0; case RDMA_CM_EVENT_DEVICE_REMOVAL: - LCONSOLE_ERROR("Received notification of device removal\n"); - LCONSOLE_ERROR("Please shutdown LNET to allow this to proceed\n"); + LCONSOLE_ERROR(0x131, "Received notification of device removal\n" + "Please shutdown LNET to allow this to proceed\n"); /* Can't remove network from underneath LNET for now, so I have * to ignore this */ return 0; diff --git a/lnet/klnds/openiblnd/openiblnd_cb.c b/lnet/klnds/openiblnd/openiblnd_cb.c index 75f3e23..a5ac469 100644 --- a/lnet/klnds/openiblnd/openiblnd_cb.c +++ b/lnet/klnds/openiblnd/openiblnd_cb.c @@ -1357,7 +1357,7 @@ kibnal_eager_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, if (conn->ibc_version == IBNAL_MSG_VERSION_RDMAREPLYNOTRSRVD) { /* Can't block if RDMA completions need normal credits */ - LCONSOLE_ERROR("Dropping message from %s: no buffers free. " + LCONSOLE_ERROR(0x12a, "Dropping message from %s: no buffers free. " "%s is running an old version of LNET that may " "deadlock if messages wait for buffers)\n", libcfs_nid2str(conn->ibc_peer->ibp_nid), diff --git a/lnet/klnds/ptllnd/ptllnd_peer.c b/lnet/klnds/ptllnd/ptllnd_peer.c index fc52df7..f7fc923 100644 --- a/lnet/klnds/ptllnd/ptllnd_peer.c +++ b/lnet/klnds/ptllnd/ptllnd_peer.c @@ -806,7 +806,7 @@ kptllnd_peer_check_bucket (int idx, int stamp) nactive = kptllnd_count_queue(&peer->peer_activeq); spin_unlock_irqrestore(&peer->peer_lock, flags); - LCONSOLE_ERROR("Timing out %s: %s\n", + LCONSOLE_ERROR(0x126, "Timing out %s: %s\n", libcfs_id2str(peer->peer_id), (tx->tx_tposted == 0) ? "no free peer buffers" : "please check Portals"); @@ -874,11 +874,11 @@ kptllnd_id2peer_locked (lnet_process_id_t id) void kptllnd_peertable_overflow_msg(char *str, lnet_process_id_t id) { - LCONSOLE_ERROR("%s %s overflows the peer table[%d]: " + LCONSOLE_ERROR(0x127, "%s %s overflows the peer table[%d]: " "messages may be dropped\n", str, libcfs_id2str(id), kptllnd_data.kptl_n_active_peers); - LCONSOLE_ERROR("Please correct by increasing " + LCONSOLE_ERROR(0x128, "Please correct by increasing " "'max_nodes' or 'max_procs_per_node'\n"); } diff --git a/lnet/klnds/qswlnd/qswlnd.c b/lnet/klnds/qswlnd/qswlnd.c index a8ecaca..79986c1 100644 --- a/lnet/klnds/qswlnd/qswlnd.c +++ b/lnet/klnds/qswlnd/qswlnd.c @@ -268,7 +268,7 @@ kqswnal_startup (lnet_ni_t *ni) if (*kqswnal_tunables.kqn_credits >= *kqswnal_tunables.kqn_ntxmsgs) { - LCONSOLE_ERROR("Configuration error: please set " + LCONSOLE_ERROR(0x12e, "Configuration error: please set " "ntxmsgs(%d) > credits(%d)\n", *kqswnal_tunables.kqn_ntxmsgs, *kqswnal_tunables.kqn_credits); diff --git a/lnet/klnds/ralnd/ralnd_cb.c b/lnet/klnds/ralnd/ralnd_cb.c index 969efd2..a1b09f0 100644 --- a/lnet/klnds/ralnd/ralnd_cb.c +++ b/lnet/klnds/ralnd/ralnd_cb.c @@ -766,7 +766,7 @@ kranal_eager_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, { kra_conn_t *conn = (kra_conn_t *)private; - LCONSOLE_ERROR("Dropping message from %s: no buffers free.\n", + LCONSOLE_ERROR(0x12b, "Dropping message from %s: no buffers free.\n", libcfs_nid2str(conn->rac_peer->rap_nid)); return -EDEADLK; diff --git a/lnet/klnds/socklnd/socklnd.c b/lnet/klnds/socklnd/socklnd.c index 8903f10..746ef08 100644 --- a/lnet/klnds/socklnd/socklnd.c +++ b/lnet/klnds/socklnd/socklnd.c @@ -965,7 +965,7 @@ ksocknal_accept (lnet_ni_t *ni, cfs_socket_t *sock) LIBCFS_ALLOC(cr, sizeof(*cr)); if (cr == NULL) { - LCONSOLE_ERROR("Dropping connection request from " + LCONSOLE_ERROR(0x12f, "Dropping connection request from " "%u.%u.%u.%u: memory exhausted\n", HIPQUAD(peer_ip)); return -ENOMEM; diff --git a/lnet/klnds/socklnd/socklnd_cb.c b/lnet/klnds/socklnd/socklnd_cb.c index dfd20b7..60635d4 100644 --- a/lnet/klnds/socklnd/socklnd_cb.c +++ b/lnet/klnds/socklnd/socklnd_cb.c @@ -2277,7 +2277,7 @@ ksocknal_recv_hello (lnet_ni_t *ni, ksock_conn_t *conn, *peerid = recv_id; } else if (peerid->pid != recv_id.pid || !lnet_ptlcompat_matchnid(peerid->nid, recv_id.nid)) { - LCONSOLE_ERROR("Connected successfully to %s on host " + LCONSOLE_ERROR(0x130, "Connected successfully to %s on host " "%u.%u.%u.%u, but they claimed they were " "%s; please check your Lustre " "configuration.\n", diff --git a/lnet/klnds/viblnd/viblnd_cb.c b/lnet/klnds/viblnd/viblnd_cb.c index 490a7e9..ebd5c2c 100644 --- a/lnet/klnds/viblnd/viblnd_cb.c +++ b/lnet/klnds/viblnd/viblnd_cb.c @@ -1679,10 +1679,10 @@ kibnal_eager_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, if (conn->ibc_version == IBNAL_MSG_VERSION_RDMAREPLYNOTRSRVD) { /* Can't block if RDMA completions need normal credits */ - LCONSOLE_ERROR("Dropping message from %s: no buffers free. " - "%s is running an old version of LNET that may " - "deadlock if messages wait for buffers)\n", - libcfs_nid2str(conn->ibc_peer->ibp_nid), + LCONSOLE_ERROR(0x129, "Dropping message from %s: no buffers " + " free. %s is running an old version of LNET " + "that may deadlock if messages wait for buffers)" + "\n", libcfs_nid2str(conn->ibc_peer->ibp_nid), libcfs_nid2str(conn->ibc_peer->ibp_nid)); return -EDEADLK; } diff --git a/lnet/libcfs/nidstrings.c b/lnet/libcfs/nidstrings.c index 78a255d..9514e1b 100644 --- a/lnet/libcfs/nidstrings.c +++ b/lnet/libcfs/nidstrings.c @@ -527,7 +527,7 @@ EXPORT_SYMBOL(libcfs_setnet0alias); void libcfs_setnet0alias(int lnd) { - LCONSOLE_ERROR("Liblustre cannot interoperate with old Portals.\n" - "portals_compatibility must be set to 'none'.\n"); + LCONSOLE_ERROR(0x125, "Liblustre cannot interoperate with old Portals." + "\nportals_compatibility must be set to 'none'.\n"); } #endif diff --git a/lnet/lnet/acceptor.c b/lnet/lnet/acceptor.c index cf38645..325c8b1 100644 --- a/lnet/lnet/acceptor.c +++ b/lnet/lnet/acceptor.c @@ -88,7 +88,7 @@ lnet_connect_console_error (int rc, lnet_nid_t peer_nid, HIPQUAD(peer_ip), peer_port); break; case -ECONNRESET: - LCONSOLE_ERROR("Connection to %s at host %u.%u.%u.%u on " + LCONSOLE_ERROR(0x11b, "Connection to %s at host %u.%u.%u.%u on " "port %d was reset: " "is it running a compatible version of Lustre " "and is %s one of its NIDs?\n", @@ -97,20 +97,20 @@ lnet_connect_console_error (int rc, lnet_nid_t peer_nid, libcfs_nid2str(peer_nid)); break; case -EPROTO: - LCONSOLE_ERROR("Protocol error connecting to %s at host " + LCONSOLE_ERROR(0x11c, "Protocol error connecting to %s at host " "%u.%u.%u.%u on port %d: " "is it running a compatible version of Lustre?\n", libcfs_nid2str(peer_nid), HIPQUAD(peer_ip), peer_port); break; case -EADDRINUSE: - LCONSOLE_ERROR("No privileged ports available to connect to " + LCONSOLE_ERROR(0x11d, "No privileged ports available to connect to " "%s at host %u.%u.%u.%u on port %d\n", libcfs_nid2str(peer_nid), HIPQUAD(peer_ip), peer_port); break; default: - LCONSOLE_ERROR("Unexpected error %d connecting to %s at " + LCONSOLE_ERROR(0x11e, "Unexpected error %d connecting to %s at " "host %u.%u.%u.%u on port %d\n", rc, libcfs_nid2str(peer_nid), HIPQUAD(peer_ip), peer_port); @@ -249,7 +249,7 @@ lnet_accept(lnet_ni_t *blind_ni, cfs_socket_t *sock, __u32 magic) else str = "unrecognised"; - LCONSOLE_ERROR("Refusing connection from %u.%u.%u.%u magic %08x: " + LCONSOLE_ERROR(0x11f, "Refusing connection from %u.%u.%u.%u magic %08x: " " %s acceptor protocol\n", HIPQUAD(peer_ip), magic, str); return -EPROTO; @@ -308,7 +308,7 @@ lnet_accept(lnet_ni_t *blind_ni, cfs_socket_t *sock, __u32 magic) ni->ni_nid != cr.acr_nid) { /* right NET, wrong NID! */ if (ni != NULL) lnet_ni_decref(ni); - LCONSOLE_ERROR("Refusing connection from %u.%u.%u.%u for %s: " + LCONSOLE_ERROR(0x120, "Refusing connection from %u.%u.%u.%u for %s: " " No matching NI\n", HIPQUAD(peer_ip), libcfs_nid2str(cr.acr_nid)); return -EPERM; @@ -317,7 +317,7 @@ lnet_accept(lnet_ni_t *blind_ni, cfs_socket_t *sock, __u32 magic) if (ni->ni_lnd->lnd_accept == NULL) { /* This catches a request for the loopback LND */ lnet_ni_decref(ni); - LCONSOLE_ERROR("Refusing connection from %u.%u.%u.%u for %s: " + LCONSOLE_ERROR(0x121, "Refusing connection from %u.%u.%u.%u for %s: " " NI doesn not accept IP connections\n", HIPQUAD(peer_ip), libcfs_nid2str(cr.acr_nid)); return -EPERM; @@ -377,11 +377,11 @@ lnet_acceptor(void *arg) 0, accept_port, accept_backlog); if (rc != 0) { if (rc == -EADDRINUSE) - LCONSOLE_ERROR("Can't start acceptor on port %d: " + LCONSOLE_ERROR(0x122, "Can't start acceptor on port %d: " "port already in use\n", accept_port); else - LCONSOLE_ERROR("Can't start acceptor on port %d: " + LCONSOLE_ERROR(0x123, "Can't start acceptor on port %d: " "unexpected error %d\n", accept_port, rc); @@ -482,7 +482,7 @@ lnet_acceptor_start(void) } else if (!strcmp(accept, "none")) { return 0; } else { - LCONSOLE_ERROR ("Can't parse 'accept=\"%s\"'\n", + LCONSOLE_ERROR (0x124, "Can't parse 'accept=\"%s\"'\n", accept); return -EINVAL; } diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index a071d39..adb4ef1 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -61,8 +61,8 @@ lnet_get_networks(void) int rc; if (*networks != 0 && *ip2nets != 0) { - LCONSOLE_ERROR("Please specify EITHER 'networks' or 'ip2nets'" - " but not both at once\n"); + LCONSOLE_ERROR(0x101, "Please specify EITHER 'networks' or " + "'ip2nets' but not both at once\n"); return NULL; } @@ -94,7 +94,7 @@ lnet_get_portals_compatibility(void) LCONSOLE_WARN("Starting in strong portals-compatible mode\n"); } - LCONSOLE_ERROR("portals_compatibility=\"%s\" not supported\n", + LCONSOLE_ERROR(0x102, "portals_compatibility=\"%s\" not supported\n", portals_compatibility); return -EINVAL; } @@ -138,7 +138,7 @@ lnet_get_networks (void) #ifdef NOT_YET if (networks != NULL && ip2nets != NULL) { - LCONSOLE_ERROR("Please set EITHER 'LNET_NETWORKS' or " + LCONSOLE_ERROR(0x103, "Please set EITHER 'LNET_NETWORKS' or " "'LNET_IP2NETS' but not both at once\n"); return NULL; } @@ -1002,9 +1002,9 @@ lnet_startup_lndnis (void) libcfs_lnd2str(lnd_type), libcfs_lnd2modname(lnd_type), rc); #ifndef CONFIG_KMOD - LCONSOLE_ERROR("Your kernel must be compiled " - "with CONFIG_KMOD set for " - "automatic module loading."); + LCONSOLE_ERROR(0x104, "Your kernel must be " + "compiled with CONFIG_KMOD set for " + "automatic module loading."); #endif goto failed; } @@ -1031,7 +1031,7 @@ lnet_startup_lndnis (void) LNET_MUTEX_UP(&the_lnet.ln_lnd_mutex); if (rc != 0) { - LCONSOLE_ERROR("Error %d starting up LNI %s\n", + LCONSOLE_ERROR(0x105, "Error %d starting up LNI %s\n", rc, libcfs_lnd2str(lnd->lnd_type)); LNET_LOCK(); lnd->lnd_refcount--; @@ -1060,7 +1060,7 @@ lnet_startup_lndnis (void) } } else { # ifndef HAVE_LIBPTHREAD - LCONSOLE_ERROR("LND %s not supported in a " + LCONSOLE_ERROR(0x106, "LND %s not supported in a " "single-threaded runtime\n", libcfs_lnd2str(lnd_type)); goto failed; @@ -1069,7 +1069,7 @@ lnet_startup_lndnis (void) #endif if (ni->ni_peertxcredits == 0 || ni->ni_maxtxcredits == 0) { - LCONSOLE_ERROR("LNI %s has no %scredits\n", + LCONSOLE_ERROR(0x107, "LNI %s has no %scredits\n", libcfs_lnd2str(lnd->lnd_type), ni->ni_peertxcredits == 0 ? "" : "per-peer "); @@ -1085,8 +1085,8 @@ lnet_startup_lndnis (void) /* Handle nidstrings for network 0 just like this one */ if (the_lnet.ln_ptlcompat > 0) { if (nicount > 0) { - LCONSOLE_ERROR("Can't run > 1 network when " - "portals_compatibility is set\n"); + LCONSOLE_ERROR(0x108, "Can't run > 1 network " + "when portals_compatibility is set\n"); goto failed; } libcfs_setnet0alias(lnd->lnd_type); @@ -1097,7 +1097,7 @@ lnet_startup_lndnis (void) if (the_lnet.ln_eqwaitni != NULL && nicount > 1) { lnd_type = the_lnet.ln_eqwaitni->ni_lnd->lnd_type; - LCONSOLE_ERROR("LND %s can only run single-network\n", + LCONSOLE_ERROR(0x109, "LND %s can only run single-network\n", libcfs_lnd2str(lnd_type)); goto failed; } diff --git a/lnet/lnet/config.c b/lnet/lnet/config.c index cd5e211..7c1466c 100644 --- a/lnet/lnet/config.c +++ b/lnet/lnet/config.c @@ -52,8 +52,8 @@ lnet_syntax(char *name, char *str, int offset, int width) memset(dashes, '-', sizeof(dashes)); dashes[sizeof(dashes)-1] = 0; - LCONSOLE_ERROR("Error parsing '%s=\"%s\"'\n", name, str); - LCONSOLE_ERROR("here...........%.*s..%.*s|%.*s|\n", + LCONSOLE_ERROR(0x10f, "Error parsing '%s=\"%s\"'\n", name, str); + LCONSOLE_ERROR(0x110, "here...........%.*s..%.*s|%.*s|\n", (int)strlen(name), dots, offset, dots, (width < 1) ? 0 : width - 1, dashes); } @@ -126,7 +126,7 @@ lnet_new_ni(__u32 net, struct list_head *nilist) lnet_ni_t *ni; if (!lnet_net_unique(net, nilist)) { - LCONSOLE_ERROR("Duplicate network specified: %s\n", + LCONSOLE_ERROR(0x111, "Duplicate network specified: %s\n", libcfs_net2str(net)); return NULL; } @@ -161,7 +161,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) if (strlen(networks) > LNET_SINGLE_TEXTBUF_NOB) { /* _WAY_ conservative */ - LCONSOLE_ERROR("Can't parse networks: string too long\n"); + LCONSOLE_ERROR(0x112, "Can't parse networks: string too long\n"); return -EINVAL; } @@ -202,7 +202,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) if (net == LNET_NIDNET(LNET_NID_ANY)) { lnet_syntax("networks", networks, str - tokens, strlen(str)); - LCONSOLE_ERROR("Unrecognised network type\n"); + LCONSOLE_ERROR(0x113, "Unrecognised network type\n"); goto failed; } @@ -224,7 +224,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) if (nnets > 0 && the_lnet.ln_ptlcompat > 0) { - LCONSOLE_ERROR("Only 1 network supported when " + LCONSOLE_ERROR(0x114, "Only 1 network supported when " "'portals_compatible' is set\n"); goto failed; } @@ -258,7 +258,7 @@ lnet_parse_networks(struct list_head *nilist, char *networks) } if (niface == LNET_MAX_INTERFACES) { - LCONSOLE_ERROR("Too many interfaces for net %s\n", + LCONSOLE_ERROR(0x115, "Too many interfaces for net %s\n", libcfs_net2str(net)); goto failed; } @@ -713,7 +713,7 @@ lnet_parse_routes (char *routes, int *im_a_router) if (the_lnet.ln_ptlcompat > 0 && routes[0] != 0) { /* Can't route when running in compatibility mode */ - LCONSOLE_ERROR("Route tables are not supported when " + LCONSOLE_ERROR(0x116, "Route tables are not supported when " "'portals_compatible' is set\n"); return -EINVAL; } @@ -1276,13 +1276,13 @@ lnet_parse_ip2nets (char **networksp, char *ip2nets) int rc; if (nip < 0) { - LCONSOLE_ERROR("Error %d enumerating local IP interfaces " + LCONSOLE_ERROR(0x117, "Error %d enumerating local IP interfaces " "for ip2nets to match\n", nip); return nip; } if (nip == 0) { - LCONSOLE_ERROR("No local IP interfaces " + LCONSOLE_ERROR(0x118, "No local IP interfaces " "for ip2nets to match\n"); return -ENOENT; } @@ -1291,12 +1291,12 @@ lnet_parse_ip2nets (char **networksp, char *ip2nets) lnet_ipaddr_free_enumeration(ipaddrs, nip); if (rc < 0) { - LCONSOLE_ERROR("Error %d parsing ip2nets\n", rc); + LCONSOLE_ERROR(0x119, "Error %d parsing ip2nets\n", rc); return rc; } if (rc == 0) { - LCONSOLE_ERROR("ip2nets does not match " + LCONSOLE_ERROR(0x11a, "ip2nets does not match " "any local IP interfaces\n"); return -ENOENT; } diff --git a/lnet/lnet/router.c b/lnet/lnet/router.c index 7d3e66e..0cf26d8 100644 --- a/lnet/lnet/router.c +++ b/lnet/lnet/router.c @@ -782,7 +782,7 @@ lnet_router_checker_start(void) if (check_routers_before_use && dead_router_check_interval <= 0) { - LCONSOLE_ERROR("'dead_router_check_interval' must be set if " + LCONSOLE_ERROR(0x10a, "'dead_router_check_interval' must be set if " "'check_routers_before_use' is set\n"); return -EINVAL; } @@ -981,13 +981,13 @@ lnet_alloc_rtrpools(int im_a_router) } else if (!strcmp(forwarding, "enabled")) { /* explicitly enabled */ } else { - LCONSOLE_ERROR("'forwarding' not set to either " + LCONSOLE_ERROR(0x10b, "'forwarding' not set to either " "'enabled' or 'disabled'\n"); return -EINVAL; } if (tiny_router_buffers <= 0) { - LCONSOLE_ERROR("tiny_router_buffers=%d invalid when " + LCONSOLE_ERROR(0x10c, "tiny_router_buffers=%d invalid when " "routing enabled\n", tiny_router_buffers); rc = -EINVAL; goto failed; @@ -999,7 +999,7 @@ lnet_alloc_rtrpools(int im_a_router) goto failed; if (small_router_buffers <= 0) { - LCONSOLE_ERROR("small_router_buffers=%d invalid when " + LCONSOLE_ERROR(0x10d, "small_router_buffers=%d invalid when " "routing enabled\n", small_router_buffers); rc = -EINVAL; goto failed; @@ -1011,7 +1011,7 @@ lnet_alloc_rtrpools(int im_a_router) goto failed; if (large_router_buffers <= 0) { - LCONSOLE_ERROR("large_router_buffers=%d invalid when " + LCONSOLE_ERROR(0x10e, "large_router_buffers=%d invalid when " "routing enabled\n", large_router_buffers); rc = -EINVAL; goto failed; -- 1.8.3.1