| 443 | } |
| 444 | |
| 445 | static void |
| 446 | free_resource(void) |
| 447 | { |
| 448 | uint32_t i, j; |
| 449 | |
| 450 | for (i = 0; i < options.nb_los; i++) { |
| 451 | struct lcore_option *lo = &options.los[i]; |
| 452 | struct vhost_crypto_info *info = options.infos[i]; |
| 453 | |
| 454 | if (!info) |
| 455 | continue; |
| 456 | |
| 457 | rte_mempool_free(info->cop_pool); |
| 458 | rte_mempool_free(info->sess_pool); |
| 459 | |
| 460 | for (j = 0; j < lo->nb_sockets; j++) { |
| 461 | rte_vhost_driver_unregister(lo->socket_files[i]); |
| 462 | free(lo->socket_files[i]); |
| 463 | } |
| 464 | |
| 465 | rte_free(info); |
| 466 | } |
| 467 | |
| 468 | memset(&options, 0, sizeof(options)); |
| 469 | |
| 470 | /* clean up the EAL */ |
| 471 | rte_eal_cleanup(); |
| 472 | } |
| 473 | |
| 474 | int |
| 475 | main(int argc, char *argv[]) |
no test coverage detected