4 * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
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
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.
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.
41 #include <sys/queue.h>
43 #include <rte_common.h>
44 #include <rte_debug.h>
46 #include <rte_common.h>
47 #include <rte_memory.h>
48 #include <rte_memcpy.h>
49 #include <rte_memzone.h>
50 #include <rte_launch.h>
52 #include <rte_per_lcore.h>
53 #include <rte_lcore.h>
54 #include <rte_atomic.h>
55 #include <rte_branch_prediction.h>
57 #include <rte_mempool.h>
59 #include <rte_random.h>
60 #include <rte_cycles.h>
64 #define MBUF_SIZE 2048
66 #define MBUF_TEST_DATA_LEN 1464
67 #define MBUF_TEST_DATA_LEN2 50
68 #define MBUF_TEST_HDR1_LEN 20
69 #define MBUF_TEST_HDR2_LEN 30
70 #define MBUF_TEST_ALL_HDRS_LEN (MBUF_TEST_HDR1_LEN+MBUF_TEST_HDR2_LEN)
72 #define REFCNT_MAX_ITER 64
73 #define REFCNT_MAX_TIMEOUT 10
74 #define REFCNT_MAX_REF (RTE_MAX_LCORE)
75 #define REFCNT_MBUF_NUM 64
76 #define REFCNT_MBUF_SIZE (sizeof (struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
77 #define REFCNT_RING_SIZE (REFCNT_MBUF_NUM * REFCNT_MAX_REF)
79 #define MAKE_STRING(x) # x
81 static struct rte_mempool *pktmbuf_pool = NULL;
83 #ifdef RTE_MBUF_REFCNT_ATOMIC
85 static struct rte_mempool *refcnt_pool = NULL;
86 static struct rte_ring *refcnt_mbuf_ring = NULL;
87 static volatile uint32_t refcnt_stop_slaves;
88 static unsigned refcnt_lcore[RTE_MAX_LCORE];
96 * #. Allocate a mbuf pool.
98 * - The pool contains NB_MBUF elements, where each mbuf is MBUF_SIZE
101 * #. Test multiple allocations of mbufs from this pool.
103 * - Allocate NB_MBUF and store pointers in a table.
104 * - If an allocation fails, return an error.
105 * - Free all these mbufs.
106 * - Repeat the same test to check that mbufs were freed correctly.
108 * #. Test data manipulation in pktmbuf.
111 * - Append data using rte_pktmbuf_append().
112 * - Test for error in rte_pktmbuf_append() when len is too large.
113 * - Trim data at the end of mbuf using rte_pktmbuf_trim().
114 * - Test for error in rte_pktmbuf_trim() when len is too large.
115 * - Prepend a header using rte_pktmbuf_prepend().
116 * - Test for error in rte_pktmbuf_prepend() when len is too large.
117 * - Remove data at the beginning of mbuf using rte_pktmbuf_adj().
118 * - Test for error in rte_pktmbuf_adj() when len is too large.
119 * - Check that appended data is not corrupt.
121 * - Between all these tests, check data_len and pkt_len, and
122 * that the mbuf is contiguous.
123 * - Repeat the test to check that allocation operations
124 * reinitialize the mbuf correctly.
128 #define GOTO_FAIL(str, ...) do { \
129 printf("mbuf test FAILED (l.%d): <" str ">\n", \
130 __LINE__, ##__VA_ARGS__); \
135 * test data manipulation in mbuf with non-ascii data
138 test_pktmbuf_with_non_ascii_data(void)
140 struct rte_mbuf *m = NULL;
143 m = rte_pktmbuf_alloc(pktmbuf_pool);
145 GOTO_FAIL("Cannot allocate mbuf");
146 if (rte_pktmbuf_pkt_len(m) != 0)
147 GOTO_FAIL("Bad length");
149 data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN);
151 GOTO_FAIL("Cannot append data");
152 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN)
153 GOTO_FAIL("Bad pkt length");
154 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN)
155 GOTO_FAIL("Bad data length");
156 memset(data, 0xff, rte_pktmbuf_pkt_len(m));
157 if (!rte_pktmbuf_is_contiguous(m))
158 GOTO_FAIL("Buffer should be continuous");
159 rte_pktmbuf_dump(stdout, m, MBUF_TEST_DATA_LEN);
173 * test data manipulation in mbuf
176 test_one_pktmbuf(void)
178 struct rte_mbuf *m = NULL;
179 char *data, *data2, *hdr;
182 printf("Test pktmbuf API\n");
186 m = rte_pktmbuf_alloc(pktmbuf_pool);
188 GOTO_FAIL("Cannot allocate mbuf");
189 if (rte_pktmbuf_pkt_len(m) != 0)
190 GOTO_FAIL("Bad length");
192 rte_pktmbuf_dump(stdout, m, 0);
196 data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN);
198 GOTO_FAIL("Cannot append data");
199 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN)
200 GOTO_FAIL("Bad pkt length");
201 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN)
202 GOTO_FAIL("Bad data length");
203 memset(data, 0x66, rte_pktmbuf_pkt_len(m));
204 if (!rte_pktmbuf_is_contiguous(m))
205 GOTO_FAIL("Buffer should be continuous");
206 rte_pktmbuf_dump(stdout, m, MBUF_TEST_DATA_LEN);
207 rte_pktmbuf_dump(stdout, m, 2*MBUF_TEST_DATA_LEN);
209 /* this append should fail */
211 data2 = rte_pktmbuf_append(m, (uint16_t)(rte_pktmbuf_tailroom(m) + 1));
213 GOTO_FAIL("Append should not succeed");
215 /* append some more data */
217 data2 = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
219 GOTO_FAIL("Cannot append data");
220 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_DATA_LEN2)
221 GOTO_FAIL("Bad pkt length");
222 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_DATA_LEN2)
223 GOTO_FAIL("Bad data length");
224 if (!rte_pktmbuf_is_contiguous(m))
225 GOTO_FAIL("Buffer should be continuous");
227 /* trim data at the end of mbuf */
229 if (rte_pktmbuf_trim(m, MBUF_TEST_DATA_LEN2) < 0)
230 GOTO_FAIL("Cannot trim data");
231 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN)
232 GOTO_FAIL("Bad pkt length");
233 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN)
234 GOTO_FAIL("Bad data length");
235 if (!rte_pktmbuf_is_contiguous(m))
236 GOTO_FAIL("Buffer should be continuous");
238 /* this trim should fail */
240 if (rte_pktmbuf_trim(m, (uint16_t)(rte_pktmbuf_data_len(m) + 1)) == 0)
241 GOTO_FAIL("trim should not succeed");
243 /* prepend one header */
245 hdr = rte_pktmbuf_prepend(m, MBUF_TEST_HDR1_LEN);
247 GOTO_FAIL("Cannot prepend");
248 if (data - hdr != MBUF_TEST_HDR1_LEN)
249 GOTO_FAIL("Prepend failed");
250 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_HDR1_LEN)
251 GOTO_FAIL("Bad pkt length");
252 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_HDR1_LEN)
253 GOTO_FAIL("Bad data length");
254 if (!rte_pktmbuf_is_contiguous(m))
255 GOTO_FAIL("Buffer should be continuous");
256 memset(hdr, 0x55, MBUF_TEST_HDR1_LEN);
258 /* prepend another header */
260 hdr = rte_pktmbuf_prepend(m, MBUF_TEST_HDR2_LEN);
262 GOTO_FAIL("Cannot prepend");
263 if (data - hdr != MBUF_TEST_ALL_HDRS_LEN)
264 GOTO_FAIL("Prepend failed");
265 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_ALL_HDRS_LEN)
266 GOTO_FAIL("Bad pkt length");
267 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN + MBUF_TEST_ALL_HDRS_LEN)
268 GOTO_FAIL("Bad data length");
269 if (!rte_pktmbuf_is_contiguous(m))
270 GOTO_FAIL("Buffer should be continuous");
271 memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
273 rte_mbuf_sanity_check(m, 1);
274 rte_mbuf_sanity_check(m, 0);
275 rte_pktmbuf_dump(stdout, m, 0);
277 /* this prepend should fail */
279 hdr = rte_pktmbuf_prepend(m, (uint16_t)(rte_pktmbuf_headroom(m) + 1));
281 GOTO_FAIL("prepend should not succeed");
283 /* remove data at beginning of mbuf (adj) */
285 if (data != rte_pktmbuf_adj(m, MBUF_TEST_ALL_HDRS_LEN))
286 GOTO_FAIL("rte_pktmbuf_adj failed");
287 if (rte_pktmbuf_pkt_len(m) != MBUF_TEST_DATA_LEN)
288 GOTO_FAIL("Bad pkt length");
289 if (rte_pktmbuf_data_len(m) != MBUF_TEST_DATA_LEN)
290 GOTO_FAIL("Bad data length");
291 if (!rte_pktmbuf_is_contiguous(m))
292 GOTO_FAIL("Buffer should be continuous");
294 /* this adj should fail */
296 if (rte_pktmbuf_adj(m, (uint16_t)(rte_pktmbuf_data_len(m) + 1)) != NULL)
297 GOTO_FAIL("rte_pktmbuf_adj should not succeed");
301 if (!rte_pktmbuf_is_contiguous(m))
302 GOTO_FAIL("Buffer should be continuous");
304 for (i=0; i<MBUF_TEST_DATA_LEN; i++) {
306 GOTO_FAIL("Data corrupted at offset %u", i);
322 testclone_testupdate_testdetach(void)
324 struct rte_mbuf *mc = NULL;
325 struct rte_mbuf *clone = NULL;
329 mc = rte_pktmbuf_alloc(pktmbuf_pool);
331 GOTO_FAIL("ooops not allocating mbuf");
333 if (rte_pktmbuf_pkt_len(mc) != 0)
334 GOTO_FAIL("Bad length");
337 /* clone the allocated mbuf */
338 clone = rte_pktmbuf_clone(mc, pktmbuf_pool);
340 GOTO_FAIL("cannot clone data\n");
341 rte_pktmbuf_free(clone);
343 mc->next = rte_pktmbuf_alloc(pktmbuf_pool);
345 GOTO_FAIL("Next Pkt Null\n");
347 clone = rte_pktmbuf_clone(mc, pktmbuf_pool);
349 GOTO_FAIL("cannot clone data\n");
352 rte_pktmbuf_free(mc);
353 rte_pktmbuf_free(clone);
360 rte_pktmbuf_free(mc);
368 * test allocation and free of mbufs
371 test_pktmbuf_pool(void)
374 struct rte_mbuf *m[NB_MBUF];
377 for (i=0; i<NB_MBUF; i++)
380 /* alloc NB_MBUF mbufs */
381 for (i=0; i<NB_MBUF; i++) {
382 m[i] = rte_pktmbuf_alloc(pktmbuf_pool);
384 printf("rte_pktmbuf_alloc() failed (%u)\n", i);
388 struct rte_mbuf *extra = NULL;
389 extra = rte_pktmbuf_alloc(pktmbuf_pool);
391 printf("Error pool not empty");
394 extra = rte_pktmbuf_clone(m[0], pktmbuf_pool);
396 printf("Error pool not empty");
400 for (i=0; i<NB_MBUF; i++) {
402 rte_pktmbuf_free(m[i]);
409 * test that the pointer to the data on a packet mbuf is set properly
412 test_pktmbuf_pool_ptr(void)
415 struct rte_mbuf *m[NB_MBUF];
418 for (i=0; i<NB_MBUF; i++)
421 /* alloc NB_MBUF mbufs */
422 for (i=0; i<NB_MBUF; i++) {
423 m[i] = rte_pktmbuf_alloc(pktmbuf_pool);
425 printf("rte_pktmbuf_alloc() failed (%u)\n", i);
428 m[i]->data_off += 64;
432 for (i=0; i<NB_MBUF; i++) {
434 rte_pktmbuf_free(m[i]);
437 for (i=0; i<NB_MBUF; i++)
440 /* alloc NB_MBUF mbufs */
441 for (i=0; i<NB_MBUF; i++) {
442 m[i] = rte_pktmbuf_alloc(pktmbuf_pool);
444 printf("rte_pktmbuf_alloc() failed (%u)\n", i);
447 if (m[i]->data_off != RTE_PKTMBUF_HEADROOM) {
448 printf("invalid data_off\n");
454 for (i=0; i<NB_MBUF; i++) {
456 rte_pktmbuf_free(m[i]);
463 test_pktmbuf_free_segment(void)
466 struct rte_mbuf *m[NB_MBUF];
469 for (i=0; i<NB_MBUF; i++)
472 /* alloc NB_MBUF mbufs */
473 for (i=0; i<NB_MBUF; i++) {
474 m[i] = rte_pktmbuf_alloc(pktmbuf_pool);
476 printf("rte_pktmbuf_alloc() failed (%u)\n", i);
482 for (i=0; i<NB_MBUF; i++) {
484 struct rte_mbuf *mb, *mt;
490 rte_pktmbuf_free_seg(mt);
499 * Stress test for rte_mbuf atomic refcnt.
500 * Implies that RTE_MBUF_REFCNT_ATOMIC is defined.
501 * For more efficency, recomended to run with RTE_LIBRTE_MBUF_DEBUG defined.
504 #ifdef RTE_MBUF_REFCNT_ATOMIC
507 test_refcnt_slave(__attribute__((unused)) void *arg)
509 unsigned lcore, free;
512 lcore = rte_lcore_id();
513 printf("%s started at lcore %u\n", __func__, lcore);
516 while (refcnt_stop_slaves == 0) {
517 if (rte_ring_dequeue(refcnt_mbuf_ring, &mp) == 0) {
519 rte_pktmbuf_free((struct rte_mbuf *)mp);
523 refcnt_lcore[lcore] += free;
524 printf("%s finished at lcore %u, "
525 "number of freed mbufs: %u\n",
526 __func__, lcore, free);
531 test_refcnt_iter(unsigned lcore, unsigned iter)
534 unsigned i, n, tref, wn;
539 /* For each mbuf in the pool:
541 * - increment it's reference up to N+1,
542 * - enqueue it N times into the ring for slave cores to free.
544 for (i = 0, n = rte_mempool_count(refcnt_pool);
545 i != n && (m = rte_pktmbuf_alloc(refcnt_pool)) != NULL;
547 ref = RTE_MAX(rte_rand() % REFCNT_MAX_REF, 1UL);
549 if ((ref & 1) != 0) {
550 rte_pktmbuf_refcnt_update(m, ref);
552 rte_ring_enqueue(refcnt_mbuf_ring, m);
555 rte_pktmbuf_refcnt_update(m, 1);
556 rte_ring_enqueue(refcnt_mbuf_ring, m);
563 rte_panic("(lcore=%u, iter=%u): was able to allocate only "
564 "%u from %u mbufs\n", lcore, iter, i, n);
566 /* wait till slave lcores will consume all mbufs */
567 while (!rte_ring_empty(refcnt_mbuf_ring))
570 /* check that all mbufs are back into mempool by now */
571 for (wn = 0; wn != REFCNT_MAX_TIMEOUT; wn++) {
572 if ((i = rte_mempool_count(refcnt_pool)) == n) {
573 refcnt_lcore[lcore] += tref;
574 printf("%s(lcore=%u, iter=%u) completed, "
575 "%u references processed\n",
576 __func__, lcore, iter, tref);
582 rte_panic("(lcore=%u, iter=%u): after %us only "
583 "%u of %u mbufs left free\n", lcore, iter, wn, i, n);
587 test_refcnt_master(void)
591 lcore = rte_lcore_id();
592 printf("%s started at lcore %u\n", __func__, lcore);
594 for (i = 0; i != REFCNT_MAX_ITER; i++)
595 test_refcnt_iter(lcore, i);
597 refcnt_stop_slaves = 1;
600 printf("%s finished at lcore %u\n", __func__, lcore);
607 test_refcnt_mbuf(void)
609 #ifdef RTE_MBUF_REFCNT_ATOMIC
611 unsigned lnum, master, slave, tref;
614 if ((lnum = rte_lcore_count()) == 1) {
615 printf("skipping %s, number of lcores: %u is not enough\n",
620 printf("starting %s, at %u lcores\n", __func__, lnum);
622 /* create refcnt pool & ring if they don't exist */
624 if (refcnt_pool == NULL &&
625 (refcnt_pool = rte_mempool_create(
626 MAKE_STRING(refcnt_pool),
627 REFCNT_MBUF_NUM, REFCNT_MBUF_SIZE, 0,
628 sizeof(struct rte_pktmbuf_pool_private),
629 rte_pktmbuf_pool_init, NULL, rte_pktmbuf_init, NULL,
630 SOCKET_ID_ANY, 0)) == NULL) {
631 printf("%s: cannot allocate " MAKE_STRING(refcnt_pool) "\n",
636 if (refcnt_mbuf_ring == NULL &&
637 (refcnt_mbuf_ring = rte_ring_create("refcnt_mbuf_ring",
638 REFCNT_RING_SIZE, SOCKET_ID_ANY,
639 RING_F_SP_ENQ)) == NULL) {
640 printf("%s: cannot allocate " MAKE_STRING(refcnt_mbuf_ring)
645 refcnt_stop_slaves = 0;
646 memset(refcnt_lcore, 0, sizeof (refcnt_lcore));
648 rte_eal_mp_remote_launch(test_refcnt_slave, NULL, SKIP_MASTER);
650 test_refcnt_master();
652 rte_eal_mp_wait_lcore();
654 /* check that we porcessed all references */
656 master = rte_get_master_lcore();
658 RTE_LCORE_FOREACH_SLAVE(slave)
659 tref += refcnt_lcore[slave];
661 if (tref != refcnt_lcore[master])
662 rte_panic("refernced mbufs: %u, freed mbufs: %u\n",
663 tref, refcnt_lcore[master]);
665 rte_mempool_dump(stdout, refcnt_pool);
666 rte_ring_dump(stdout, refcnt_mbuf_ring);
673 #include <sys/wait.h>
675 /* use fork() to test mbuf errors panic */
677 verify_mbuf_check_panics(struct rte_mbuf *buf)
685 rte_mbuf_sanity_check(buf, 1); /* should panic */
686 exit(0); /* return normally if it doesn't panic */
688 printf("Fork Failed\n");
699 test_failing_mbuf_sanity_check(void)
701 struct rte_mbuf *buf;
702 struct rte_mbuf badbuf;
704 printf("Checking rte_mbuf_sanity_check for failure conditions\n");
706 /* get a good mbuf to use to make copies */
707 buf = rte_pktmbuf_alloc(pktmbuf_pool);
710 printf("Checking good mbuf initially\n");
711 if (verify_mbuf_check_panics(buf) != -1)
714 printf("Now checking for error conditions\n");
716 if (verify_mbuf_check_panics(NULL)) {
717 printf("Error with NULL mbuf test\n");
723 if (verify_mbuf_check_panics(&badbuf)) {
724 printf("Error with bad-pool mbuf test\n");
729 badbuf.buf_physaddr = 0;
730 if (verify_mbuf_check_panics(&badbuf)) {
731 printf("Error with bad-physaddr mbuf test\n");
736 badbuf.buf_addr = NULL;
737 if (verify_mbuf_check_panics(&badbuf)) {
738 printf("Error with bad-addr mbuf test\n");
744 if (verify_mbuf_check_panics(&badbuf)) {
745 printf("Error with bad-refcnt(0) mbuf test\n");
750 badbuf.refcnt = UINT16_MAX;
751 if (verify_mbuf_check_panics(&badbuf)) {
752 printf("Error with bad-refcnt(MAX) mbuf test\n");
763 RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != RTE_CACHE_LINE_SIZE * 2);
765 /* create pktmbuf pool if it does not exist */
766 if (pktmbuf_pool == NULL) {
768 rte_mempool_create("test_pktmbuf_pool", NB_MBUF,
770 sizeof(struct rte_pktmbuf_pool_private),
771 rte_pktmbuf_pool_init, NULL,
772 rte_pktmbuf_init, NULL,
776 if (pktmbuf_pool == NULL) {
777 printf("cannot allocate mbuf pool\n");
781 /* test multiple mbuf alloc */
782 if (test_pktmbuf_pool() < 0) {
783 printf("test_mbuf_pool() failed\n");
787 /* do it another time to check that all mbufs were freed */
788 if (test_pktmbuf_pool() < 0) {
789 printf("test_mbuf_pool() failed (2)\n");
793 /* test that the pointer to the data on a packet mbuf is set properly */
794 if (test_pktmbuf_pool_ptr() < 0) {
795 printf("test_pktmbuf_pool_ptr() failed\n");
799 /* test data manipulation in mbuf */
800 if (test_one_pktmbuf() < 0) {
801 printf("test_one_mbuf() failed\n");
807 * do it another time, to check that allocation reinitialize
810 if (test_one_pktmbuf() < 0) {
811 printf("test_one_mbuf() failed (2)\n");
815 if (test_pktmbuf_with_non_ascii_data() < 0) {
816 printf("test_pktmbuf_with_non_ascii_data() failed\n");
820 /* test free pktmbuf segment one by one */
821 if (test_pktmbuf_free_segment() < 0) {
822 printf("test_pktmbuf_free_segment() failed.\n");
826 if (testclone_testupdate_testdetach()<0){
827 printf("testclone_and_testupdate() failed \n");
831 if (test_refcnt_mbuf()<0){
832 printf("test_refcnt_mbuf() failed \n");
836 if (test_failing_mbuf_sanity_check() < 0) {
837 printf("test_failing_mbuf_sanity_check() failed\n");
843 static struct test_command mbuf_cmd = {
844 .command = "mbuf_autotest",
845 .callback = test_mbuf,
847 REGISTER_TEST_COMMAND(mbuf_cmd);