| 1979 | } |
| 1980 | |
| 1981 | static void |
| 1982 | compute_ctrl_threads_cpuset(struct internal_config *internal_cfg) |
| 1983 | { |
| 1984 | rte_cpuset_t *cpuset = &internal_cfg->ctrl_cpuset; |
| 1985 | rte_cpuset_t default_set; |
| 1986 | unsigned int lcore_id; |
| 1987 | |
| 1988 | for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { |
| 1989 | if (rte_lcore_has_role(lcore_id, ROLE_OFF)) |
| 1990 | continue; |
| 1991 | RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset); |
| 1992 | } |
| 1993 | RTE_CPU_NOT(cpuset, cpuset); |
| 1994 | |
| 1995 | if (rte_thread_get_affinity_by_id(rte_thread_self(), &default_set) != 0) |
| 1996 | CPU_ZERO(&default_set); |
| 1997 | |
| 1998 | RTE_CPU_AND(cpuset, cpuset, &default_set); |
| 1999 | |
| 2000 | /* if no remaining cpu, use main lcore cpu affinity */ |
| 2001 | if (!CPU_COUNT(cpuset)) { |
| 2002 | memcpy(cpuset, &lcore_config[rte_get_main_lcore()].cpuset, |
| 2003 | sizeof(*cpuset)); |
| 2004 | } |
| 2005 | } |
| 2006 | |
| 2007 | int |
| 2008 | eal_cleanup_config(struct internal_config *internal_cfg) |
no test coverage detected