| 31 | }; |
| 32 | |
| 33 | static int |
| 34 | get_two_hyperthreads(struct lcore_pair *lcp) |
| 35 | { |
| 36 | unsigned int socket[2]; |
| 37 | unsigned int core[2]; |
| 38 | unsigned int id[2]; |
| 39 | |
| 40 | RTE_LCORE_FOREACH(id[0]) { |
| 41 | RTE_LCORE_FOREACH(id[1]) { |
| 42 | if (id[0] == id[1]) |
| 43 | continue; |
| 44 | core[0] = rte_lcore_to_cpu_id(id[0]); |
| 45 | core[1] = rte_lcore_to_cpu_id(id[1]); |
| 46 | socket[0] = rte_lcore_to_socket_id(id[0]); |
| 47 | socket[1] = rte_lcore_to_socket_id(id[1]); |
| 48 | if ((core[0] == core[1]) && (socket[0] == socket[1])) { |
| 49 | lcp->c1 = id[0]; |
| 50 | lcp->c2 = id[1]; |
| 51 | return 0; |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | return 1; |
| 57 | } |
| 58 | |
| 59 | static int |
| 60 | get_two_cores(struct lcore_pair *lcp) |
no test coverage detected