| 447 | } |
| 448 | |
| 449 | const struct rte_cryptodev_asymmetric_xform_capability * |
| 450 | rte_cryptodev_asym_capability_get(uint8_t dev_id, |
| 451 | const struct rte_cryptodev_asym_capability_idx *idx) |
| 452 | { |
| 453 | const struct rte_cryptodev_capabilities *capability; |
| 454 | const struct rte_cryptodev_asymmetric_xform_capability *asym_cap = NULL; |
| 455 | struct rte_cryptodev_info dev_info; |
| 456 | unsigned int i = 0; |
| 457 | |
| 458 | memset(&dev_info, 0, sizeof(struct rte_cryptodev_info)); |
| 459 | rte_cryptodev_info_get(dev_id, &dev_info); |
| 460 | |
| 461 | while ((capability = &dev_info.capabilities[i++])->op != |
| 462 | RTE_CRYPTO_OP_TYPE_UNDEFINED) { |
| 463 | if (capability->op != RTE_CRYPTO_OP_TYPE_ASYMMETRIC) |
| 464 | continue; |
| 465 | |
| 466 | if (capability->asym.xform_capa.xform_type == idx->type) { |
| 467 | asym_cap = &capability->asym.xform_capa; |
| 468 | break; |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | rte_cryptodev_trace_asym_capability_get(dev_info.driver_name, |
| 473 | dev_info.driver_id, idx->type, asym_cap); |
| 474 | |
| 475 | return asym_cap; |
| 476 | }; |
| 477 | |
| 478 | int |
| 479 | rte_cryptodev_sym_capability_check_cipher( |