devargs: remove limit on parameters length
[dpdk.git] / app / test / test_sched.c
index d9abb51..c957d80 100644 (file)
@@ -39,8 +39,6 @@
 
 #include "test.h"
 
-#if defined(RTE_LIBRTE_SCHED) && defined(RTE_ARCH_X86_64)
-
 #include <rte_cycles.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
@@ -147,15 +145,15 @@ prepare_pkt(struct rte_mbuf *mbuf)
        rte_sched_port_pkt_write(mbuf, SUBPORT, PIPE, TC, QUEUE, e_RTE_METER_YELLOW);
 
        /* 64 byte packet */
-       mbuf->pkt.pkt_len  = 60;
-       mbuf->pkt.data_len = 60;
+       mbuf->pkt_len  = 60;
+       mbuf->data_len = 60;
 }
 
 
 /**
  * test main entrance for library sched
  */
-int
+static int
 test_sched(void)
 {
        struct rte_mempool *mp = NULL;
@@ -229,12 +227,8 @@ test_sched(void)
        return 0;
 }
 
-#else /* RTE_LIBRTE_SCHED */
-
-int
-test_sched(void)
-{
-       printf("The Scheduler library is not included in this build\n");
-       return 0;
-}
-#endif /* RTE_LIBRTE_SCHED */
+static struct test_command sched_cmd = {
+       .command = "sched_autotest",
+       .callback = test_sched,
+};
+REGISTER_TEST_COMMAND(sched_cmd);