xen: use maximum reservation to limit amount of usable RAM
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / tile / include / hv / netio_errors.h
blobe1591bff61b5ce7600349f40d800633954d62e23
1 /*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
15 /**
16 * Error codes returned from NetIO routines.
19 #ifndef __NETIO_ERRORS_H__
20 #define __NETIO_ERRORS_H__
22 /**
23 * @addtogroup error
25 * @brief The error codes returned by NetIO functions.
27 * NetIO functions return 0 (defined as ::NETIO_NO_ERROR) on success, and
28 * a negative value if an error occurs.
30 * In cases where a NetIO function failed due to a error reported by
31 * system libraries, the error code will be the negation of the
32 * system errno at the time of failure. The @ref netio_strerror()
33 * function will deliver error strings for both NetIO and system error
34 * codes.
36 * @{
39 /** The set of all NetIO errors. */
40 typedef enum
42 /** Operation successfully completed. */
43 NETIO_NO_ERROR = 0,
45 /** A packet was successfully retrieved from an input queue. */
46 NETIO_PKT = 0,
48 /** Largest NetIO error number. */
49 NETIO_ERR_MAX = -701,
51 /** The tile is not registered with the IPP. */
52 NETIO_NOT_REGISTERED = -701,
54 /** No packet was available to retrieve from the input queue. */
55 NETIO_NOPKT = -702,
57 /** The requested function is not implemented. */
58 NETIO_NOT_IMPLEMENTED = -703,
60 /** On a registration operation, the target queue already has the maximum
61 * number of tiles registered for it, and no more may be added. On a
62 * packet send operation, the output queue is full and nothing more can
63 * be queued until some of the queued packets are actually transmitted. */
64 NETIO_QUEUE_FULL = -704,
66 /** The calling process or thread is not bound to exactly one CPU. */
67 NETIO_BAD_AFFINITY = -705,
69 /** Cannot allocate memory on requested controllers. */
70 NETIO_CANNOT_HOME = -706,
72 /** On a registration operation, the IPP specified is not configured
73 * to support the options requested; for instance, the application
74 * wants a specific type of tagged headers which the configured IPP
75 * doesn't support. Or, the supplied configuration information is
76 * not self-consistent, or is out of range; for instance, specifying
77 * both NETIO_RECV and NETIO_NO_RECV, or asking for more than
78 * NETIO_MAX_SEND_BUFFERS to be preallocated. On a VLAN or bucket
79 * configure operation, the number of items, or the base item, was
80 * out of range.
82 NETIO_BAD_CONFIG = -707,
84 /** Too many tiles have registered to transmit packets. */
85 NETIO_TOOMANY_XMIT = -708,
87 /** Packet transmission was attempted on a queue which was registered
88 with transmit disabled. */
89 NETIO_UNREG_XMIT = -709,
91 /** This tile is already registered with the IPP. */
92 NETIO_ALREADY_REGISTERED = -710,
94 /** The Ethernet link is down. The application should try again later. */
95 NETIO_LINK_DOWN = -711,
97 /** An invalid memory buffer has been specified. This may be an unmapped
98 * virtual address, or one which does not meet alignment requirements.
99 * For netio_input_register(), this error may be returned when multiple
100 * processes specify different memory regions to be used for NetIO
101 * buffers. That can happen if these processes specify explicit memory
102 * regions with the ::NETIO_FIXED_BUFFER_VA flag, or if tmc_cmem_init()
103 * has not been called by a common ancestor of the processes.
105 NETIO_FAULT = -712,
107 /** Cannot combine user-managed shared memory and cache coherence. */
108 NETIO_BAD_CACHE_CONFIG = -713,
110 /** Smallest NetIO error number. */
111 NETIO_ERR_MIN = -713,
113 #ifndef __DOXYGEN__
114 /** Used internally to mean that no response is needed; never returned to
115 * an application. */
116 NETIO_NO_RESPONSE = 1
117 #endif
118 } netio_error_t;
120 /** @} */
122 #endif /* __NETIO_ERRORS_H__ */