| 546 | } |
| 547 | |
| 548 | int |
| 549 | main(int argc, char **argv) |
| 550 | { |
| 551 | struct cperf_options opts = {0}; |
| 552 | struct cperf_test_vector *t_vec = NULL; |
| 553 | struct cperf_op_fns op_fns; |
| 554 | void *ctx[RTE_MAX_LCORE] = { }; |
| 555 | int nb_cryptodevs = 0; |
| 556 | uint16_t total_nb_qps = 0; |
| 557 | uint8_t cdev_id, i; |
| 558 | uint8_t enabled_cdevs[RTE_CRYPTO_MAX_DEVS] = { 0 }; |
| 559 | |
| 560 | uint8_t buffer_size_idx = 0; |
| 561 | |
| 562 | int ret; |
| 563 | uint32_t lcore_id; |
| 564 | bool cap_unsupported = false; |
| 565 | |
| 566 | /* Initialise DPDK EAL */ |
| 567 | ret = rte_eal_init(argc, argv); |
| 568 | if (ret < 0) |
| 569 | rte_exit(EXIT_FAILURE, "Invalid EAL arguments!\n"); |
| 570 | argc -= ret; |
| 571 | argv += ret; |
| 572 | |
| 573 | cperf_options_default(&opts); |
| 574 | |
| 575 | ret = cperf_options_parse(&opts, argc, argv); |
| 576 | if (ret) { |
| 577 | RTE_LOG(ERR, USER1, "Parsing one or more user options failed\n"); |
| 578 | goto err; |
| 579 | } |
| 580 | |
| 581 | ret = cperf_options_check(&opts); |
| 582 | if (ret) { |
| 583 | RTE_LOG(ERR, USER1, |
| 584 | "Checking one or more user options failed\n"); |
| 585 | goto err; |
| 586 | } |
| 587 | |
| 588 | nb_cryptodevs = cperf_initialize_cryptodev(&opts, enabled_cdevs); |
| 589 | |
| 590 | if (!opts.silent) |
| 591 | cperf_options_dump(&opts); |
| 592 | |
| 593 | if (nb_cryptodevs < 1) { |
| 594 | RTE_LOG(ERR, USER1, "Failed to initialise requested crypto " |
| 595 | "device type\n"); |
| 596 | nb_cryptodevs = 0; |
| 597 | goto err; |
| 598 | } |
| 599 | |
| 600 | ret = cperf_verify_devices_capabilities(&opts, enabled_cdevs, |
| 601 | nb_cryptodevs); |
| 602 | if (ret) { |
| 603 | RTE_LOG(ERR, USER1, "Crypto device type does not support " |
| 604 | "capabilities requested\n"); |
| 605 | cap_unsupported = true; |
nothing calls this directly
no test coverage detected