Skip to contentSkip to conversation

crypto/scheduler: add crypto op reorder processing function

PATCH New Fan Zhang 1 participant 1 message Feb 20, 2017 Crypto API

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/2 crypto/scheduler: add crypto op reorder processing function

Different modes of scheduler shall share same crypto op reordering steps (if enabled). This patch adds the inline functions of common crypto op reordering for better code reuse.

---
 drivers/crypto/scheduler/scheduler_pmd_ops.c     |   3 +
 drivers/crypto/scheduler/scheduler_pmd_private.h | 118 +++++++++++++++++++++++
 2 files changed, 121 insertions(+)
drivers/crypto/scheduler/scheduler_pmd_ops.c +3 -0
index 56624c7..0a0464d 100644
@@ -94,11 +94,14 @@ update_reorder_buff(struct rte_cryptodev *dev, uint16_t qp_id)
 			CS_LOG_ERR("failed to create reorder buffer");
 			return -ENOMEM;
 		}
+
+		qp_ctx->nb_empty_bufs = buff_size;
 	} else {
 		if (qp_ctx->reorder_buf) {
 			rte_reorder_free(qp_ctx->reorder_buf);
 			qp_ctx->reorder_buf = NULL;
 		}
+		qp_ctx->nb_empty_bufs = 0;
 	}
 
 	return 0;
drivers/crypto/scheduler/scheduler_pmd_private.h +118 -0

128 lines not on this page · raw message

Signature · 1 line
2.7.4