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

Function ccp_cipher_slot

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

calculate CCP descriptors requirement */

Source from the content-addressed store, hash-verified

1229
1230/* calculate CCP descriptors requirement */
1231static inline int
1232ccp_cipher_slot(struct ccp_session *session)
1233{
1234 int count = 0;
1235
1236 switch (session->cipher.algo) {
1237 case CCP_CIPHER_ALGO_AES_CBC:
1238 count = 2;
1239 /**< op + passthrough for iv */
1240 break;
1241 case CCP_CIPHER_ALGO_AES_ECB:
1242 count = 1;
1243 /**<only op*/
1244 break;
1245 case CCP_CIPHER_ALGO_AES_CTR:
1246 count = 2;
1247 /**< op + passthrough for iv */
1248 break;
1249 case CCP_CIPHER_ALGO_3DES_CBC:
1250 count = 2;
1251 /**< op + passthrough for iv */
1252 break;
1253 default:
1254 CCP_LOG_ERR("Unsupported cipher algo %d",
1255 session->cipher.algo);
1256 }
1257 return count;
1258}
1259
1260static inline int
1261ccp_auth_slot(struct ccp_session *session)

Callers 1

ccp_compute_slot_countFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected