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

Function eal_cpuset_socket_id

dpdk/lib/eal/common/eal_common_thread.c:36–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static int
37eal_cpuset_socket_id(rte_cpuset_t *cpusetp)
38{
39 unsigned cpu = 0;
40 int socket_id = SOCKET_ID_ANY;
41 int sid;
42
43 if (cpusetp == NULL)
44 return SOCKET_ID_ANY;
45
46 do {
47 if (!CPU_ISSET(cpu, cpusetp))
48 continue;
49
50 if (socket_id == SOCKET_ID_ANY)
51 socket_id = eal_cpu_socket_id(cpu);
52
53 sid = eal_cpu_socket_id(cpu);
54 if (socket_id != sid) {
55 socket_id = SOCKET_ID_ANY;
56 break;
57 }
58
59 } while (++cpu < CPU_SETSIZE);
60
61 return socket_id;
62}
63
64static void
65thread_update_affinity(rte_cpuset_t *cpusetp)

Callers 1

thread_update_affinityFunction · 0.85

Calls 1

eal_cpu_socket_idFunction · 0.50

Tested by

no test coverage detected