| 2519 | } |
| 2520 | |
| 2521 | static inline int |
| 2522 | ccp_crypto_cipher(struct rte_crypto_op *op, |
| 2523 | struct ccp_queue *cmd_q, |
| 2524 | struct ccp_batch_info *b_info) |
| 2525 | { |
| 2526 | int result = 0; |
| 2527 | struct ccp_session *session; |
| 2528 | |
| 2529 | session = CRYPTODEV_GET_SYM_SESS_PRIV(op->sym->session); |
| 2530 | |
| 2531 | switch (session->cipher.algo) { |
| 2532 | case CCP_CIPHER_ALGO_AES_CBC: |
| 2533 | result = ccp_perform_aes(op, cmd_q, b_info); |
| 2534 | b_info->desccnt += 2; |
| 2535 | break; |
| 2536 | case CCP_CIPHER_ALGO_AES_CTR: |
| 2537 | result = ccp_perform_aes(op, cmd_q, b_info); |
| 2538 | b_info->desccnt += 2; |
| 2539 | break; |
| 2540 | case CCP_CIPHER_ALGO_AES_ECB: |
| 2541 | result = ccp_perform_aes(op, cmd_q, b_info); |
| 2542 | b_info->desccnt += 1; |
| 2543 | break; |
| 2544 | case CCP_CIPHER_ALGO_3DES_CBC: |
| 2545 | result = ccp_perform_3des(op, cmd_q, b_info); |
| 2546 | b_info->desccnt += 2; |
| 2547 | break; |
| 2548 | default: |
| 2549 | CCP_LOG_ERR("Unsupported cipher algo %d", |
| 2550 | session->cipher.algo); |
| 2551 | return -ENOTSUP; |
| 2552 | } |
| 2553 | return result; |
| 2554 | } |
| 2555 | |
| 2556 | static inline int |
| 2557 | ccp_crypto_auth(struct rte_crypto_op *op, |
no test coverage detected