1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #include <rte_malloc.h>
8 #include <rte_cycles.h>
9 #include <rte_compressdev.h>
11 #include "comp_perf_options.h"
13 #define NUM_MAX_XFORMS 16
14 #define NUM_MAX_INFLIGHT_OPS 512
15 #define EXPANSE_RATIO 1.05
16 #define MIN_COMPRESSED_BUF_SIZE 8
18 #define DIV_CEIL(a, b) ((a) / (b) + ((a) % (b) != 0))
20 /* Cleanup state machine */
21 static enum cleanup_st {
32 param_range_check(uint16_t size, const struct rte_param_log2_range *range)
34 unsigned int next_size;
36 /* Check lower/upper bounds */
37 if (size < range->min)
40 if (size > range->max)
43 /* If range is actually only one value, size is correct */
44 if (range->increment == 0)
47 /* Check if value is one of the supported sizes */
48 for (next_size = range->min; next_size <= range->max;
49 next_size += range->increment)
50 if (size == next_size)
57 comp_perf_check_capabilities(struct comp_test_data *test_data)
59 const struct rte_compressdev_capabilities *cap;
61 cap = rte_compressdev_capability_get(test_data->cdev_id,
62 RTE_COMP_ALGO_DEFLATE);
66 "Compress device does not support DEFLATE\n");
70 uint64_t comp_flags = cap->comp_feature_flags;
72 /* Huffman enconding */
73 if (test_data->huffman_enc == RTE_COMP_HUFFMAN_FIXED &&
74 (comp_flags & RTE_COMP_FF_HUFFMAN_FIXED) == 0) {
76 "Compress device does not supported Fixed Huffman\n");
80 if (test_data->huffman_enc == RTE_COMP_HUFFMAN_DYNAMIC &&
81 (comp_flags & RTE_COMP_FF_HUFFMAN_DYNAMIC) == 0) {
83 "Compress device does not supported Dynamic Huffman\n");
88 if (test_data->window_sz != -1) {
89 if (param_range_check(test_data->window_sz, &cap->window_size)
92 "Compress device does not support "
93 "this window size\n");
97 /* Set window size to PMD maximum if none was specified */
98 test_data->window_sz = cap->window_size.max;
100 /* Check if chained mbufs is supported */
101 if (test_data->max_sgl_segs > 1 &&
102 (comp_flags & RTE_COMP_FF_OOP_SGL_IN_SGL_OUT) == 0) {
103 RTE_LOG(INFO, USER1, "Compress device does not support "
104 "chained mbufs. Max SGL segments set to 1\n");
105 test_data->max_sgl_segs = 1;
108 /* Level 0 support */
109 if (test_data->level.min == 0 &&
110 (comp_flags & RTE_COMP_FF_NONCOMPRESSED_BLOCKS) == 0) {
111 RTE_LOG(ERR, USER1, "Compress device does not support "
112 "level 0 (no compression)\n");
120 comp_perf_allocate_memory(struct comp_test_data *test_data)
122 /* Number of segments for input and output
123 * (compression and decompression)
125 uint32_t total_segs = DIV_CEIL(test_data->input_data_sz,
127 test_data->comp_buf_pool = rte_pktmbuf_pool_create("comp_buf_pool",
129 0, 0, test_data->seg_sz + RTE_PKTMBUF_HEADROOM,
131 if (test_data->comp_buf_pool == NULL) {
132 RTE_LOG(ERR, USER1, "Mbuf mempool could not be created\n");
136 cleanup = ST_MEMORY_ALLOC;
137 test_data->decomp_buf_pool = rte_pktmbuf_pool_create("decomp_buf_pool",
139 0, 0, test_data->seg_sz + RTE_PKTMBUF_HEADROOM,
141 if (test_data->decomp_buf_pool == NULL) {
142 RTE_LOG(ERR, USER1, "Mbuf mempool could not be created\n");
146 test_data->total_bufs = DIV_CEIL(total_segs, test_data->max_sgl_segs);
148 test_data->op_pool = rte_comp_op_pool_create("op_pool",
149 test_data->total_bufs,
150 0, 0, rte_socket_id());
151 if (test_data->op_pool == NULL) {
152 RTE_LOG(ERR, USER1, "Comp op mempool could not be created\n");
157 * Compressed data might be a bit larger than input data,
158 * if data cannot be compressed
160 test_data->compressed_data = rte_zmalloc_socket(NULL,
161 test_data->input_data_sz * EXPANSE_RATIO
162 + MIN_COMPRESSED_BUF_SIZE, 0,
164 if (test_data->compressed_data == NULL) {
165 RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
166 "file could not be allocated\n");
170 test_data->decompressed_data = rte_zmalloc_socket(NULL,
171 test_data->input_data_sz, 0,
173 if (test_data->decompressed_data == NULL) {
174 RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
175 "file could not be allocated\n");
179 test_data->comp_bufs = rte_zmalloc_socket(NULL,
180 test_data->total_bufs * sizeof(struct rte_mbuf *),
182 if (test_data->comp_bufs == NULL) {
183 RTE_LOG(ERR, USER1, "Memory to hold the compression mbufs"
184 " could not be allocated\n");
188 test_data->decomp_bufs = rte_zmalloc_socket(NULL,
189 test_data->total_bufs * sizeof(struct rte_mbuf *),
191 if (test_data->decomp_bufs == NULL) {
192 RTE_LOG(ERR, USER1, "Memory to hold the decompression mbufs"
193 " could not be allocated\n");
200 comp_perf_dump_input_data(struct comp_test_data *test_data)
202 FILE *f = fopen(test_data->input_file, "r");
206 RTE_LOG(ERR, USER1, "Input file could not be opened\n");
210 if (fseek(f, 0, SEEK_END) != 0) {
211 RTE_LOG(ERR, USER1, "Size of input could not be calculated\n");
214 size_t actual_file_sz = ftell(f);
215 /* If extended input data size has not been set,
216 * input data size = file size
219 if (test_data->input_data_sz == 0)
220 test_data->input_data_sz = actual_file_sz;
222 if (fseek(f, 0, SEEK_SET) != 0) {
223 RTE_LOG(ERR, USER1, "Size of input could not be calculated\n");
227 test_data->input_data = rte_zmalloc_socket(NULL,
228 test_data->input_data_sz, 0, rte_socket_id());
230 if (test_data->input_data == NULL) {
231 RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
232 "file could not be allocated\n");
236 size_t remaining_data = test_data->input_data_sz;
237 uint8_t *data = test_data->input_data;
239 while (remaining_data > 0) {
240 size_t data_to_read = RTE_MIN(remaining_data, actual_file_sz);
242 if (fread(data, data_to_read, 1, f) != 1) {
243 RTE_LOG(ERR, USER1, "Input file could not be read\n");
246 if (fseek(f, 0, SEEK_SET) != 0) {
248 "Size of input could not be calculated\n");
251 remaining_data -= data_to_read;
252 data += data_to_read;
255 if (test_data->input_data_sz > actual_file_sz)
257 "%zu bytes read from file %s, extending the file %.2f times\n",
258 test_data->input_data_sz, test_data->input_file,
259 (double)test_data->input_data_sz/actual_file_sz);
262 "%zu bytes read from file %s\n",
263 test_data->input_data_sz, test_data->input_file);
273 comp_perf_initialize_compressdev(struct comp_test_data *test_data)
275 uint8_t enabled_cdev_count;
276 uint8_t enabled_cdevs[RTE_COMPRESS_MAX_DEVS];
278 enabled_cdev_count = rte_compressdev_devices_get(test_data->driver_name,
279 enabled_cdevs, RTE_COMPRESS_MAX_DEVS);
280 if (enabled_cdev_count == 0) {
281 RTE_LOG(ERR, USER1, "No compress devices type %s available\n",
282 test_data->driver_name);
286 if (enabled_cdev_count > 1)
288 "Only the first compress device will be used\n");
290 test_data->cdev_id = enabled_cdevs[0];
292 if (comp_perf_check_capabilities(test_data) < 0)
295 /* Configure compressdev (one device, one queue pair) */
296 struct rte_compressdev_config config = {
297 .socket_id = rte_socket_id(),
299 .max_nb_priv_xforms = NUM_MAX_XFORMS,
303 if (rte_compressdev_configure(test_data->cdev_id, &config) < 0) {
304 RTE_LOG(ERR, USER1, "Device configuration failed\n");
308 if (rte_compressdev_queue_pair_setup(test_data->cdev_id, 0,
309 NUM_MAX_INFLIGHT_OPS, rte_socket_id()) < 0) {
310 RTE_LOG(ERR, USER1, "Queue pair setup failed\n");
314 if (rte_compressdev_start(test_data->cdev_id) < 0) {
315 RTE_LOG(ERR, USER1, "Device could not be started\n");
323 prepare_bufs(struct comp_test_data *test_data)
325 uint32_t remaining_data = test_data->input_data_sz;
326 uint8_t *input_data_ptr = test_data->input_data;
331 for (i = 0; i < test_data->total_bufs; i++) {
332 /* Allocate data in input mbuf and copy data from input file */
333 test_data->decomp_bufs[i] =
334 rte_pktmbuf_alloc(test_data->decomp_buf_pool);
335 if (test_data->decomp_bufs[i] == NULL) {
336 RTE_LOG(ERR, USER1, "Could not allocate mbuf\n");
340 cleanup = ST_PREPARE_BUF;
341 data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
342 data_addr = (uint8_t *) rte_pktmbuf_append(
343 test_data->decomp_bufs[i], data_sz);
344 if (data_addr == NULL) {
345 RTE_LOG(ERR, USER1, "Could not append data\n");
348 rte_memcpy(data_addr, input_data_ptr, data_sz);
350 input_data_ptr += data_sz;
351 remaining_data -= data_sz;
353 /* Already one segment in the mbuf */
354 uint16_t segs_per_mbuf = 1;
356 /* Chain mbufs if needed for input mbufs */
357 while (segs_per_mbuf < test_data->max_sgl_segs
358 && remaining_data > 0) {
359 struct rte_mbuf *next_seg =
360 rte_pktmbuf_alloc(test_data->decomp_buf_pool);
362 if (next_seg == NULL) {
364 "Could not allocate mbuf\n");
368 data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
369 data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
372 if (data_addr == NULL) {
373 RTE_LOG(ERR, USER1, "Could not append data\n");
377 rte_memcpy(data_addr, input_data_ptr, data_sz);
378 input_data_ptr += data_sz;
379 remaining_data -= data_sz;
381 if (rte_pktmbuf_chain(test_data->decomp_bufs[i],
383 RTE_LOG(ERR, USER1, "Could not chain mbufs\n");
389 /* Allocate data in output mbuf */
390 test_data->comp_bufs[i] =
391 rte_pktmbuf_alloc(test_data->comp_buf_pool);
392 if (test_data->comp_bufs[i] == NULL) {
393 RTE_LOG(ERR, USER1, "Could not allocate mbuf\n");
396 data_addr = (uint8_t *) rte_pktmbuf_append(
397 test_data->comp_bufs[i],
399 if (data_addr == NULL) {
400 RTE_LOG(ERR, USER1, "Could not append data\n");
404 /* Chain mbufs if needed for output mbufs */
405 for (j = 1; j < segs_per_mbuf; j++) {
406 struct rte_mbuf *next_seg =
407 rte_pktmbuf_alloc(test_data->comp_buf_pool);
409 if (next_seg == NULL) {
411 "Could not allocate mbuf\n");
415 data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
418 if (data_addr == NULL) {
419 RTE_LOG(ERR, USER1, "Could not append data\n");
423 if (rte_pktmbuf_chain(test_data->comp_bufs[i],
425 RTE_LOG(ERR, USER1, "Could not chain mbufs\n");
435 free_bufs(struct comp_test_data *test_data)
439 for (i = 0; i < test_data->total_bufs; i++) {
440 rte_pktmbuf_free(test_data->comp_bufs[i]);
441 rte_pktmbuf_free(test_data->decomp_bufs[i]);
446 main_loop(struct comp_test_data *test_data, uint8_t level,
447 enum rte_comp_xform_type type,
448 uint8_t *output_data_ptr,
449 size_t *output_data_sz,
450 unsigned int benchmarking)
452 uint8_t dev_id = test_data->cdev_id;
453 uint32_t i, iter, num_iter;
454 struct rte_comp_op **ops, **deq_ops;
455 void *priv_xform = NULL;
456 struct rte_comp_xform xform;
457 size_t output_size = 0;
458 struct rte_mbuf **input_bufs, **output_bufs;
462 if (test_data == NULL || !test_data->burst_sz) {
464 "Unknown burst size\n");
468 ops = rte_zmalloc_socket(NULL,
469 2 * test_data->total_bufs * sizeof(struct rte_comp_op *),
474 "Can't allocate memory for ops strucures\n");
478 deq_ops = &ops[test_data->total_bufs];
480 if (type == RTE_COMP_COMPRESS) {
481 xform = (struct rte_comp_xform) {
482 .type = RTE_COMP_COMPRESS,
484 .algo = RTE_COMP_ALGO_DEFLATE,
485 .deflate.huffman = test_data->huffman_enc,
487 .window_size = test_data->window_sz,
488 .chksum = RTE_COMP_CHECKSUM_NONE,
489 .hash_algo = RTE_COMP_HASH_ALGO_NONE
492 input_bufs = test_data->decomp_bufs;
493 output_bufs = test_data->comp_bufs;
495 xform = (struct rte_comp_xform) {
496 .type = RTE_COMP_DECOMPRESS,
498 .algo = RTE_COMP_ALGO_DEFLATE,
499 .chksum = RTE_COMP_CHECKSUM_NONE,
500 .window_size = test_data->window_sz,
501 .hash_algo = RTE_COMP_HASH_ALGO_NONE
504 input_bufs = test_data->comp_bufs;
505 output_bufs = test_data->decomp_bufs;
508 /* Create private xform */
509 if (rte_compressdev_private_xform_create(dev_id, &xform,
511 RTE_LOG(ERR, USER1, "Private xform could not be created\n");
516 uint64_t tsc_start, tsc_end, tsc_duration;
518 tsc_start = tsc_end = tsc_duration = 0;
520 tsc_start = rte_rdtsc();
521 num_iter = test_data->num_iter;
525 for (iter = 0; iter < num_iter; iter++) {
526 uint32_t total_ops = test_data->total_bufs;
527 uint32_t remaining_ops = test_data->total_bufs;
528 uint32_t total_deq_ops = 0;
529 uint32_t total_enq_ops = 0;
530 uint16_t ops_unused = 0;
531 uint16_t num_enq = 0;
532 uint16_t num_deq = 0;
536 while (remaining_ops > 0) {
537 uint16_t num_ops = RTE_MIN(remaining_ops,
538 test_data->burst_sz);
539 uint16_t ops_needed = num_ops - ops_unused;
542 * Move the unused operations from the previous
543 * enqueue_burst call to the front, to maintain order
545 if ((ops_unused > 0) && (num_enq > 0)) {
547 ops_unused * sizeof(struct rte_comp_op *);
549 memmove(ops, &ops[num_enq], nb_b_to_mov);
552 /* Allocate compression operations */
553 if (ops_needed && !rte_comp_op_bulk_alloc(
558 "Could not allocate enough operations\n");
562 allocated += ops_needed;
564 for (i = 0; i < ops_needed; i++) {
566 * Calculate next buffer to attach to operation
568 uint32_t buf_id = total_enq_ops + i +
570 uint16_t op_id = ops_unused + i;
571 /* Reset all data in output buffers */
572 struct rte_mbuf *m = output_bufs[buf_id];
574 m->pkt_len = test_data->seg_sz * m->nb_segs;
576 m->data_len = m->buf_len - m->data_off;
579 ops[op_id]->m_src = input_bufs[buf_id];
580 ops[op_id]->m_dst = output_bufs[buf_id];
581 ops[op_id]->src.offset = 0;
582 ops[op_id]->src.length =
583 rte_pktmbuf_pkt_len(input_bufs[buf_id]);
584 ops[op_id]->dst.offset = 0;
585 ops[op_id]->flush_flag = RTE_COMP_FLUSH_FINAL;
586 ops[op_id]->input_chksum = buf_id;
587 ops[op_id]->private_xform = priv_xform;
590 num_enq = rte_compressdev_enqueue_burst(dev_id, 0, ops,
592 ops_unused = num_ops - num_enq;
593 remaining_ops -= num_enq;
594 total_enq_ops += num_enq;
596 num_deq = rte_compressdev_dequeue_burst(dev_id, 0,
598 test_data->burst_sz);
599 total_deq_ops += num_deq;
600 if (benchmarking == 0) {
601 for (i = 0; i < num_deq; i++) {
602 struct rte_comp_op *op = deq_ops[i];
603 const void *read_data_addr =
604 rte_pktmbuf_read(op->m_dst, 0,
605 op->produced, output_data_ptr);
606 if (read_data_addr == NULL) {
608 "Could not copy buffer in destination\n");
613 if (read_data_addr != output_data_ptr)
614 rte_memcpy(output_data_ptr,
616 op->m_dst, uint8_t *),
618 output_data_ptr += op->produced;
619 output_size += op->produced;
624 if (iter == num_iter - 1) {
625 for (i = 0; i < num_deq; i++) {
626 struct rte_comp_op *op = deq_ops[i];
627 struct rte_mbuf *m = op->m_dst;
629 m->pkt_len = op->produced;
630 uint32_t remaining_data = op->produced;
631 uint16_t data_to_append;
633 while (remaining_data > 0) {
635 RTE_MIN(remaining_data,
637 m->data_len = data_to_append;
644 rte_mempool_put_bulk(test_data->op_pool,
645 (void **)deq_ops, num_deq);
646 allocated -= num_deq;
649 /* Dequeue the last operations */
650 while (total_deq_ops < total_ops) {
651 num_deq = rte_compressdev_dequeue_burst(dev_id, 0,
652 deq_ops, test_data->burst_sz);
653 total_deq_ops += num_deq;
654 if (benchmarking == 0) {
655 for (i = 0; i < num_deq; i++) {
656 struct rte_comp_op *op = deq_ops[i];
657 const void *read_data_addr =
658 rte_pktmbuf_read(op->m_dst,
662 if (read_data_addr == NULL) {
664 "Could not copy buffer in destination\n");
669 if (read_data_addr != output_data_ptr)
670 rte_memcpy(output_data_ptr,
672 op->m_dst, uint8_t *),
674 output_data_ptr += op->produced;
675 output_size += op->produced;
680 if (iter == num_iter - 1) {
681 for (i = 0; i < num_deq; i++) {
682 struct rte_comp_op *op = deq_ops[i];
683 struct rte_mbuf *m = op->m_dst;
685 m->pkt_len = op->produced;
686 uint32_t remaining_data = op->produced;
687 uint16_t data_to_append;
689 while (remaining_data > 0) {
691 RTE_MIN(remaining_data,
693 m->data_len = data_to_append;
700 rte_mempool_put_bulk(test_data->op_pool,
701 (void **)deq_ops, num_deq);
702 allocated -= num_deq;
707 tsc_end = rte_rdtsc();
708 tsc_duration = tsc_end - tsc_start;
710 if (type == RTE_COMP_COMPRESS)
711 test_data->comp_tsc_duration[level] =
712 tsc_duration / num_iter;
714 test_data->decomp_tsc_duration[level] =
715 tsc_duration / num_iter;
718 if (benchmarking == 0 && output_data_sz)
719 *output_data_sz = output_size;
721 rte_mempool_put_bulk(test_data->op_pool, (void **)ops, allocated);
722 rte_compressdev_private_xform_free(dev_id, priv_xform);
728 main(int argc, char **argv)
730 uint8_t level, level_idx = 0;
732 struct comp_test_data *test_data;
734 /* Initialise DPDK EAL */
735 ret = rte_eal_init(argc, argv);
737 rte_exit(EXIT_FAILURE, "Invalid EAL arguments!\n");
741 test_data = rte_zmalloc_socket(NULL, sizeof(struct comp_test_data),
744 if (test_data == NULL)
745 rte_exit(EXIT_FAILURE, "Cannot reserve memory in socket %d\n",
748 cleanup = ST_TEST_DATA;
749 comp_perf_options_default(test_data);
751 if (comp_perf_options_parse(test_data, argc, argv) < 0) {
753 "Parsing one or more user options failed\n");
758 if (comp_perf_options_check(test_data) < 0) {
763 if (comp_perf_initialize_compressdev(test_data) < 0) {
768 cleanup = ST_COMPDEV;
769 if (comp_perf_dump_input_data(test_data) < 0) {
774 cleanup = ST_INPUT_DATA;
775 if (comp_perf_allocate_memory(test_data) < 0) {
780 if (prepare_bufs(test_data) < 0) {
785 if (test_data->level.inc != 0)
786 level = test_data->level.min;
788 level = test_data->level.list[0];
791 size_t decomp_data_sz;
793 printf("Burst size = %u\n", test_data->burst_sz);
794 printf("File size = %zu\n", test_data->input_data_sz);
796 printf("%6s%12s%17s%19s%21s%15s%21s%23s%16s\n",
797 "Level", "Comp size", "Comp ratio [%]",
798 "Comp [Cycles/it]", "Comp [Cycles/Byte]", "Comp [Gbps]",
799 "Decomp [Cycles/it]", "Decomp [Cycles/Byte]", "Decomp [Gbps]");
801 cleanup = ST_DURING_TEST;
802 while (level <= test_data->level.max) {
804 * Run a first iteration, to verify compression and
805 * get the compression ratio for the level
807 if (main_loop(test_data, level, RTE_COMP_COMPRESS,
808 test_data->compressed_data,
809 &comp_data_sz, 0) < 0) {
814 if (main_loop(test_data, level, RTE_COMP_DECOMPRESS,
815 test_data->decompressed_data,
816 &decomp_data_sz, 0) < 0) {
821 if (decomp_data_sz != test_data->input_data_sz) {
823 "Decompressed data length not equal to input data length\n");
825 "Decompressed size = %zu, expected = %zu\n",
826 decomp_data_sz, test_data->input_data_sz);
830 if (memcmp(test_data->decompressed_data,
831 test_data->input_data,
832 test_data->input_data_sz) != 0) {
834 "Decompressed data is not the same as file data\n");
840 double ratio = (double) comp_data_sz /
841 test_data->input_data_sz * 100;
844 * Run the tests twice, discarding the first performance
845 * results, before the cache is warmed up
847 for (i = 0; i < 2; i++) {
848 if (main_loop(test_data, level, RTE_COMP_COMPRESS,
849 NULL, NULL, 1) < 0) {
855 for (i = 0; i < 2; i++) {
856 if (main_loop(test_data, level, RTE_COMP_DECOMPRESS,
857 NULL, NULL, 1) < 0) {
863 uint64_t comp_tsc_duration =
864 test_data->comp_tsc_duration[level];
865 double comp_tsc_byte = (double)comp_tsc_duration /
866 test_data->input_data_sz;
867 double comp_gbps = rte_get_tsc_hz() / comp_tsc_byte * 8 /
869 uint64_t decomp_tsc_duration =
870 test_data->decomp_tsc_duration[level];
871 double decomp_tsc_byte = (double)decomp_tsc_duration /
872 test_data->input_data_sz;
873 double decomp_gbps = rte_get_tsc_hz() / decomp_tsc_byte * 8 /
876 printf("%6u%12zu%17.2f%19"PRIu64"%21.2f"
877 "%15.2f%21"PRIu64"%23.2f%16.2f\n",
878 level, comp_data_sz, ratio, comp_tsc_duration,
879 comp_tsc_byte, comp_gbps, decomp_tsc_duration,
880 decomp_tsc_byte, decomp_gbps);
882 if (test_data->level.inc != 0)
883 level += test_data->level.inc;
885 if (++level_idx == test_data->level.count)
887 level = test_data->level.list[level_idx];
898 free_bufs(test_data);
900 case ST_MEMORY_ALLOC:
901 rte_free(test_data->decomp_bufs);
902 rte_free(test_data->comp_bufs);
903 rte_free(test_data->decompressed_data);
904 rte_free(test_data->compressed_data);
905 rte_mempool_free(test_data->op_pool);
906 rte_mempool_free(test_data->decomp_buf_pool);
907 rte_mempool_free(test_data->comp_buf_pool);
910 rte_free(test_data->input_data);
913 if (test_data->cdev_id != -1)
914 rte_compressdev_stop(test_data->cdev_id);
921 i = rte_eal_cleanup();
924 "Error from rte_eal_cleanup(), %d\n", i);