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

Function main

dpdk/examples/pipeline/main.c:134–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134int
135main(int argc, char **argv)
136{
137 struct conn *conn;
138 int status;
139
140 /* Parse application arguments */
141 status = parse_args(argc, argv);
142 if (status < 0)
143 return status;
144
145 /* EAL */
146 status = rte_eal_init(argc, argv);
147 if (status < 0) {
148 printf("Error: EAL initialization failed (%d)\n", status);
149 return status;
150 };
151
152 /* Thread */
153 status = thread_init();
154 if (status) {
155 printf("Error: Thread initialization failed (%d)\n", status);
156 return status;
157 }
158
159 rte_eal_mp_remote_launch(
160 thread_main,
161 NULL,
162 SKIP_MAIN);
163
164 /* Script */
165 if (app.script_name)
166 cli_script_process(app.script_name,
167 app.conn.msg_in_len_max,
168 app.conn.msg_out_len_max,
169 NULL);
170
171 /* Connectivity */
172 app.conn.msg_handle_arg = NULL;
173 conn = conn_init(&app.conn);
174 if (!conn) {
175 printf("Error: Connectivity initialization failed (%d)\n",
176 status);
177 return status;
178 };
179
180 /* Dispatch loop */
181 for ( ; ; ) {
182 conn_poll_for_conn(conn);
183
184 conn_poll_for_msg(conn);
185 }
186
187 /* clean up the EAL */
188 rte_eal_cleanup();
189}

Callers

nothing calls this directly

Calls 10

rte_eal_mp_remote_launchFunction · 0.85
parse_argsFunction · 0.70
thread_initFunction · 0.70
cli_script_processFunction · 0.70
conn_initFunction · 0.70
conn_poll_for_connFunction · 0.70
conn_poll_for_msgFunction · 0.70
rte_eal_initFunction · 0.50
printfFunction · 0.50
rte_eal_cleanupFunction · 0.50

Tested by

no test coverage detected