remove version in all files
[dpdk.git] / lib / librte_eal / common / include / eal_private.h
1 /*-
2  *   BSD LICENSE
3  * 
4  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
5  *   All rights reserved.
6  * 
7  *   Redistribution and use in source and binary forms, with or without 
8  *   modification, are permitted provided that the following conditions 
9  *   are met:
10  * 
11  *     * Redistributions of source code must retain the above copyright 
12  *       notice, this list of conditions and the following disclaimer.
13  *     * Redistributions in binary form must reproduce the above copyright 
14  *       notice, this list of conditions and the following disclaimer in 
15  *       the documentation and/or other materials provided with the 
16  *       distribution.
17  *     * Neither the name of Intel Corporation nor the names of its 
18  *       contributors may be used to endorse or promote products derived 
19  *       from this software without specific prior written permission.
20  * 
21  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
22  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
23  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
24  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
25  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
26  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
27  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
28  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
29  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
30  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
31  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  * 
33  */
34
35 #ifndef _EAL_PRIVATE_H_
36 #define _EAL_PRIVATE_H_
37
38 /**
39  * Initialize the memzone subsystem (private to eal).
40  *
41  * @return
42  *   - 0 on success
43  *   - Negative on error
44  */
45 int rte_eal_memzone_init(void);
46
47 /**
48  * Common log initialization function (private to eal).
49  *
50  * Called by environment-specific log initialization function to initialize
51  * log history.
52  *
53  * @param default_log
54  *   The default log stream to be used.
55  * @return
56  *   - 0 on success
57  *   - Negative on error
58  */
59 int rte_eal_common_log_init(FILE *default_log);
60
61 /**
62  * Fill configuration with number of physical and logical processors
63  *
64  * This function is private to EAL.
65  *
66  * Parse /proc/cpuinfo to get the number of physical and logical
67  * processors on the machine.
68  *
69  * @return
70  *   0 on success, negative on error
71  */
72 int rte_eal_cpu_init(void);
73
74 /**
75  * Map memory
76  *
77  * This function is private to EAL.
78  *
79  * Fill configuration structure with these infos, and return 0 on success.
80  *
81  * @return
82  *   0 on success, negative on error
83  */
84 int rte_eal_memory_init(void);
85
86 /**
87  * Configure HPET
88  *
89  * This function is private to EAL.
90  *
91  * Mmap memory areas used by HPET (high precision event timer) that will
92  * provide our time reference.
93  *
94  * @return
95  *   0 on success, negative on error
96  */
97 int rte_eal_hpet_init(void);
98
99 /**
100  * Init early logs
101  *
102  * This function is private to EAL.
103  *
104  * @return
105  *   0 on success, negative on error
106  */
107 int rte_eal_log_early_init(void);
108
109 /**
110  * Init the default log stream
111  *
112  * This function is private to EAL.
113  *
114  * @return
115  *   0 on success, negative on error
116  */
117 int rte_eal_log_init(void);
118
119 /**
120  * Init the default log stream
121  *
122  * This function is private to EAL.
123  *
124  * @return
125  *   0 on success, negative on error
126  */
127 int rte_eal_pci_init(void);
128
129 struct rte_pci_driver;
130 struct rte_pci_device;
131
132 /**
133  * Mmap memory for single PCI device
134  *
135  * This function is private to EAL.
136  *
137  * @return
138  *   0 on success, negative on error
139  */
140 int rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,
141                 struct rte_pci_device *dev);
142
143 /**
144  * Init tail queues for non-EAL library structures. This is to allow
145  * the rings, mempools, etc. lists to be shared among multiple processes
146  *
147  * This function is private to EAL
148  *
149  * @return
150  *    0 on success, negative on error
151  */
152 int rte_eal_tailqs_init(void);
153
154 /**
155  * Init interrupt handling.
156  *
157  * This function is private to EAL.
158  *
159  * @return
160  *  0 on success, negative on error
161  */
162 int rte_eal_intr_init(void);
163
164 /**
165  * Init alarm mechanism. This is to allow a callback be called after
166  * specific time.
167  *
168  * This function is private to EAL.
169  *
170  * @return
171  *  0 on success, negative on error
172  */
173 int rte_eal_alarm_init(void);
174
175 #endif /* _EAL_PRIVATE_H_ */