| 216 | } |
| 217 | |
| 218 | static void |
| 219 | populate_efd_table(void) |
| 220 | { |
| 221 | unsigned int i; |
| 222 | int32_t ret; |
| 223 | uint32_t ip_dst; |
| 224 | uint8_t socket_id = rte_socket_id(); |
| 225 | uint64_t node_id; |
| 226 | |
| 227 | /* Add flows in table */ |
| 228 | for (i = 0; i < num_flows; i++) { |
| 229 | node_id = i % num_nodes; |
| 230 | |
| 231 | ip_dst = rte_cpu_to_be_32(i); |
| 232 | ret = rte_efd_update(efd_table, socket_id, |
| 233 | (void *)&ip_dst, (efd_value_t)node_id); |
| 234 | if (ret < 0) |
| 235 | rte_exit(EXIT_FAILURE, "Unable to add entry %u in " |
| 236 | "EFD table\n", i); |
| 237 | } |
| 238 | |
| 239 | printf("EFD table: Adding 0x%x keys\n", num_flows); |
| 240 | } |
| 241 | /* >8 End of creation EFD table. */ |
| 242 | |
| 243 | /* Check the link status of all ports in up to 9s, and print them finally */ |
no test coverage detected