As poll queue type was renamed, update variable names and
documentation accordingly.

Signed-off-by: Petri Savolainen <[email protected]>
---
 test/performance/odp_l2fwd.c          | 30 +++++++++++++++---------------
 test/performance/odp_pktio_perf.c     | 22 +++++++++++-----------
 test/performance/odp_scheduling.c     | 16 ++++++++--------
 test/validation/pktio/pktio.c         | 12 ++++++------
 test/validation/pktio/pktio.h         |  4 ++--
 test/validation/queue/queue.c         | 28 ++++++++++++++--------------
 test/validation/scheduler/scheduler.c | 12 ++++++------
 7 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index a9e2777..7c3b3bf 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -58,7 +58,7 @@
  */
 typedef enum pkt_in_mode_t {
        DIRECT_RECV,
-       POLL_QUEUE,
+       PLAIN_QUEUE,
        SCHED_PARALLEL,
        SCHED_ATOMIC,
        SCHED_ORDERED,
@@ -337,11 +337,11 @@ static void *run_worker_sched_mode(void *arg)
 }
 
 /**
- * Packet IO worker thread using poll queues
+ * Packet IO worker thread using plain queues
  *
  * @param arg  thread arguments of type 'thread_args_t *'
  */
-static void *run_worker_poll_mode(void *arg)
+static void *run_worker_plain_queue_mode(void *arg)
 {
        int thr;
        int pkts;
@@ -360,7 +360,7 @@ static void *run_worker_poll_mode(void *arg)
        queue     = thr_args->pktio[pktio].rx_queue;
        pktout    = thr_args->pktio[pktio].pktout;
 
-       printf("[%02i] num pktios %i, POLL QUEUE mode\n", thr, num_pktio);
+       printf("[%02i] num pktios %i, PLAIN QUEUE mode\n", thr, num_pktio);
        odp_barrier_wait(&barrier);
 
        /* Loop packets */
@@ -541,7 +541,7 @@ static int create_pktio(const char *dev, int idx, int 
num_rx, int num_tx,
        if (gbl_args->appl.mode == DIRECT_RECV) {
                pktio_param.in_mode = ODP_PKTIN_MODE_DIRECT;
                pktio_param.out_mode = ODP_PKTOUT_MODE_DIRECT;
-       } else if (gbl_args->appl.mode == POLL_QUEUE) {
+       } else if (gbl_args->appl.mode == PLAIN_QUEUE) {
                pktio_param.in_mode = ODP_PKTIN_MODE_QUEUE;
                pktio_param.out_mode = ODP_PKTOUT_MODE_DIRECT;
        } else {
@@ -574,7 +574,7 @@ static int create_pktio(const char *dev, int idx, int 
num_rx, int num_tx,
        odp_pktio_output_queue_param_init(&out_queue_param);
 
        if (gbl_args->appl.mode == DIRECT_RECV ||
-           gbl_args->appl.mode == POLL_QUEUE) {
+           gbl_args->appl.mode == PLAIN_QUEUE) {
 
                if (num_tx > (int)capa.max_output_queues) {
                        printf("Sharing %i output queues between %i workers\n",
@@ -609,7 +609,7 @@ static int create_pktio(const char *dev, int idx, int 
num_rx, int num_tx,
                                        dev);
                                return -1;
                        }
-               } else { /* POLL QUEUE */
+               } else { /* PLAIN QUEUE */
                        if (odp_pktio_in_queues(pktio,
                                                gbl_args->pktios[idx].rx_queue,
                                                num_rx) != num_rx) {
@@ -955,7 +955,7 @@ static void usage(char *progname)
               "                  1: Receive packets through scheduler sync 
parallel queues\n"
               "                  2: Receive packets through scheduler sync 
atomic queues\n"
               "                  3: Receive packets through scheduler sync 
ordered queues\n"
-              "                  4: Receive packets through poll queues\n"
+              "                  4: Receive packets through plain queues\n"
               "  -c, --count <number> CPU count.\n"
               "  -t, --time  <number> Time in seconds to run.\n"
               "  -a, --accuracy <number> Time in seconds get print 
statistics\n"
@@ -1074,7 +1074,7 @@ static void parse_args(int argc, char *argv[], 
appl_args_t *appl_args)
                        else if (i == 3)
                                appl_args->mode = SCHED_ORDERED;
                        else if (i == 4)
-                               appl_args->mode = POLL_QUEUE;
+                               appl_args->mode = PLAIN_QUEUE;
                        else
                                appl_args->mode = DIRECT_RECV;
                        break;
@@ -1134,8 +1134,8 @@ static void print_info(char *progname, appl_args_t 
*appl_args)
               "Mode:            ");
        if (appl_args->mode == DIRECT_RECV)
                printf("DIRECT_RECV");
-       else if (appl_args->mode == POLL_QUEUE)
-               printf("POLL_QUEUE");
+       else if (appl_args->mode == PLAIN_QUEUE)
+               printf("PLAIN_QUEUE");
        else if (appl_args->mode == SCHED_PARALLEL)
                printf("SCHED_PARALLEL");
        else if (appl_args->mode == SCHED_ATOMIC)
@@ -1255,7 +1255,7 @@ int main(int argc, char *argv[])
                num_tx = num_workers;
 
                if (gbl_args->appl.mode == DIRECT_RECV ||
-                   gbl_args->appl.mode == POLL_QUEUE) {
+                   gbl_args->appl.mode == PLAIN_QUEUE) {
                        /* A queue per assigned worker */
                        num_rx = gbl_args->pktios[i].num_rx_thr;
                        num_tx = gbl_args->pktios[i].num_tx_thr;
@@ -1287,7 +1287,7 @@ int main(int argc, char *argv[])
        bind_queues();
 
        if (gbl_args->appl.mode == DIRECT_RECV ||
-           gbl_args->appl.mode == POLL_QUEUE)
+           gbl_args->appl.mode == PLAIN_QUEUE)
                print_port_mapping();
 
        memset(thread_tbl, 0, sizeof(thread_tbl));
@@ -1298,8 +1298,8 @@ int main(int argc, char *argv[])
 
        if (gbl_args->appl.mode == DIRECT_RECV)
                thr_run_func = run_worker_direct_mode;
-       else if (gbl_args->appl.mode == POLL_QUEUE)
-               thr_run_func = run_worker_poll_mode;
+       else if (gbl_args->appl.mode == PLAIN_QUEUE)
+               thr_run_func = run_worker_plain_queue_mode;
        else /* SCHED_PARALLEL / SCHED_ATOMIC / SCHED_ORDERED */
                thr_run_func = run_worker_sched_mode;
 
diff --git a/test/performance/odp_pktio_perf.c 
b/test/performance/odp_pktio_perf.c
index 71407f2..9a47355 100644
--- a/test/performance/odp_pktio_perf.c
+++ b/test/performance/odp_pktio_perf.c
@@ -382,7 +382,7 @@ static void *run_thread_tx(void *arg)
        return NULL;
 }
 
-static int receive_packets(odp_queue_t pollq,
+static int receive_packets(odp_queue_t plainq,
                           odp_event_t *event_tbl, unsigned num_pkts)
 {
        int n_ev = 0;
@@ -390,12 +390,12 @@ static int receive_packets(odp_queue_t pollq,
        if (num_pkts == 0)
                return 0;
 
-       if (pollq != ODP_QUEUE_INVALID) {
+       if (plainq != ODP_QUEUE_INVALID) {
                if (num_pkts == 1) {
-                       event_tbl[0] = odp_queue_deq(pollq);
+                       event_tbl[0] = odp_queue_deq(plainq);
                        n_ev = event_tbl[0] != ODP_EVENT_INVALID;
                } else {
-                       n_ev = odp_queue_deq_multi(pollq, event_tbl, num_pkts);
+                       n_ev = odp_queue_deq_multi(plainq, event_tbl, num_pkts);
                }
        } else {
                if (num_pkts == 1) {
@@ -413,7 +413,7 @@ static void *run_thread_rx(void *arg)
 {
        test_globals_t *globals;
        int thr_id, batch_len;
-       odp_queue_t pollq = ODP_QUEUE_INVALID;
+       odp_queue_t plainq = ODP_QUEUE_INVALID;
 
        thread_args_t *targs = arg;
 
@@ -429,8 +429,8 @@ static void *run_thread_rx(void *arg)
        pkt_rx_stats_t *stats = &globals->rx_stats[thr_id];
 
        if (gbl_args->args.schedule == 0) {
-               pollq = odp_pktio_inq_getdef(globals->pktio_rx);
-               if (pollq == ODP_QUEUE_INVALID)
+               plainq = odp_pktio_inq_getdef(globals->pktio_rx);
+               if (plainq == ODP_QUEUE_INVALID)
                        LOG_ABORT("Invalid input queue.\n");
        }
 
@@ -439,7 +439,7 @@ static void *run_thread_rx(void *arg)
                odp_event_t ev[BATCH_LEN_MAX];
                int i, n_ev;
 
-               n_ev = receive_packets(pollq, ev, batch_len);
+               n_ev = receive_packets(plainq, ev, batch_len);
 
                for (i = 0; i < n_ev; ++i) {
                        if (odp_event_type(ev[i]) == ODP_EVENT_PACKET) {
@@ -672,7 +672,7 @@ static int run_test(void)
        printf("\tReceive batch length: \t%" PRIu32 "\n",
               gbl_args->args.rx_batch_len);
        printf("\tPacket receive method:\t%s\n",
-              gbl_args->args.schedule ? "schedule" : "poll");
+              gbl_args->args.schedule ? "schedule" : "plain");
        printf("\tInterface(s):         \t");
        for (i = 0; i < gbl_args->args.num_ifaces; ++i)
                printf("%s ", gbl_args->args.ifaces[i]);
@@ -881,7 +881,7 @@ static void usage(void)
        printf("                         default: cpu_count+1/2\n");
        printf("  -b, --txbatch <length> Number of packets per TX batch\n");
        printf("                         default: %d\n", BATCH_LEN_MAX);
-       printf("  -p, --poll             Poll input queue for packet RX\n");
+       printf("  -p, --plain            Plain input queue for packet RX\n");
        printf("                         default: disabled (use scheduler)\n");
        printf("  -R, --rxbatch <length> Number of packets per RX batch\n");
        printf("                         default: %d\n", BATCH_LEN_MAX);
@@ -904,7 +904,7 @@ static void parse_args(int argc, char *argv[], test_args_t 
*args)
                {"count",     required_argument, NULL, 'c'},
                {"txcount",   required_argument, NULL, 't'},
                {"txbatch",   required_argument, NULL, 'b'},
-               {"poll",      no_argument,       NULL, 'p'},
+               {"plain",     no_argument,       NULL, 'p'},
                {"rxbatch",   required_argument, NULL, 'R'},
                {"length",    required_argument, NULL, 'l'},
                {"rate",      required_argument, NULL, 'r'},
diff --git a/test/performance/odp_scheduling.c 
b/test/performance/odp_scheduling.c
index 564c517..d785878 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -246,7 +246,7 @@ static int test_alloc_multi(int thr, odp_pool_t pool)
 }
 
 /**
- * @internal Test queue polling
+ * @internal Test plain queues
  *
  * Enqueue to and dequeue to/from a single shared queue.
  *
@@ -255,7 +255,7 @@ static int test_alloc_multi(int thr, odp_pool_t pool)
  *
  * @return 0 if successful
  */
-static int test_poll_queue(int thr, odp_pool_t msg_pool)
+static int test_plain_queue(int thr, odp_pool_t msg_pool)
 {
        odp_event_t ev;
        odp_buffer_t buf;
@@ -278,7 +278,7 @@ static int test_poll_queue(int thr, odp_pool_t msg_pool)
        t_msg->msg_id = MSG_HELLO;
        t_msg->seq    = 0;
 
-       queue = odp_queue_lookup("poll_queue");
+       queue = odp_queue_lookup("plain_queue");
 
        if (queue == ODP_QUEUE_INVALID) {
                printf("  [%i] Queue lookup failed.\n", thr);
@@ -310,7 +310,7 @@ static int test_poll_queue(int thr, odp_pool_t msg_pool)
        cycles = odp_cpu_cycles_diff(c2, c1);
        cycles = cycles / QUEUE_ROUNDS;
 
-       printf("  [%i] poll_queue enq+deq     %6" PRIu64 " CPU cycles\n",
+       printf("  [%i] plain_queue enq+deq    %6" PRIu64 " CPU cycles\n",
               thr, cycles);
 
        odp_buffer_free(buf);
@@ -645,7 +645,7 @@ static void *run_thread(void *arg)
 
        odp_barrier_wait(barrier);
 
-       if (test_poll_queue(thr, msg_pool))
+       if (test_plain_queue(thr, msg_pool))
                return NULL;
 
        /* Low prio */
@@ -900,12 +900,12 @@ int main(int argc, char *argv[])
        /* odp_pool_print(pool); */
 
        /*
-        * Create a queue for direct poll test
+        * Create a queue for plain queue test
         */
-       queue = odp_queue_create("poll_queue", NULL);
+       queue = odp_queue_create("plain_queue", NULL);
 
        if (queue == ODP_QUEUE_INVALID) {
-               LOG_ERR("Poll queue create failed.\n");
+               LOG_ERR("Plain queue create failed.\n");
                return -1;
        }
 
diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c
index 1d5d315..bafd205 100644
--- a/test/validation/pktio/pktio.c
+++ b/test/validation/pktio/pktio.c
@@ -558,13 +558,13 @@ static void test_txrx(odp_pktio_input_mode_t in_mode, int 
num_pkts,
        }
 }
 
-void pktio_test_poll_queue(void)
+void pktio_test_plain_queue(void)
 {
        test_txrx(ODP_PKTIN_MODE_QUEUE, 1, TXRX_MODE_SINGLE);
        test_txrx(ODP_PKTIN_MODE_QUEUE, TX_BATCH_LEN, TXRX_MODE_SINGLE);
 }
 
-void pktio_test_poll_multi(void)
+void pktio_test_plain_multi(void)
 {
        test_txrx(ODP_PKTIN_MODE_QUEUE, TX_BATCH_LEN, TXRX_MODE_MULTI);
        test_txrx(ODP_PKTIN_MODE_QUEUE, 1, TXRX_MODE_MULTI);
@@ -1425,8 +1425,8 @@ odp_testinfo_t pktio_suite_unsegmented[] = {
        ODP_TEST_INFO(pktio_test_lookup),
        ODP_TEST_INFO(pktio_test_print),
        ODP_TEST_INFO(pktio_test_inq),
-       ODP_TEST_INFO(pktio_test_poll_queue),
-       ODP_TEST_INFO(pktio_test_poll_multi),
+       ODP_TEST_INFO(pktio_test_plain_queue),
+       ODP_TEST_INFO(pktio_test_plain_multi),
        ODP_TEST_INFO(pktio_test_sched_queue),
        ODP_TEST_INFO(pktio_test_sched_multi),
        ODP_TEST_INFO(pktio_test_recv),
@@ -1447,8 +1447,8 @@ odp_testinfo_t pktio_suite_unsegmented[] = {
 };
 
 odp_testinfo_t pktio_suite_segmented[] = {
-       ODP_TEST_INFO(pktio_test_poll_queue),
-       ODP_TEST_INFO(pktio_test_poll_multi),
+       ODP_TEST_INFO(pktio_test_plain_queue),
+       ODP_TEST_INFO(pktio_test_plain_multi),
        ODP_TEST_INFO(pktio_test_sched_queue),
        ODP_TEST_INFO(pktio_test_sched_multi),
        ODP_TEST_INFO(pktio_test_recv),
diff --git a/test/validation/pktio/pktio.h b/test/validation/pktio/pktio.h
index 2798915..858aecf 100644
--- a/test/validation/pktio/pktio.h
+++ b/test/validation/pktio/pktio.h
@@ -10,8 +10,8 @@
 #include <odp_cunit_common.h>
 
 /* test functions: */
-void pktio_test_poll_queue(void);
-void pktio_test_poll_multi(void);
+void pktio_test_plain_queue(void);
+void pktio_test_plain_multi(void);
 void pktio_test_sched_queue(void);
 void pktio_test_sched_multi(void);
 void pktio_test_recv(void);
diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c
index 35bb7ce..7e4582c 100644
--- a/test/validation/queue/queue.c
+++ b/test/validation/queue/queue.c
@@ -128,21 +128,21 @@ void queue_test_sunnydays(void)
 
 void queue_test_info(void)
 {
-       odp_queue_t q_poll, q_order;
-       const char *const nq_poll = "test_q_poll";
+       odp_queue_t q_plain, q_order;
+       const char *const nq_plain = "test_q_plain";
        const char *const nq_order = "test_q_order";
        odp_queue_info_t info;
        odp_queue_param_t param;
-       char q_poll_ctx[] = "test_q_poll context data";
+       char q_plain_ctx[] = "test_q_plain context data";
        char q_order_ctx[] = "test_q_order context data";
        unsigned lock_count;
        char *ctx;
        int ret;
 
-       /* Create a polled queue and set context */
-       q_poll = odp_queue_create(nq_poll, NULL);
-       CU_ASSERT(ODP_QUEUE_INVALID != q_poll);
-       CU_ASSERT(odp_queue_context_set(q_poll, q_poll_ctx) == 0);
+       /* Create a plain queue and set context */
+       q_plain = odp_queue_create(nq_plain, NULL);
+       CU_ASSERT(ODP_QUEUE_INVALID != q_plain);
+       CU_ASSERT(odp_queue_context_set(q_plain, q_plain_ctx) == 0);
 
        /* Create a scheduled ordered queue with explicitly set params */
        odp_queue_param_init(&param);
@@ -155,14 +155,14 @@ void queue_test_info(void)
        q_order = odp_queue_create(nq_order, &param);
        CU_ASSERT(ODP_QUEUE_INVALID != q_order);
 
-       /* Check info for the polled queue */
-       CU_ASSERT(odp_queue_info(q_poll, &info) == 0);
-       CU_ASSERT(strcmp(nq_poll, info.name) == 0);
+       /* Check info for the plain queue */
+       CU_ASSERT(odp_queue_info(q_plain, &info) == 0);
+       CU_ASSERT(strcmp(nq_plain, info.name) == 0);
        CU_ASSERT(info.param.type == ODP_QUEUE_TYPE_PLAIN);
-       CU_ASSERT(info.param.type == odp_queue_type(q_poll));
+       CU_ASSERT(info.param.type == odp_queue_type(q_plain));
        ctx = info.param.context; /* 'char' context ptr */
-       CU_ASSERT(ctx == q_poll_ctx);
-       CU_ASSERT(info.param.context == odp_queue_context(q_poll));
+       CU_ASSERT(ctx == q_plain_ctx);
+       CU_ASSERT(info.param.context == odp_queue_context(q_plain));
 
        /* Check info for the scheduled ordered queue */
        CU_ASSERT(odp_queue_info(q_order, &info) == 0);
@@ -180,7 +180,7 @@ void queue_test_info(void)
        lock_count = (unsigned) ret;
        CU_ASSERT(info.param.sched.lock_count == lock_count);
 
-       CU_ASSERT(odp_queue_destroy(q_poll) == 0);
+       CU_ASSERT(odp_queue_destroy(q_plain) == 0);
        CU_ASSERT(odp_queue_destroy(q_order) == 0);
 }
 
diff --git a/test/validation/scheduler/scheduler.c 
b/test/validation/scheduler/scheduler.c
index fce569b..dcf01c0 100644
--- a/test/validation/scheduler/scheduler.c
+++ b/test/validation/scheduler/scheduler.c
@@ -846,7 +846,7 @@ static void *schedule_common_(void *arg)
                for (i = 0; i < args->num_prio; i++) {
                        for (j = 0; j < args->num_queues; j++) {
                                snprintf(name, sizeof(name),
-                                        "poll_%d_%d_o", i, j);
+                                        "plain_%d_%d_o", i, j);
                                pq = odp_queue_lookup(name);
                                CU_ASSERT_FATAL(pq != ODP_QUEUE_INVALID);
 
@@ -1348,17 +1348,17 @@ static int create_queues(void)
                                return -1;
                        }
 
-                       snprintf(name, sizeof(name), "poll_%d_%d_o", i, j);
+                       snprintf(name, sizeof(name), "plain_%d_%d_o", i, j);
                        pq = odp_queue_create(name, NULL);
                        if (pq == ODP_QUEUE_INVALID) {
-                               printf("Poll queue create failed.\n");
+                               printf("Plain queue create failed.\n");
                                return -1;
                        }
 
                        queue_ctx_buf = odp_buffer_alloc(queue_ctx_pool);
 
                        if (queue_ctx_buf == ODP_BUFFER_INVALID) {
-                               printf("Cannot allocate poll queue ctx buf\n");
+                               printf("Cannot allocate plain queue ctx buf\n");
                                return -1;
                        }
 
@@ -1369,7 +1369,7 @@ static int create_queues(void)
                        rc = odp_queue_context_set(pq, pqctx);
 
                        if (rc != 0) {
-                               printf("Cannot set poll queue context\n");
+                               printf("Cannot set plain queue context\n");
                                return -1;
                        }
 
@@ -1521,7 +1521,7 @@ static int destroy_queues(void)
                        if (destroy_queue(name) != 0)
                                return -1;
 
-                       snprintf(name, sizeof(name), "poll_%d_%d_o", i, j);
+                       snprintf(name, sizeof(name), "plain_%d_%d_o", i, j);
                        if (destroy_queue(name) != 0)
                                return -1;
                }
-- 
2.6.3

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to