|
Packit Service |
155747 |
/*
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
This file is provided under a dual BSD/GPLv2 license. When using or
|
|
Packit Service |
155747 |
redistributing this file, you may do so under either license.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
GPL LICENSE SUMMARY
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
Copyright(c) 2015 Intel Corporation.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
This program is free software; you can redistribute it and/or modify
|
|
Packit Service |
155747 |
it under the terms of version 2 of the GNU General Public License as
|
|
Packit Service |
155747 |
published by the Free Software Foundation.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
This program is distributed in the hope that it will be useful, but
|
|
Packit Service |
155747 |
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
155747 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
155747 |
General Public License for more details.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
Contact Information:
|
|
Packit Service |
155747 |
Intel Corporation, www.intel.com
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
BSD LICENSE
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
Copyright(c) 2015 Intel Corporation.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
155747 |
modification, are permitted provided that the following conditions
|
|
Packit Service |
155747 |
are met:
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
* Redistributions of source code must retain the above copyright
|
|
Packit Service |
155747 |
notice, this list of conditions and the following disclaimer.
|
|
Packit Service |
155747 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit Service |
155747 |
notice, this list of conditions and the following disclaimer in
|
|
Packit Service |
155747 |
the documentation and/or other materials provided with the
|
|
Packit Service |
155747 |
distribution.
|
|
Packit Service |
155747 |
* Neither the name of Intel Corporation nor the names of its
|
|
Packit Service |
155747 |
contributors may be used to endorse or promote products derived
|
|
Packit Service |
155747 |
from this software without specific prior written permission.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit Service |
155747 |
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit Service |
155747 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
Packit Service |
155747 |
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
Packit Service |
155747 |
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
Packit Service |
155747 |
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
Packit Service |
155747 |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
Packit Service |
155747 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
Packit Service |
155747 |
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
Packit Service |
155747 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit Service |
155747 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
*/
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Copyright (c) 2003-2014 Intel Corporation. All rights reserved. */
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
#include "psm_user.h"
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
#define PSMI_NOLOG -1
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
struct psm2_error_token {
|
|
Packit Service |
155747 |
psm2_ep_t ep;
|
|
Packit Service |
155747 |
psm2_error_t error;
|
|
Packit Service |
155747 |
char err_string[PSM2_ERRSTRING_MAXLEN];
|
|
Packit Service |
155747 |
};
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
static
|
|
Packit Service |
155747 |
psm2_error_t
|
|
Packit Service |
155747 |
psmi_errhandler_noop(psm2_ep_t ep, const psm2_error_t err,
|
|
Packit Service |
155747 |
const char *error_string, psm2_error_token_t token)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
return err;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
static
|
|
Packit Service |
155747 |
psm2_error_t
|
|
Packit Service |
155747 |
psmi_errhandler_psm(psm2_ep_t ep,
|
|
Packit Service |
155747 |
const psm2_error_t err,
|
|
Packit Service |
155747 |
const char *error_string, psm2_error_token_t token)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
/* we want the error to be seen through ssh, etc., so we flush and then
|
|
Packit Service |
155747 |
* sleep a bit. Not perfect, but not doing so means it almost never
|
|
Packit Service |
155747 |
* gets seen. */
|
|
Packit Service |
155747 |
fprintf(stderr, "%s%s\n", hfi_get_mylabel(), token->err_string);
|
|
Packit Service |
155747 |
fflush(stdout);
|
|
Packit Service |
155747 |
fflush(stderr);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* XXX Eventually, this will hook up to a connection manager, and we'll
|
|
Packit Service |
155747 |
* issue an upcall into the connection manager at shutdown time */
|
|
Packit Service |
155747 |
sleep(3);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* We use this "special" ep internally to handle internal errors that are
|
|
Packit Service |
155747 |
* triggered from within code that is not expected to return to the user.
|
|
Packit Service |
155747 |
* Errors of this sort on not expected to be handled by users and always
|
|
Packit Service |
155747 |
* mean we have an internal PSM bug. */
|
|
Packit Service |
155747 |
if (err == PSM2_INTERNAL_ERR)
|
|
Packit Service |
155747 |
abort();
|
|
Packit Service |
155747 |
else
|
|
Packit Service |
155747 |
exit(-1);
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
psm2_ep_errhandler_t psmi_errhandler_global = psmi_errhandler_noop;
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
psm2_error_t __psm2_error_defer(psm2_error_token_t token)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
psm2_error_t rv;
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("entering");
|
|
Packit Service |
155747 |
rv = psmi_errhandler_psm(token->ep, token->error, token->err_string,
|
|
Packit Service |
155747 |
token);
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("leaving");
|
|
Packit Service |
155747 |
return rv;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
PSMI_API_DECL(psm2_error_defer)
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
psm2_error_t
|
|
Packit Service |
155747 |
__psm2_error_register_handler(psm2_ep_t ep, const psm2_ep_errhandler_t errhandler)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
psm2_ep_errhandler_t *errh;
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("entering");
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
if (ep == NULL)
|
|
Packit Service |
155747 |
errh = &psmi_errhandler_global;
|
|
Packit Service |
155747 |
else
|
|
Packit Service |
155747 |
errh = &ep->errh;
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
if (errhandler == PSM2_ERRHANDLER_PSM_HANDLER)
|
|
Packit Service |
155747 |
*errh = psmi_errhandler_psm;
|
|
Packit Service |
155747 |
else if (errhandler == PSM2_ERRHANDLER_NO_HANDLER)
|
|
Packit Service |
155747 |
*errh = psmi_errhandler_noop;
|
|
Packit Service |
155747 |
else
|
|
Packit Service |
155747 |
*errh = errhandler;
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("leaving");
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
return PSM2_OK;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
PSMI_API_DECL(psm2_error_register_handler)
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
psm2_error_t
|
|
Packit Service |
155747 |
MOCKABLE (psmi_handle_error)(psm2_ep_t ep, psm2_error_t error, const char *buf, ...)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
va_list argptr;
|
|
Packit Service |
155747 |
int syslog_level;
|
|
Packit Service |
155747 |
int console_print = 0;
|
|
Packit Service |
155747 |
psm2_error_t newerr;
|
|
Packit Service |
155747 |
struct psm2_error_token token;
|
|
Packit Service |
155747 |
char *c, fullmsg[PSM2_ERRSTRING_MAXLEN];
|
|
Packit Service |
155747 |
token.error = error;
|
|
Packit Service |
155747 |
snprintf(fullmsg, PSM2_ERRSTRING_MAXLEN - 1, "%s", buf);
|
|
Packit Service |
155747 |
fullmsg[PSM2_ERRSTRING_MAXLEN - 1] = '\0';
|
|
Packit Service |
155747 |
va_start(argptr, buf);
|
|
Packit Service |
155747 |
vsnprintf(token.err_string, PSM2_ERRSTRING_MAXLEN - 1, fullmsg, argptr);
|
|
Packit Service |
155747 |
va_end(argptr);
|
|
Packit Service |
155747 |
token.err_string[PSM2_ERRSTRING_MAXLEN - 1] = '\0';
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Unless the user has set PSM2_NO_VERBOSE_ERRORS, always print errors to
|
|
Packit Service |
155747 |
* console */
|
|
Packit Service |
155747 |
c = getenv("PSM2_NO_VERBOSE_ERRORS");
|
|
Packit Service |
155747 |
console_print = 0;
|
|
Packit Service |
155747 |
if (ep == PSMI_EP_LOGEVENT)
|
|
Packit Service |
155747 |
console_print = 1;
|
|
Packit Service |
155747 |
else if (!c || *c == '\0') { /* no desire to prevent verbose errors */
|
|
Packit Service |
155747 |
/* Remove the console print if we're internally handling the error */
|
|
Packit Service |
155747 |
if (ep == PSMI_EP_NORETURN)
|
|
Packit Service |
155747 |
console_print = 0;
|
|
Packit Service |
155747 |
else if (ep == NULL
|
|
Packit Service |
155747 |
&& psmi_errhandler_global != psmi_errhandler_psm)
|
|
Packit Service |
155747 |
console_print = 1;
|
|
Packit Service |
155747 |
else if (ep != NULL && ep->errh != psmi_errhandler_psm)
|
|
Packit Service |
155747 |
console_print = 1;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Before we let the user even handle the error, send to syslog */
|
|
Packit Service |
155747 |
syslog_level = psmi_error_syslog_level(error);
|
|
Packit Service |
155747 |
if (syslog_level != PSMI_NOLOG || ep == PSMI_EP_LOGEVENT)
|
|
Packit Service |
155747 |
psmi_syslog(ep, console_print,
|
|
Packit Service |
155747 |
ep == PSMI_EP_LOGEVENT ? LOG_NOTICE : syslog_level,
|
|
Packit Service |
155747 |
"%s (err=%d)", token.err_string, error);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
if (ep == PSMI_EP_LOGEVENT) /* we're just logging */
|
|
Packit Service |
155747 |
newerr = PSM2_OK;
|
|
Packit Service |
155747 |
else if (ep == PSMI_EP_NORETURN)
|
|
Packit Service |
155747 |
newerr =
|
|
Packit Service |
155747 |
psmi_errhandler_psm(NULL, error, token.err_string, &token);
|
|
Packit Service |
155747 |
else if (ep == NULL)
|
|
Packit Service |
155747 |
newerr =
|
|
Packit Service |
155747 |
psmi_errhandler_global(NULL, error, token.err_string,
|
|
Packit Service |
155747 |
&token);
|
|
Packit Service |
155747 |
else
|
|
Packit Service |
155747 |
newerr = ep->errh(ep, error, token.err_string, &token);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
return newerr;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
MOCK_DEF_EPILOGUE(psmi_handle_error);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Returns the "worst" error out of errA and errB */
|
|
Packit Service |
155747 |
psm2_error_t psmi_error_cmp(psm2_error_t errA, psm2_error_t errB)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
#define _PSMI_ERR_IS(err) if (errA == (err) || errB == (err)) return (err)
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Bad runtime or before initialization */
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_NO_MEMORY);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_INTERNAL_ERR);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_INIT_NOT_INIT);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_INIT_BAD_API_VERSION);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Before we cget an endpoint */
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_NO_DEVICE);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_UNIT_NOT_FOUND);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_DEVICE_FAILURE);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_NO_PORTS_AVAIL);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_TOO_MANY_ENDPOINTS);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* As we open/close the endpoint */
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_NO_NETWORK);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_SHMEM_SEGMENT_ERR);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_CLOSE_TIMEOUT);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_INVALID_UUID_KEY);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EP_NO_RESOURCES);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* In connect phase */
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_NETWORK_ERROR);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_NODE);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_CONNECT);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_PKEY);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_VERSION);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_UUID_KEY);
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_EPID_INVALID_MTU);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Timeout if nothing else */
|
|
Packit Service |
155747 |
_PSMI_ERR_IS(PSM2_TIMEOUT);
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
/* Last resort */
|
|
Packit Service |
155747 |
return max(errA, errB);
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
struct psmi_error_item {
|
|
Packit Service |
155747 |
int syslog_level;
|
|
Packit Service |
155747 |
const char *error_string;
|
|
Packit Service |
155747 |
};
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
static
|
|
Packit Service |
155747 |
struct psmi_error_item psmi_error_items[] = {
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Success"}, /* PSM2_OK = 0, */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "No events were progressed in psm_poll"}, /* PSM2_OK_NO_PROGRESS = 1 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 2"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Error in a function parameter"}, /* PSM2_PARAM_ERR = 3 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "Ran out of memory"}, /* PSM2_NO_MEMORY = 4 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "PSM has not been initialized by psm2_init"}, /* PSM2_INIT_NOT_INIT = 5 */
|
|
Packit Service |
155747 |
{LOG_INFO, "API version passed in psm2_init is incompatible"}, /* PSM2_INIT_BAD_API_VERSION = 6 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "PSM Could not set affinity"}, /* PSM2_NO_AFFINITY = 7 */
|
|
Packit Service |
155747 |
{LOG_ALERT, "PSM Unresolved internal error"}, /* PSM2_INTERNAL_ERR = 8 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "PSM could not set up shared memory segment"}, /* PSM2_SHMEM_SEGMENT_ERR = 9 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "PSM option is a read-only option"}, /* PSM2_OPT_READONLY = 10 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Operation timed out"}, /* PSM2_TIMEOUT = 11 */
|
|
Packit Service |
155747 |
{LOG_INFO, "Exceeded supported amount of endpoints"},
|
|
Packit Service |
155747 |
/* PSM2_TOO_MANY_ENDPOINTS = 12 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "PSM is in the finalized state"}, /* PSM2_IS_FINALIZED = 13 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 14"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 15"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 16"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 17"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 18"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 19"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Endpoint was closed"}, /* PSM2_EP_WAS_CLOSED = 20 */
|
|
Packit Service |
155747 |
{LOG_ALERT, "PSM Could not find an OPA Unit"}, /* PSM2_EP_NO_DEVICE = 21 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "User passed a bad unit number"}, /* PSM2_EP_UNIT_NOT_FOUND = 22 */
|
|
Packit Service |
155747 |
{LOG_ALERT, "Failure in initializing endpoint"}, /* PSM2_EP_DEVICE_FAILURE = 23 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Error closing the endpoing error"}, /* PSM2_EP_CLOSE_TIMEOUT = 24 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "No free contexts could be obtained"}, /* PSM2_EP_NO_PORTS_AVAIL = 25 */
|
|
Packit Service |
155747 |
{LOG_ALERT, "Could not detect network connectivity"}, /* PSM2_EP_NO_NETWORK = 26 */
|
|
Packit Service |
155747 |
{LOG_INFO, "Invalid Unique job-wide UUID Key"}, /* PSM2_EP_INVALID_UUID_KEY = 27 */
|
|
Packit Service |
155747 |
{LOG_INFO, "Out of endpoint resources"}, /* PSM2_EP_NO_RESOURCES = 28 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 29"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 30"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 31"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 32"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 33"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 34"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 35"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 36"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 37"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 38"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 39"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Unknown/unresolved connection status (other errors occurred)"}, /* PSM2_EPID_UNKNOWN = 40 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Endpoint could not be reached"}, /* PSM2_EPID_UNREACHABLE = 41 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 42"},
|
|
Packit Service |
155747 |
{LOG_CRIT, "Invalid node (mismatch in bit width 32/64 or byte order)"}, /* PSM2_EPID_INVALID_NODE = 43 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "Invalid MTU"}, /* PSM2_EPID_INVALID_MTU = 44 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "UUID key mismatch"}, /* PSM2_EPID_INVALID_UUID_KEY = 45 */
|
|
Packit Service |
155747 |
{LOG_ERR, "Incompatible PSM version"}, /* PSM2_EPID_INVALID_VERSION = 46 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "Connect received garbled connection information"}, /* PSM2_EPID_INVALID_CONNECT = 47 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Endpoint was already connected"}, /* PSM2_EPID_ALREADY_CONNECTED = 48 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "Two or more endpoints have the same network id (LID)"}, /* PSM2_EPID_NETWORK_ERROR = 49 */
|
|
Packit Service |
155747 |
{LOG_CRIT, "Endpoint provided incompatible Partition Key"},
|
|
Packit Service |
155747 |
{LOG_CRIT, "Unable to resolve network path. Is the SM running?"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 52"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 53"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 54"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 55"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 56"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 57"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 58"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 59"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "MQ Non-blocking request is incomplete"}, /* PSM2_MQ_NO_COMPLETIONS = 60 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "MQ Message has been truncated at the receiver"}, /* PSM2_MQ_TRUNCATION = 61 */
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 62"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 63"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 64"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 65"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 66"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 67"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 68"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 69"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "Invalid AM reply"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 71"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 72"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 73"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 74"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 75"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 76"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 77"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 78"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 79"},
|
|
Packit Service |
155747 |
{PSMI_NOLOG, "unknown 80"},
|
|
Packit Service |
155747 |
};
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
const char *__psm2_error_get_string(psm2_error_t error)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("entering");
|
|
Packit Service |
155747 |
if (error >= PSM2_ERROR_LAST) {
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("leaving");
|
|
Packit Service |
155747 |
return "unknown";
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
else {
|
|
Packit Service |
155747 |
PSM2_LOG_MSG("leaving");
|
|
Packit Service |
155747 |
return psmi_error_items[error].error_string;
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
}
|
|
Packit Service |
155747 |
PSMI_API_DECL(psm2_error_get_string)
|
|
Packit Service |
155747 |
|
|
Packit Service |
155747 |
int psmi_error_syslog_level(psm2_error_t error)
|
|
Packit Service |
155747 |
{
|
|
Packit Service |
155747 |
if (error >= PSM2_ERROR_LAST)
|
|
Packit Service |
155747 |
return PSMI_NOLOG;
|
|
Packit Service |
155747 |
else
|
|
Packit Service |
155747 |
return psmi_error_items[error].syslog_level;
|
|
Packit Service |
155747 |
}
|