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

Function main

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

Source from the content-addressed store, hash-verified

2105}
2106
2107int
2108main(int argc, char **argv)
2109{
2110 int ret;
2111 uint16_t port;
2112 struct rte_flow_error error;
2113
2114 ret = rte_eal_init(argc, argv);
2115 if (ret < 0)
2116 rte_exit(EXIT_FAILURE, "EAL init failed\n");
2117
2118 force_quit = false;
2119 dump_iterations = false;
2120 rules_count = DEFAULT_RULES_COUNT;
2121 rules_batch = DEFAULT_RULES_BATCH;
2122 delete_flag = false;
2123 dump_socket_mem_flag = false;
2124 flow_group = DEFAULT_GROUP;
2125 unique_data = false;
2126
2127 rx_queues_count = (uint8_t) RXQ_NUM;
2128 tx_queues_count = (uint8_t) TXQ_NUM;
2129 rxd_count = (uint8_t) NR_RXD;
2130 txd_count = (uint8_t) NR_TXD;
2131 mbuf_size = (uint32_t) MBUF_SIZE;
2132 mbuf_cache_size = (uint32_t) MBUF_CACHE_SIZE;
2133 total_mbuf_num = (uint32_t) TOTAL_MBUF_NUM;
2134
2135 signal(SIGINT, signal_handler);
2136 signal(SIGTERM, signal_handler);
2137
2138 argc -= ret;
2139 argv += ret;
2140 if (argc > 1)
2141 args_parse(argc, argv);
2142
2143 /* For more fancy, localised integer formatting. */
2144 setlocale(LC_NUMERIC, "");
2145
2146 init_port();
2147
2148 nb_lcores = rte_lcore_count();
2149 if (nb_lcores <= 1)
2150 rte_exit(EXIT_FAILURE, "This app needs at least two cores\n");
2151
2152 printf(":: Flows Count per port: %d\n\n", rules_count);
2153
2154 rte_srand(rand_seed);
2155
2156 if (has_meter()) {
2157 create_meter_profile();
2158 if (policy_mtr)
2159 create_meter_policy();
2160 }
2161 rte_eal_mp_remote_launch(run_rte_flow_handler_cores, NULL, CALL_MAIN);
2162
2163 if (enable_fwd) {
2164 init_lcore_info();

Callers

nothing calls this directly

Calls 15

rte_exitFunction · 0.85
rte_lcore_countFunction · 0.85
rte_srandFunction · 0.85
has_meterFunction · 0.85
create_meter_profileFunction · 0.85
create_meter_policyFunction · 0.85
rte_eal_mp_remote_launchFunction · 0.85
init_lcore_infoFunction · 0.85
destroy_meter_profileFunction · 0.85
destroy_meter_policyFunction · 0.85
rte_flow_flushFunction · 0.85
rte_eth_dev_stopFunction · 0.85

Tested by

no test coverage detected