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

Function test_capability

dpdk/app/test/test_cryptodev_asym.c:626–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626static int
627test_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
664static int
665test_dh_gen_shared_sec(struct rte_crypto_asym_xform *xfrm)

Callers

nothing calls this directly

Calls 3

rte_cryptodev_info_getFunction · 0.85
print_asym_capaFunction · 0.85

Tested by

no test coverage detected