git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/test: rework command registration
[dpdk.git]
/
app
/
test
/
test_distributor.c
diff --git
a/app/test/test_distributor.c
b/app/test/test_distributor.c
index
ad46987
..
85cb8f3
100644
(file)
--- a/
app/test/test_distributor.c
+++ b/
app/test/test_distributor.c
@@
-37,6
+37,8
@@
#include <string.h>
#include <rte_cycles.h>
#include <rte_errno.h>
#include <string.h>
#include <rte_cycles.h>
#include <rte_errno.h>
+#include <rte_mempool.h>
+#include <rte_mbuf.h>
#include <rte_distributor.h>
#define ITER_POWER 20 /* log 2 of how many iterations we do when timing. */
#include <rte_distributor.h>
#define ITER_POWER 20 /* log 2 of how many iterations we do when timing. */
@@
-500,8
+502,6
@@
quit_workers(struct rte_distributor *d, struct rte_mempool *p)
worker_idx = 0;
}
worker_idx = 0;
}
-#define MBUF_DATA_SIZE (2048 + RTE_PKTMBUF_HEADROOM)
-
static int
test_distributor(void)
{
static int
test_distributor(void)
{
@@
-529,7
+529,7
@@
test_distributor(void)
(BIG_BATCH * 2) - 1 : (511 * rte_lcore_count());
if (p == NULL) {
p = rte_pktmbuf_pool_create("DT_MBUF_POOL", nb_bufs, BURST,
(BIG_BATCH * 2) - 1 : (511 * rte_lcore_count());
if (p == NULL) {
p = rte_pktmbuf_pool_create("DT_MBUF_POOL", nb_bufs, BURST,
- 0,
MBUF_DATA
_SIZE, rte_socket_id());
+ 0,
RTE_MBUF_DEFAULT_BUF
_SIZE, rte_socket_id());
if (p == NULL) {
printf("Error creating mempool\n");
return -1;
if (p == NULL) {
printf("Error creating mempool\n");
return -1;
@@
-576,8
+576,4
@@
err:
return -1;
}
return -1;
}
-static struct test_command distributor_cmd = {
- .command = "distributor_autotest",
- .callback = test_distributor,
-};
-REGISTER_TEST_COMMAND(distributor_cmd);
+REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);