| 459 | } |
| 460 | |
| 461 | static int |
| 462 | crypto_caps_cipher_verify(uint8_t dev_id, const struct rte_crypto_sym_xform *c_xfrm) |
| 463 | { |
| 464 | const struct rte_cryptodev_symmetric_capability *cap; |
| 465 | struct rte_cryptodev_sym_capability_idx cap_idx; |
| 466 | int ret; |
| 467 | |
| 468 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
| 469 | cap_idx.algo.cipher = c_xfrm->cipher.algo; |
| 470 | |
| 471 | cap = rte_cryptodev_sym_capability_get(dev_id, &cap_idx); |
| 472 | if (cap == NULL) |
| 473 | return -1; |
| 474 | |
| 475 | ret = rte_cryptodev_sym_capability_check_cipher(cap, c_xfrm->cipher.key.length, |
| 476 | c_xfrm->cipher.iv.length); |
| 477 | |
| 478 | return ret; |
| 479 | } |
| 480 | |
| 481 | static int |
| 482 | crypto_caps_auth_verify(uint8_t dev_id, const struct rte_crypto_sym_xform *a_xfrm) |
no test coverage detected