cperf_verify_test_destructor(void *arg)
{
if (arg) {
- comp_perf_free_memory(&((struct cperf_verify_ctx *)arg)->mem);
+ comp_perf_free_memory(
+ ((struct cperf_verify_ctx *)arg)->options,
+ &((struct cperf_verify_ctx *)arg)->mem);
rte_free(arg);
}
}
ops[op_id]->private_xform = priv_xform;
}
+ if (unlikely(test_data->perf_comp_force_stop))
+ goto end;
+
num_enq = rte_compressdev_enqueue_burst(dev_id,
mem->qp_id, ops,
num_ops);
for (i = 0; i < num_deq; i++) {
struct rte_comp_op *op = deq_ops[i];
- if (op->status != RTE_COMP_OP_STATUS_SUCCESS) {
+ if (op->status ==
+ RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED ||
+ op->status ==
+ RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
+ RTE_LOG(ERR, USER1,
+"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
+ res = -1;
+ goto end;
+ } else if (op->status !=
+ RTE_COMP_OP_STATUS_SUCCESS) {
RTE_LOG(ERR, USER1,
"Some operations were not successful\n");
goto end;
/* Dequeue the last operations */
while (total_deq_ops < total_ops) {
+ if (unlikely(test_data->perf_comp_force_stop))
+ goto end;
+
num_deq = rte_compressdev_dequeue_burst(dev_id,
mem->qp_id,
deq_ops,
for (i = 0; i < num_deq; i++) {
struct rte_comp_op *op = deq_ops[i];
- if (op->status != RTE_COMP_OP_STATUS_SUCCESS) {
+ if (op->status ==
+ RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED ||
+ op->status ==
+ RTE_COMP_OP_STATUS_OUT_OF_SPACE_RECOVERABLE) {
+ RTE_LOG(ERR, USER1,
+"Out of space error occurred due to uncompressible input data expanding to larger than destination buffer. Increase the EXPANSE_RATIO constant to use this data.\n");
+ res = -1;
+ goto end;
+ } else if (op->status !=
+ RTE_COMP_OP_STATUS_SUCCESS) {
RTE_LOG(ERR, USER1,
"Some operations were not successful\n");
goto end;
}
-
const void *read_data_addr =
rte_pktmbuf_read(op->m_dst,
op->dst.offset,
rte_mempool_put_bulk(mem->op_pool, (void **)ops, allocated);
rte_compressdev_private_xform_free(dev_id, priv_xform);
rte_free(ops);
+
+ if (test_data->perf_comp_force_stop) {
+ RTE_LOG(ERR, USER1,
+ "lcore: %d Perf. test has been aborted by user\n",
+ mem->lcore_id);
+ res = -1;
+ }
+
return res;
}