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

Function main

dpdk/app/graph/main.c:182–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182int
183main(int argc, char **argv)
184{
185 int rc;
186
187 /* Parse application arguments */
188 rc = app_args_parse(argc, argv);
189 if (rc < 0)
190 return rc;
191
192 /* EAL */
193 rc = rte_eal_init(argc, argv);
194 if (rc < 0) {
195 printf("Error: EAL initialization failed (%d)\n", rc);
196 return rc;
197 };
198
199 force_quit = false;
200 signal(SIGINT, signal_handler);
201 signal(SIGTERM, signal_handler);
202
203 cli_init();
204
205 /* Script */
206 if (app.script_name) {
207 cli_script_process(app.script_name, app.conn.msg_in_len_max,
208 app.conn.msg_out_len_max, NULL);
209 }
210
211 /* Connectivity */
212 app.conn.msg_handle_arg = NULL;
213 conn = conn_init(&app.conn);
214 if (!conn) {
215 printf("Error: Connectivity initialization failed\n");
216 goto exit;
217 };
218
219 rte_delay_ms(1);
220 printf("Press enter to exit\n");
221
222 /* Dispatch loop */
223 while (!force_quit) {
224 conn_req_poll(conn);
225
226 conn_msg_poll(conn);
227 if (app_graph_exit())
228 force_quit = true;
229 }
230
231exit:
232 conn_free(conn);
233 ethdev_stop();
234 cli_exit();
235 rte_eal_cleanup();
236 return 0;
237}

Callers

nothing calls this directly

Calls 14

app_args_parseFunction · 0.85
cli_initFunction · 0.85
rte_delay_msFunction · 0.85
conn_req_pollFunction · 0.85
conn_msg_pollFunction · 0.85
app_graph_exitFunction · 0.85
ethdev_stopFunction · 0.85
cli_exitFunction · 0.85
cli_script_processFunction · 0.70
conn_initFunction · 0.70
conn_freeFunction · 0.70
rte_eal_initFunction · 0.50

Tested by

no test coverage detected