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

Function populate_efd_table

dpdk/examples/server_node_efd/efd_server/init.c:218–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218static void
219populate_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 */

Callers 1

initFunction · 0.85

Calls 4

rte_socket_idFunction · 0.85
rte_efd_updateFunction · 0.85
rte_exitFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected