| 479 | } |
| 480 | |
| 481 | static int |
| 482 | crypto_caps_auth_verify(uint8_t dev_id, const struct rte_crypto_sym_xform *a_xfrm) |
| 483 | { |
| 484 | const struct rte_cryptodev_symmetric_capability *cap; |
| 485 | struct rte_cryptodev_sym_capability_idx cap_idx; |
| 486 | int ret; |
| 487 | |
| 488 | cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 489 | cap_idx.algo.auth = a_xfrm->auth.algo; |
| 490 | |
| 491 | cap = rte_cryptodev_sym_capability_get(dev_id, &cap_idx); |
| 492 | if (cap == NULL) |
| 493 | return -1; |
| 494 | |
| 495 | ret = rte_cryptodev_sym_capability_check_auth(cap, a_xfrm->auth.key.length, |
| 496 | a_xfrm->auth.digest_length, |
| 497 | a_xfrm->auth.iv.length); |
| 498 | |
| 499 | return ret; |
| 500 | } |
| 501 | |
| 502 | static int |
| 503 | cryptodev_id_get(bool is_integrity_protected, const struct rte_crypto_sym_xform *c_xfrm, |
no test coverage detected