| 624 | } |
| 625 | |
| 626 | static int |
| 627 | test_capability(void) |
| 628 | { |
| 629 | struct crypto_testsuite_params_asym *ts_params = &testsuite_params; |
| 630 | uint8_t dev_id = ts_params->valid_devs[0]; |
| 631 | struct rte_cryptodev_info dev_info; |
| 632 | const struct rte_cryptodev_capabilities *dev_capa; |
| 633 | int i = 0; |
| 634 | struct rte_cryptodev_asym_capability_idx idx; |
| 635 | const struct rte_cryptodev_asymmetric_xform_capability *capa; |
| 636 | |
| 637 | rte_cryptodev_info_get(dev_id, &dev_info); |
| 638 | if (!(dev_info.feature_flags & |
| 639 | RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) { |
| 640 | RTE_LOG(INFO, USER1, |
| 641 | "Device doesn't support asymmetric. Test Skipped\n"); |
| 642 | return TEST_SKIPPED; |
| 643 | } |
| 644 | |
| 645 | /* print xform capability */ |
| 646 | for (i = 0; |
| 647 | dev_info.capabilities[i].op != RTE_CRYPTO_OP_TYPE_UNDEFINED; |
| 648 | i++) { |
| 649 | dev_capa = &(dev_info.capabilities[i]); |
| 650 | if (dev_info.capabilities[i].op == |
| 651 | RTE_CRYPTO_OP_TYPE_ASYMMETRIC) { |
| 652 | idx.type = dev_capa->asym.xform_capa.xform_type; |
| 653 | |
| 654 | capa = rte_cryptodev_asym_capability_get(dev_id, |
| 655 | (const struct |
| 656 | rte_cryptodev_asym_capability_idx *) &idx); |
| 657 | TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability"); |
| 658 | print_asym_capa(capa); |
| 659 | } |
| 660 | } |
| 661 | return TEST_SUCCESS; |
| 662 | } |
| 663 | |
| 664 | static int |
| 665 | test_dh_gen_shared_sec(struct rte_crypto_asym_xform *xfrm) |
nothing calls this directly
no test coverage detected