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

Function ccp_get_cmd_id

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

Source from the content-addressed store, hash-verified

137};
138
139static enum ccp_cmd_order
140ccp_get_cmd_id(const struct rte_crypto_sym_xform *xform)
141{
142 enum ccp_cmd_order res = CCP_CMD_NOT_SUPPORTED;
143
144 if (xform == NULL)
145 return res;
146 if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
147 if (xform->next == NULL)
148 return CCP_CMD_AUTH;
149 else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER)
150 return CCP_CMD_HASH_CIPHER;
151 }
152 if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
153 if (xform->next == NULL)
154 return CCP_CMD_CIPHER;
155 else if (xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH)
156 return CCP_CMD_CIPHER_HASH;
157 }
158 if (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD)
159 return CCP_CMD_COMBINED;
160 return res;
161}
162
163/* partial hash using openssl */
164static int partial_hash_sha1(uint8_t *data_in, uint8_t *data_out)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected