MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_eal_init

Function rte_eal_init

dpdk/lib/eal/windows/eal.c:275–504  ·  view source on GitHub ↗

Launch threads, called at application init(). */

Source from the content-addressed store, hash-verified

273
274/* Launch threads, called at application init(). */
275int
276rte_eal_init(int argc, char **argv)
277{
278 int i, fctret, bscan;
279 const struct rte_config *config = rte_eal_get_configuration();
280 struct internal_config *internal_conf =
281 eal_get_internal_configuration();
282 bool has_phys_addr;
283 enum rte_iova_mode iova_mode;
284 int ret;
285 char cpuset[RTE_CPU_AFFINITY_STR_LEN];
286 char thread_name[RTE_THREAD_NAME_SIZE];
287
288 eal_log_init(NULL, 0);
289
290 eal_log_level_parse(argc, argv);
291
292 if (eal_create_cpu_map() < 0) {
293 rte_eal_init_alert("Cannot discover CPU and NUMA.");
294 /* rte_errno is set */
295 return -1;
296 }
297
298 if (rte_eal_cpu_init() < 0) {
299 rte_eal_init_alert("Cannot detect lcores.");
300 rte_errno = ENOTSUP;
301 return -1;
302 }
303
304 fctret = eal_parse_args(argc, argv);
305 if (fctret < 0)
306 exit(1);
307
308 if (eal_option_device_parse()) {
309 rte_errno = ENODEV;
310 return -1;
311 }
312
313 /* Prevent creation of shared memory files. */
314 if (internal_conf->in_memory == 0) {
315 RTE_LOG(WARNING, EAL, "Multi-process support is requested, "
316 "but not available.\n");
317 internal_conf->in_memory = 1;
318 internal_conf->no_shconf = 1;
319 }
320
321 if (!internal_conf->no_hugetlbfs && (eal_hugepage_info_init() < 0)) {
322 rte_eal_init_alert("Cannot get hugepage information");
323 rte_errno = EACCES;
324 return -1;
325 }
326
327 if (internal_conf->memory == 0 && !internal_conf->force_sockets) {
328 if (internal_conf->no_hugetlbfs)
329 internal_conf->memory = MEMSIZE_IF_NO_HUGE_PAGE;
330 }
331
332 if (rte_eal_intr_init() < 0) {

Callers

nothing calls this directly

Calls 15

eal_create_cpu_mapFunction · 0.85
rte_eal_cpu_initFunction · 0.85
eal_option_device_parseFunction · 0.85
rte_bus_scanFunction · 0.85
eal_mem_win32api_initFunction · 0.85
eal_mem_virt2iova_initFunction · 0.85
rte_bus_get_iommu_classFunction · 0.85
rte_eal_memzone_initFunction · 0.85
rte_mcfg_mem_read_lockFunction · 0.85
rte_eal_memory_initFunction · 0.85

Tested by

no test coverage detected