X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_table.c;h=676dab23dc3171a2b78c1d911d8c06f74775949f;hb=98dd7ad4da568279811883b6434f67ef4ef67ed3;hp=970d15cdc65ecc955d715f5ad43b195ba88cd4f5;hpb=6f41fe75e2dd8dd38f7bea7b9501edd4f9b72fa5;p=dpdk.git diff --git a/app/test/test_table.c b/app/test/test_table.c index 970d15cdc6..676dab23dc 100644 --- a/app/test/test_table.c +++ b/app/test/test_table.c @@ -31,19 +31,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef RTE_LIBRTE_TABLE - -#include "test.h" - -int -test_table(void) -{ - return 0; -} - -#else - #include #include #include @@ -102,15 +89,10 @@ app_init_mbuf_pools(void) printf("Getting/Creating the mempool ...\n"); pool = rte_mempool_lookup("mempool"); if (!pool) { - pool = rte_mempool_create( + pool = rte_pktmbuf_pool_create( "mempool", POOL_SIZE, - POOL_BUFFER_SIZE, - POOL_CACHE_SIZE, - sizeof(struct rte_pktmbuf_pool_private), - rte_pktmbuf_pool_init, NULL, - rte_pktmbuf_init, NULL, - 0, + POOL_CACHE_SIZE, 0, POOL_BUFFER_SIZE, 0); if (pool == NULL) rte_panic("Cannot create mbuf pool\n"); @@ -156,7 +138,7 @@ app_init_rings(void) } -int +static int test_table(void) { int status, failures; @@ -210,11 +192,15 @@ test_table(void) #ifdef RTE_LIBRTE_ACL printf("\n\n\n\n************ACL tests************\n"); - if (test_table_ACL() < 0) + if (test_table_acl() < 0) return -1; #endif return 0; } -#endif +static struct test_command table_cmd = { + .command = "table_autotest", + .callback = test_table, +}; +REGISTER_TEST_COMMAND(table_cmd);