{
if (arg) {
comp_perf_free_memory(
- &((struct cperf_benchmark_ctx *)arg)->ver.mem);
+ ((struct cperf_benchmark_ctx *)arg)->ver.options,
+ &((struct cperf_benchmark_ctx *)arg)->ver.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);
/* 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,
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;
}
struct comp_test_data *test_data = ctx->ver.options;
uint32_t lcore = rte_lcore_id();
static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
+ int i, ret = EXIT_SUCCESS;
ctx->ver.mem.lcore_id = lcore;
- int i, ret = EXIT_SUCCESS;
+
+ /*
+ * printing information about current compression thread
+ */
+ if (rte_atomic16_test_and_set(&ctx->ver.mem.print_info_once))
+ printf(" lcore: %u,"
+ " driver name: %s,"
+ " device name: %s,"
+ " device id: %u,"
+ " socket id: %u,"
+ " queue pair id: %u\n",
+ lcore,
+ ctx->ver.options->driver_name,
+ rte_compressdev_name_get(ctx->ver.mem.dev_id),
+ ctx->ver.mem.dev_id,
+ rte_compressdev_socket_id(ctx->ver.mem.dev_id),
+ ctx->ver.mem.qp_id);
/*
* First the verification part is needed
1000000000;
if (rte_atomic16_test_and_set(&display_once)) {
- printf("%12s%6s%12s%17s%15s%16s\n",
+ printf("\n%12s%6s%12s%17s%15s%16s\n",
"lcore id", "Level", "Comp size", "Comp ratio [%]",
"Comp [Gbps]", "Decomp [Gbps]");
}