| 62 | } |
| 63 | |
| 64 | static void |
| 65 | thread_update_affinity(rte_cpuset_t *cpusetp) |
| 66 | { |
| 67 | unsigned int lcore_id = rte_lcore_id(); |
| 68 | |
| 69 | /* store socket_id in TLS for quick access */ |
| 70 | RTE_PER_LCORE(_socket_id) = |
| 71 | eal_cpuset_socket_id(cpusetp); |
| 72 | |
| 73 | /* store cpuset in TLS for quick access */ |
| 74 | memmove(&RTE_PER_LCORE(_cpuset), cpusetp, |
| 75 | sizeof(rte_cpuset_t)); |
| 76 | |
| 77 | if (lcore_id != (unsigned)LCORE_ID_ANY) { |
| 78 | /* EAL thread will update lcore_config */ |
| 79 | lcore_config[lcore_id].socket_id = RTE_PER_LCORE(_socket_id); |
| 80 | memmove(&lcore_config[lcore_id].cpuset, cpusetp, |
| 81 | sizeof(rte_cpuset_t)); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | int |
| 86 | rte_thread_set_affinity(rte_cpuset_t *cpusetp) |
no test coverage detected