MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ccp_crypto_cipher

Function ccp_crypto_cipher

dpdk/drivers/crypto/ccp/ccp_crypto.c:2521–2554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2519}
2520
2521static inline int
2522ccp_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
2556static inline int
2557ccp_crypto_auth(struct rte_crypto_op *op,

Callers 1

process_ops_to_enqueueFunction · 0.85

Calls 2

ccp_perform_aesFunction · 0.85
ccp_perform_3desFunction · 0.85

Tested by

no test coverage detected