calculate CCP descriptors requirement */
| 1229 | |
| 1230 | /* calculate CCP descriptors requirement */ |
| 1231 | static inline int |
| 1232 | ccp_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 | |
| 1260 | static inline int |
| 1261 | ccp_auth_slot(struct ccp_session *session) |
no outgoing calls
no test coverage detected