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

Function flows_handler

dpdk/app/test-flow-perf/main.c:1499–1536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499static void
1500flows_handler(uint8_t core_id)
1501{
1502 struct rte_flow **flows_list;
1503 uint16_t port_idx = 0;
1504 uint16_t nr_ports;
1505 int port_id;
1506
1507 nr_ports = rte_eth_dev_count_avail();
1508
1509 if (rules_batch > rules_count)
1510 rules_batch = rules_count;
1511
1512 printf(":: Rules Count per port: %d\n\n", rules_count);
1513
1514 for (port_id = 0; port_id < nr_ports; port_id++) {
1515 /* If port outside portmask */
1516 if (!((ports_mask >> port_id) & 0x1))
1517 continue;
1518
1519 /* Insertion part. */
1520 mc_pool.last_alloc[core_id] = (int64_t)dump_socket_mem(stdout);
1521 if (has_meter())
1522 meters_handler(port_id, core_id, METER_CREATE);
1523 flows_list = insert_flows(port_id, core_id,
1524 dst_ports[port_idx++]);
1525 if (flows_list == NULL)
1526 rte_exit(EXIT_FAILURE, "Error: Insertion Failed!\n");
1527 mc_pool.current_alloc[core_id] = (int64_t)dump_socket_mem(stdout);
1528
1529 /* Deletion part. */
1530 if (delete_flag) {
1531 destroy_flows(port_id, core_id, flows_list);
1532 if (has_meter())
1533 meters_handler(port_id, core_id, METER_DELETE);
1534 }
1535 }
1536}
1537
1538static void
1539dump_used_cpu_time(const char *item,

Callers 1

Calls 8

rte_eth_dev_count_availFunction · 0.85
has_meterFunction · 0.85
meters_handlerFunction · 0.85
insert_flowsFunction · 0.85
rte_exitFunction · 0.85
destroy_flowsFunction · 0.85
dump_socket_memFunction · 0.70
printfFunction · 0.50

Tested by

no test coverage detected