remove version in all files
[dpdk.git] / app / test / test_mempool.c
1 /*-
2  *   BSD LICENSE
3  * 
4  *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
5  *   All rights reserved.
6  * 
7  *   Redistribution and use in source and binary forms, with or without 
8  *   modification, are permitted provided that the following conditions 
9  *   are met:
10  * 
11  *     * Redistributions of source code must retain the above copyright 
12  *       notice, this list of conditions and the following disclaimer.
13  *     * Redistributions in binary form must reproduce the above copyright 
14  *       notice, this list of conditions and the following disclaimer in 
15  *       the documentation and/or other materials provided with the 
16  *       distribution.
17  *     * Neither the name of Intel Corporation nor the names of its 
18  *       contributors may be used to endorse or promote products derived 
19  *       from this software without specific prior written permission.
20  * 
21  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
22  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
23  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
24  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
25  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
26  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
27  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
28  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
29  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
30  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
31  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  * 
33  */
34
35 #include <string.h>
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <stdint.h>
39 #include <inttypes.h>
40 #include <stdarg.h>
41 #include <errno.h>
42 #include <sys/queue.h>
43
44 #include <rte_common.h>
45 #include <rte_log.h>
46 #include <rte_debug.h>
47 #include <rte_memory.h>
48 #include <rte_memzone.h>
49 #include <rte_launch.h>
50 #include <rte_cycles.h>
51 #include <rte_tailq.h>
52 #include <rte_eal.h>
53 #include <rte_per_lcore.h>
54 #include <rte_lcore.h>
55 #include <rte_atomic.h>
56 #include <rte_branch_prediction.h>
57 #include <rte_ring.h>
58 #include <rte_mempool.h>
59 #include <rte_spinlock.h>
60 #include <rte_malloc.h>
61
62 #include <cmdline_parse.h>
63
64 #include "test.h"
65
66 /*
67  * Mempool
68  * =======
69  *
70  * #. Basic tests: done on one core with and without cache:
71  *
72  *    - Get one object, put one object
73  *    - Get two objects, put two objects
74  *    - Get all objects, test that their content is not modified and
75  *      put them back in the pool.
76  *
77  * #. Performance tests:
78  *
79  *    Each core get *n_keep* objects per bulk of *n_get_bulk*. Then,
80  *    objects are put back in the pool per bulk of *n_put_bulk*.
81  *
82  *    This sequence is done during TIME_S seconds.
83  *
84  *    This test is done on the following configurations:
85  *
86  *    - Cores configuration (*cores*)
87  *
88  *      - One core with cache
89  *      - Two cores with cache
90  *      - Max. cores with cache
91  *      - One core without cache
92  *      - Two cores without cache
93  *      - Max. cores without cache
94  *
95  *    - Bulk size (*n_get_bulk*, *n_put_bulk*)
96  *
97  *      - Bulk get from 1 to 32
98  *      - Bulk put from 1 to 32
99  *
100  *    - Number of kept objects (*n_keep*)
101  *
102  *      - 32
103  *      - 128
104  */
105
106 #define N 65536
107 #define TIME_S 5
108 #define MEMPOOL_ELT_SIZE 2048
109 #define MAX_KEEP 128
110 #define MEMPOOL_SIZE ((RTE_MAX_LCORE*(MAX_KEEP+RTE_MEMPOOL_CACHE_MAX_SIZE))-1)
111
112 static struct rte_mempool *mp;
113 static struct rte_mempool *mp_cache, *mp_nocache;
114
115 static rte_atomic32_t synchro;
116
117 /* number of objects in one bulk operation (get or put) */
118 static unsigned n_get_bulk;
119 static unsigned n_put_bulk;
120
121 /* number of objects retrived from mempool before putting them back */
122 static unsigned n_keep;
123
124 /* number of enqueues / dequeues */
125 struct mempool_test_stats {
126         unsigned enq_count;
127 } __rte_cache_aligned;
128
129 static struct mempool_test_stats stats[RTE_MAX_LCORE];
130
131 static int
132 per_lcore_mempool_test(__attribute__((unused)) void *arg)
133 {
134         void *obj_table[MAX_KEEP];
135         unsigned i, idx;
136         unsigned lcore_id = rte_lcore_id();
137         int ret;
138         uint64_t start_cycles, end_cycles;
139         uint64_t time_diff = 0, hz = rte_get_hpet_hz();
140
141         /* n_get_bulk and n_put_bulk must be divisors of n_keep */
142         if (((n_keep / n_get_bulk) * n_get_bulk) != n_keep)
143                 return -1;
144         if (((n_keep / n_put_bulk) * n_put_bulk) != n_keep)
145                 return -1;
146
147         stats[lcore_id].enq_count = 0;
148
149         /* wait synchro for slaves */
150         if (lcore_id != rte_get_master_lcore())
151                 while (rte_atomic32_read(&synchro) == 0);
152
153         start_cycles = rte_get_hpet_cycles();
154
155         while (time_diff/hz < TIME_S) {
156                 for (i = 0; likely(i < (N/n_keep)); i++) {
157                         /* get n_keep objects by bulk of n_bulk */
158                         idx = 0;
159                         while (idx < n_keep) {
160                                 ret = rte_mempool_get_bulk(mp, &obj_table[idx],
161                                                            n_get_bulk);
162                                 if (unlikely(ret < 0)) {
163                                         rte_mempool_dump(mp);
164                                         rte_ring_dump(mp->ring);
165                                         /* in this case, objects are lost... */
166                                         return -1;
167                                 }
168                                 idx += n_get_bulk;
169                         }
170
171                         /* put the objects back */
172                         idx = 0;
173                         while (idx < n_keep) {
174                                 rte_mempool_put_bulk(mp, &obj_table[idx],
175                                                      n_put_bulk);
176                                 idx += n_put_bulk;
177                         }
178                 }
179                 end_cycles = rte_get_hpet_cycles();
180                 time_diff = end_cycles - start_cycles;
181                 stats[lcore_id].enq_count += N;
182         }
183
184         return 0;
185 }
186
187 /* launch all the per-lcore test, and display the result */
188 static int
189 launch_cores(unsigned cores)
190 {
191         unsigned lcore_id;
192         unsigned rate;
193         int ret;
194         unsigned cores_save = cores;
195
196         rte_atomic32_set(&synchro, 0);
197
198         /* reset stats */
199         memset(stats, 0, sizeof(stats));
200
201         printf("mempool_autotest cache=%u cores=%u n_get_bulk=%u "
202                "n_put_bulk=%u n_keep=%u ",
203                (unsigned) mp->cache_size, cores, n_get_bulk, n_put_bulk, n_keep);
204
205         if (rte_mempool_count(mp) != MEMPOOL_SIZE) {
206                 printf("mempool is not full\n");
207                 return -1;
208         }
209
210         RTE_LCORE_FOREACH_SLAVE(lcore_id) {
211                 if (cores == 1)
212                         break;
213                 cores--;
214                 rte_eal_remote_launch(per_lcore_mempool_test,
215                                       NULL, lcore_id);
216         }
217
218         /* start synchro and launch test on master */
219         rte_atomic32_set(&synchro, 1);
220
221         ret = per_lcore_mempool_test(NULL);
222
223         cores = cores_save;
224         RTE_LCORE_FOREACH_SLAVE(lcore_id) {
225                 if (cores == 1)
226                         break;
227                 cores--;
228                 if (rte_eal_wait_lcore(lcore_id) < 0)
229                         ret = -1;
230         }
231
232         if (ret < 0) {
233                 printf("per-lcore test returned -1\n");
234                 return -1;
235         }
236
237         rate = 0;
238         for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++)
239                 rate += (stats[lcore_id].enq_count / TIME_S);
240
241         printf("rate_persec=%u\n", rate);
242
243         return 0;
244 }
245
246 /* for a given number of core, launch all test cases */
247 static int
248 do_one_mempool_test(unsigned cores)
249 {
250         unsigned bulk_tab_get[] = { 1, 4, 32, 0 };
251         unsigned bulk_tab_put[] = { 1, 4, 32, 0 };
252         unsigned keep_tab[] = { 32, 128, 0 };
253         unsigned *get_bulk_ptr;
254         unsigned *put_bulk_ptr;
255         unsigned *keep_ptr;
256         int ret;
257
258         for (get_bulk_ptr = bulk_tab_get; *get_bulk_ptr; get_bulk_ptr++) {
259                 for (put_bulk_ptr = bulk_tab_put; *put_bulk_ptr; put_bulk_ptr++) {
260                         for (keep_ptr = keep_tab; *keep_ptr; keep_ptr++) {
261
262                                 n_get_bulk = *get_bulk_ptr;
263                                 n_put_bulk = *put_bulk_ptr;
264                                 n_keep = *keep_ptr;
265                                 ret = launch_cores(cores);
266
267                                 if (ret < 0)
268                                         return -1;
269                         }
270                 }
271         }
272         return 0;
273 }
274
275
276 /*
277  * save the object number in the first 4 bytes of object data. All
278  * other bytes are set to 0.
279  */
280 static void
281 my_obj_init(struct rte_mempool *mp, __attribute__((unused)) void *arg,
282             void *obj, unsigned i)
283 {
284         uint32_t *objnum = obj;
285         memset(obj, 0, mp->elt_size);
286         *objnum = i;
287 }
288
289 /* basic tests (done on one core) */
290 static int
291 test_mempool_basic(void)
292 {
293         uint32_t *objnum;
294         void **objtable;
295         void *obj, *obj2;
296         char *obj_data;
297         int ret = 0;
298         unsigned i, j;
299         unsigned old_bulk_count;
300
301         /* dump the mempool status */
302         rte_mempool_dump(mp);
303         old_bulk_count = rte_mempool_get_bulk_count(mp);
304         rte_mempool_dump(mp);
305         if (rte_mempool_set_bulk_count(mp, 0) == 0)
306                 return -1;
307         if (rte_mempool_get_bulk_count(mp) == 0)
308                 return -1;
309         if (rte_mempool_set_bulk_count(mp, 2) < 0)
310                 return -1;
311         if (rte_mempool_get_bulk_count(mp) != 2)
312                 return -1;
313         rte_mempool_dump(mp);
314         if (rte_mempool_set_bulk_count(mp, old_bulk_count) < 0)
315                 return -1;
316         if (rte_mempool_get_bulk_count(mp) != old_bulk_count)
317                 return -1;
318         rte_mempool_dump(mp);
319
320         printf("get an object\n");
321         if (rte_mempool_get(mp, &obj) < 0)
322                 return -1;
323         rte_mempool_dump(mp);
324
325         printf("put the object back\n");
326         rte_mempool_put(mp, obj);
327         rte_mempool_dump(mp);
328
329         printf("get 2 objects\n");
330         if (rte_mempool_get(mp, &obj) < 0)
331                 return -1;
332         if (rte_mempool_get(mp, &obj2) < 0) {
333                 rte_mempool_put(mp, obj);
334                 return -1;
335         }
336         rte_mempool_dump(mp);
337
338         printf("put the objects back\n");
339         rte_mempool_put(mp, obj);
340         rte_mempool_put(mp, obj2);
341         rte_mempool_dump(mp);
342
343         /*
344          * get many objects: we cannot get them all because the cache
345          * on other cores may not be empty.
346          */
347         objtable = malloc(MEMPOOL_SIZE * sizeof(void *));
348         if (objtable == NULL) {
349                 return -1;
350         }
351
352         for (i=0; i<MEMPOOL_SIZE; i++) {
353                 if (rte_mempool_get(mp, &objtable[i]) < 0)
354                         break;
355         }
356
357         /*
358          * for each object, check that its content was not modified,
359          * and put objects back in pool
360          */
361         while (i--) {
362                 obj = objtable[i];
363                 obj_data = obj;
364                 objnum = obj;
365                 if (*objnum > MEMPOOL_SIZE) {
366                         printf("bad object number\n");
367                         ret = -1;
368                         break;
369                 }
370                 for (j=sizeof(*objnum); j<mp->elt_size; j++) {
371                         if (obj_data[j] != 0)
372                                 ret = -1;
373                 }
374
375                 rte_mempool_put(mp, objtable[i]);
376         }
377
378         free(objtable);
379         if (ret == -1)
380                 printf("objects were modified!\n");
381
382         return ret;
383 }
384
385 static int test_mempool_creation_with_exceeded_cache_size(void)
386 {
387         struct rte_mempool *mp_cov;
388
389         mp_cov = rte_mempool_create("test_mempool_creation_with_exceeded_cache_size", MEMPOOL_SIZE,
390                                               MEMPOOL_ELT_SIZE,
391                                               RTE_MEMPOOL_CACHE_MAX_SIZE + 32, 0,
392                                               NULL, NULL,
393                                               my_obj_init, NULL,
394                                               SOCKET_ID_ANY, 0);
395         if(NULL != mp_cov) {
396                 return -1;
397         }
398
399         return 0;
400 }
401
402 static struct rte_mempool *mp_spsc;
403 static rte_spinlock_t scsp_spinlock;
404 static void *scsp_obj_table[MAX_KEEP];
405
406 /*
407  * single producer function
408  */
409 static int test_mempool_single_producer(void)
410 {
411         unsigned int i;
412         void *obj = NULL;
413         uint64_t start_cycles, end_cycles;
414         uint64_t duration = rte_get_hpet_hz() * 8;
415
416         start_cycles = rte_get_hpet_cycles();
417         while (1) {
418                 end_cycles = rte_get_hpet_cycles();
419                 /* duration uses up, stop producing */
420                 if (start_cycles + duration < end_cycles)
421                         break;
422                 rte_spinlock_lock(&scsp_spinlock);
423                 for (i = 0; i < MAX_KEEP; i ++) {
424                         if (NULL != scsp_obj_table[i])
425                                 obj = scsp_obj_table[i];
426                                 break;
427                 }
428                 rte_spinlock_unlock(&scsp_spinlock);
429                 if (i >= MAX_KEEP) {
430                         continue;
431                 }
432                 if (rte_mempool_from_obj(obj) != mp_spsc) {
433                         printf("test_mempool_single_producer there is an obj not owned by this mempool\n");
434                         return -1;
435                 }
436                 rte_mempool_sp_put(mp_spsc, obj);
437                 rte_spinlock_lock(&scsp_spinlock);
438                 scsp_obj_table[i] = NULL;
439                 rte_spinlock_unlock(&scsp_spinlock);
440         }
441
442         return 0;
443 }
444
445 /*
446  * single consumer function
447  */
448 static int test_mempool_single_consumer(void)
449 {
450         unsigned int i;
451         void * obj;
452         uint64_t start_cycles, end_cycles;
453         uint64_t duration = rte_get_hpet_hz() * 5;
454
455         start_cycles = rte_get_hpet_cycles();
456         while (1) {
457                 end_cycles = rte_get_hpet_cycles();
458                 /* duration uses up, stop consuming */
459                 if (start_cycles + duration < end_cycles)
460                         break;
461                 rte_spinlock_lock(&scsp_spinlock);
462                 for (i = 0; i < MAX_KEEP; i ++) {
463                         if (NULL == scsp_obj_table[i])
464                                 break;
465                 }
466                 rte_spinlock_unlock(&scsp_spinlock);
467                 if (i >= MAX_KEEP)
468                         continue;
469                 if (rte_mempool_sc_get(mp_spsc, &obj) < 0)
470                         break;
471                 rte_spinlock_lock(&scsp_spinlock);
472                 scsp_obj_table[i] = obj;
473                 rte_spinlock_unlock(&scsp_spinlock);
474         }
475
476         return 0;
477 }
478
479 /*
480  * test function for mempool test based on singple consumer and single producer, can run on one lcore only
481  */
482 static int test_mempool_launch_single_consumer(__attribute__((unused)) void *arg)
483 {
484         return test_mempool_single_consumer();
485 }
486
487 static void my_mp_init(struct rte_mempool * mp, __attribute__((unused)) void * arg)
488 {
489         printf("mempool name is %s\n", mp->name);
490         /* nothing to be implemented here*/
491         return ;
492 }
493
494 /*
495  * it tests the mempool operations based on singple producer and single consumer
496  */
497 static int
498 test_mempool_sp_sc(void)
499 {
500         int ret = 0;
501         unsigned lcore_id = rte_lcore_id();
502         unsigned lcore_next;
503
504         /* create a mempool with single producer/consumer ring */
505         if (NULL == mp_spsc) {
506                 mp_spsc = rte_mempool_create("test_mempool_sp_sc", MEMPOOL_SIZE,
507                                                 MEMPOOL_ELT_SIZE, 0, 0,
508                                                 my_mp_init, NULL,
509                                                 my_obj_init, NULL,
510                                                 SOCKET_ID_ANY, MEMPOOL_F_NO_CACHE_ALIGN | MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET);
511                 if (NULL == mp_spsc) {
512                         return -1;
513                 }
514         }
515         if (rte_mempool_lookup("test_mempool_sp_sc") != mp_spsc) {
516                 printf("Cannot lookup mempool from its name\n");
517                 return -1;
518         }
519         lcore_next = rte_get_next_lcore(lcore_id, 0, 1);
520         if (RTE_MAX_LCORE <= lcore_next)
521                 return -1;
522         if (rte_eal_lcore_role(lcore_next) != ROLE_RTE)
523                 return -1;
524         rte_spinlock_init(&scsp_spinlock);
525         memset(scsp_obj_table, 0, sizeof(scsp_obj_table));
526         rte_eal_remote_launch(test_mempool_launch_single_consumer, NULL, lcore_next);
527         if(test_mempool_single_producer() < 0)
528                 ret = -1;
529
530         if(rte_eal_wait_lcore(lcore_next) < 0)
531                 ret = -1;
532
533         return ret;
534 }
535
536 /*
537  * it tests some more basic of mempool
538  */
539 static int
540 test_mempool_basic_ex(struct rte_mempool * mp)
541 {
542         unsigned i;
543         void **obj;
544         void *err_obj;
545         int ret = -1;
546
547         if (mp == NULL)
548                 return ret;
549
550         obj = (void **)rte_zmalloc("test_mempool_basic_ex", (MEMPOOL_SIZE * sizeof(void *)), 0);
551         if (obj == NULL) {
552                 printf("test_mempool_basic_ex fail to rte_malloc\n");
553                 return ret;
554         }
555         printf("test_mempool_basic_ex now mempool (%s) has %u free entries\n", mp->name, rte_mempool_free_count(mp));
556         if (rte_mempool_full(mp) != 1) {
557                 printf("test_mempool_basic_ex the mempool is not full but it should be\n");
558                 goto fail_mp_basic_ex;
559         }
560
561         for (i = 0; i < MEMPOOL_SIZE; i ++) {
562                 if (rte_mempool_mc_get(mp, &obj[i]) < 0) {
563                         printf("fail_mp_basic_ex fail to get mempool object for [%u]\n", i);
564                         goto fail_mp_basic_ex;
565                 }
566         }
567         if (rte_mempool_mc_get(mp, &err_obj) == 0) {
568                 printf("test_mempool_basic_ex get an impossible obj from mempool\n");
569                 goto fail_mp_basic_ex;
570         }
571         printf("number: %u\n", i);
572         if (rte_mempool_empty(mp) != 1) {
573                 printf("test_mempool_basic_ex the mempool is not empty but it should be\n");
574                 goto fail_mp_basic_ex;
575         }
576
577         for (i = 0; i < MEMPOOL_SIZE; i ++) {
578                 rte_mempool_mp_put(mp, obj[i]);
579         }
580         if (rte_mempool_full(mp) != 1) {
581                 printf("test_mempool_basic_ex the mempool is not full but it should be\n");
582                 goto fail_mp_basic_ex;
583         }
584
585         ret = 0;
586
587 fail_mp_basic_ex:
588         if (obj != NULL)
589                 rte_free((void *)obj);
590
591         return ret;
592 }
593
594 static int
595 test_mempool_same_name_twice_creation(void)
596 {
597         struct rte_mempool *mp_tc;
598
599         mp_tc = rte_mempool_create("test_mempool_same_name_twice_creation", MEMPOOL_SIZE,
600                                                 MEMPOOL_ELT_SIZE, 0, 0,
601                                                 NULL, NULL,
602                                                 NULL, NULL,
603                                                 SOCKET_ID_ANY, 0);
604         if (NULL == mp_tc)
605                 return -1;
606
607         mp_tc = rte_mempool_create("test_mempool_same_name_twice_creation", MEMPOOL_SIZE,
608                                                 MEMPOOL_ELT_SIZE, 0, 0,
609                                                 NULL, NULL,
610                                                 NULL, NULL,
611                                                 SOCKET_ID_ANY, 0);
612         if (NULL != mp_tc)
613                 return -1;
614
615         return 0;
616 }
617
618 int
619 test_mempool(void)
620 {
621         rte_atomic32_init(&synchro);
622
623         /* create a mempool (without cache) */
624         if (mp_nocache == NULL)
625                 mp_nocache = rte_mempool_create("test_nocache", MEMPOOL_SIZE,
626                                                 MEMPOOL_ELT_SIZE, 0, 0,
627                                                 NULL, NULL,
628                                                 my_obj_init, NULL,
629                                                 SOCKET_ID_ANY, 0);
630         if (mp_nocache == NULL)
631                 return -1;
632
633         /* create a mempool (with cache) */
634         if (mp_cache == NULL)
635                 mp_cache = rte_mempool_create("test_cache", MEMPOOL_SIZE,
636                                               MEMPOOL_ELT_SIZE,
637                                               RTE_MEMPOOL_CACHE_MAX_SIZE, 0,
638                                               NULL, NULL,
639                                               my_obj_init, NULL,
640                                               SOCKET_ID_ANY, 0);
641         if (mp_cache == NULL)
642                 return -1;
643
644
645         /* retrieve the mempool from its name */
646         if (rte_mempool_lookup("test_nocache") != mp_nocache) {
647                 printf("Cannot lookup mempool from its name\n");
648                 return -1;
649         }
650
651         rte_mempool_list_dump();
652
653         /* basic tests without cache */
654         mp = mp_nocache;
655         if (test_mempool_basic() < 0)
656                 return -1;
657
658         /* basic tests with cache */
659         mp = mp_cache;
660         if (test_mempool_basic() < 0)
661                 return -1;
662
663         /* more basic tests without cache */
664         if (test_mempool_basic_ex(mp_nocache) < 0)
665                 return -1;
666
667         /* performance test with 1, 2 and max cores */
668         printf("start performance test (without cache)\n");
669         mp = mp_nocache;
670
671         if (do_one_mempool_test(1) < 0)
672                 return -1;
673
674         if (do_one_mempool_test(2) < 0)
675                 return -1;
676
677         if (do_one_mempool_test(rte_lcore_count()) < 0)
678                 return -1;
679
680         /* performance test with 1, 2 and max cores */
681         printf("start performance test (with cache)\n");
682         mp = mp_cache;
683
684         if (do_one_mempool_test(1) < 0)
685                 return -1;
686
687         if (do_one_mempool_test(2) < 0)
688                 return -1;
689
690         if (do_one_mempool_test(rte_lcore_count()) < 0)
691                 return -1;
692
693         /* mempool operation test based on single producer and single comsumer */
694         if (test_mempool_sp_sc() < 0)
695                 return -1;
696
697         if (test_mempool_creation_with_exceeded_cache_size() < 0)
698                 return -1;
699
700         if (test_mempool_same_name_twice_creation() < 0)
701                 return -1;
702
703         rte_mempool_list_dump();
704
705         return 0;
706 }