| 132 | } |
| 133 | |
| 134 | int |
| 135 | main(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 | } |
nothing calls this directly
no test coverage detected