hash_keys[i] = sess->pKey_hash;
if (sess->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY)
- dst[i] = (uint32_t *)qp_data->temp_digest;
+ dst[i] = (uint32_t *)qp_data->temp_digest[i];
else
dst[i] = (uint32_t *)ops[i]->sym->auth.digest.data;
struct ipsec_mb_qp *qp, uint8_t num_ops)
{
unsigned int i;
- unsigned int processed_ops;
+ unsigned int processed_ops = 0;
switch (op_type) {
case IPSEC_MB_OP_ENCRYPT_ONLY:
num_ops);
break;
case IPSEC_MB_OP_ENCRYPT_THEN_HASH_GEN:
+ case IPSEC_MB_OP_DECRYPT_THEN_HASH_VERIFY:
processed_ops = process_zuc_cipher_op(qp, ops, sessions,
num_ops);
process_zuc_hash_op(qp, ops, sessions, processed_ops);
break;
case IPSEC_MB_OP_HASH_VERIFY_THEN_DECRYPT:
+ case IPSEC_MB_OP_HASH_GEN_THEN_ENCRYPT:
processed_ops = process_zuc_hash_op(qp, ops, sessions,
num_ops);
process_zuc_cipher_op(qp, ops, sessions, processed_ops);
break;
default:
/* Operation not supported. */
- processed_ops = 0;
+ for (i = 0; i < num_ops; i++)
+ ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
}
for (i = 0; i < num_ops; i++) {
struct zuc_session *curr_sess;
struct zuc_session *sessions[ZUC_MAX_BURST];
+ struct rte_crypto_op *int_c_ops[ZUC_MAX_BURST];
enum ipsec_mb_operation prev_zuc_op = IPSEC_MB_OP_NOT_SUPPORTED;
enum ipsec_mb_operation curr_zuc_op;
struct ipsec_mb_qp *qp = queue_pair;
*/
if (burst_size == 0) {
prev_zuc_op = curr_zuc_op;
- c_ops[0] = curr_c_op;
+ int_c_ops[0] = curr_c_op;
sessions[0] = curr_sess;
burst_size++;
} else if (curr_zuc_op == prev_zuc_op) {
- c_ops[burst_size] = curr_c_op;
+ int_c_ops[burst_size] = curr_c_op;
sessions[burst_size] = curr_sess;
burst_size++;
/*
* process them, and start a new batch.
*/
if (burst_size == ZUC_MAX_BURST) {
- processed_ops = process_ops(c_ops, curr_zuc_op,
+ processed_ops = process_ops(int_c_ops, curr_zuc_op,
sessions, qp, burst_size);
if (processed_ops < burst_size) {
burst_size = 0;
* Different operation type, process the ops
* of the previous type.
*/
- processed_ops = process_ops(c_ops, prev_zuc_op,
+ processed_ops = process_ops(int_c_ops, prev_zuc_op,
sessions, qp, burst_size);
if (processed_ops < burst_size) {
burst_size = 0;
burst_size = 0;
prev_zuc_op = curr_zuc_op;
- c_ops[0] = curr_c_op;
+ int_c_ops[0] = curr_c_op;
sessions[0] = curr_sess;
burst_size++;
}
if (burst_size != 0) {
/* Process the crypto ops of the last operation type. */
- processed_ops = process_ops(c_ops, prev_zuc_op,
+ processed_ops = process_ops(int_c_ops, prev_zuc_op,
sessions, qp, burst_size);
}