Path: blob/master/arch/tile/include/hv/netio_errors.h
10819 views
/*1* Copyright 2010 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*/1314/**15* Error codes returned from NetIO routines.16*/1718#ifndef __NETIO_ERRORS_H__19#define __NETIO_ERRORS_H__2021/**22* @addtogroup error23*24* @brief The error codes returned by NetIO functions.25*26* NetIO functions return 0 (defined as ::NETIO_NO_ERROR) on success, and27* a negative value if an error occurs.28*29* In cases where a NetIO function failed due to a error reported by30* system libraries, the error code will be the negation of the31* system errno at the time of failure. The @ref netio_strerror()32* function will deliver error strings for both NetIO and system error33* codes.34*35* @{36*/3738/** The set of all NetIO errors. */39typedef enum40{41/** Operation successfully completed. */42NETIO_NO_ERROR = 0,4344/** A packet was successfully retrieved from an input queue. */45NETIO_PKT = 0,4647/** Largest NetIO error number. */48NETIO_ERR_MAX = -701,4950/** The tile is not registered with the IPP. */51NETIO_NOT_REGISTERED = -701,5253/** No packet was available to retrieve from the input queue. */54NETIO_NOPKT = -702,5556/** The requested function is not implemented. */57NETIO_NOT_IMPLEMENTED = -703,5859/** On a registration operation, the target queue already has the maximum60* number of tiles registered for it, and no more may be added. On a61* packet send operation, the output queue is full and nothing more can62* be queued until some of the queued packets are actually transmitted. */63NETIO_QUEUE_FULL = -704,6465/** The calling process or thread is not bound to exactly one CPU. */66NETIO_BAD_AFFINITY = -705,6768/** Cannot allocate memory on requested controllers. */69NETIO_CANNOT_HOME = -706,7071/** On a registration operation, the IPP specified is not configured72* to support the options requested; for instance, the application73* wants a specific type of tagged headers which the configured IPP74* doesn't support. Or, the supplied configuration information is75* not self-consistent, or is out of range; for instance, specifying76* both NETIO_RECV and NETIO_NO_RECV, or asking for more than77* NETIO_MAX_SEND_BUFFERS to be preallocated. On a VLAN or bucket78* configure operation, the number of items, or the base item, was79* out of range.80*/81NETIO_BAD_CONFIG = -707,8283/** Too many tiles have registered to transmit packets. */84NETIO_TOOMANY_XMIT = -708,8586/** Packet transmission was attempted on a queue which was registered87with transmit disabled. */88NETIO_UNREG_XMIT = -709,8990/** This tile is already registered with the IPP. */91NETIO_ALREADY_REGISTERED = -710,9293/** The Ethernet link is down. The application should try again later. */94NETIO_LINK_DOWN = -711,9596/** An invalid memory buffer has been specified. This may be an unmapped97* virtual address, or one which does not meet alignment requirements.98* For netio_input_register(), this error may be returned when multiple99* processes specify different memory regions to be used for NetIO100* buffers. That can happen if these processes specify explicit memory101* regions with the ::NETIO_FIXED_BUFFER_VA flag, or if tmc_cmem_init()102* has not been called by a common ancestor of the processes.103*/104NETIO_FAULT = -712,105106/** Cannot combine user-managed shared memory and cache coherence. */107NETIO_BAD_CACHE_CONFIG = -713,108109/** Smallest NetIO error number. */110NETIO_ERR_MIN = -713,111112#ifndef __DOXYGEN__113/** Used internally to mean that no response is needed; never returned to114* an application. */115NETIO_NO_RESPONSE = 1116#endif117} netio_error_t;118119/** @} */120121#endif /* __NETIO_ERRORS_H__ */122123124