| 500 | } |
| 501 | |
| 502 | static int |
| 503 | cryptodev_id_get(bool is_integrity_protected, const struct rte_crypto_sym_xform *c_xfrm, |
| 504 | const struct rte_crypto_sym_xform *a_xfrm) |
| 505 | { |
| 506 | int i, nb_devs; |
| 507 | |
| 508 | nb_devs = rte_cryptodev_count(); |
| 509 | |
| 510 | /* Check capabilities */ |
| 511 | |
| 512 | for (i = 0; i < nb_devs; i++) { |
| 513 | if ((crypto_caps_cipher_verify(i, c_xfrm) == 0) && |
| 514 | (!is_integrity_protected || crypto_caps_auth_verify(i, a_xfrm) == 0)) |
| 515 | break; |
| 516 | } |
| 517 | |
| 518 | if (i == nb_devs) |
| 519 | return -1; |
| 520 | |
| 521 | return i; |
| 522 | } |
| 523 | |
| 524 | static int |
| 525 | pdcp_known_vec_verify(struct rte_mbuf *m, const uint8_t *expected, uint32_t expected_pkt_len) |
no test coverage detected