This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 215069d156f3612ff9e140a7e47232047c6870e6 (commit) via a459233d0ac535d67e3141e21dee3e805c4e906f (commit) via 0e81876e6119fd76282f3de4bb50dad9e67ec6f2 (commit) from 713f9d5dee94b6eb81cdbbb929bf875f414d339c (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 215069d156f3612ff9e140a7e47232047c6870e6 Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu May 17 16:14:03 2018 +0300
test: sched_pktio: add timeout statistics
Record number of timeouts received. Timers are mostly reset when packets are received. So, timeout rate is low when packets are flowing.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/performance/odp_sched_pktio.c b/test/performance/odp_sched_pktio.c index 18fcc20a..d81994cd 100644 --- a/test/performance/odp_sched_pktio.c +++ b/test/performance/odp_sched_pktio.c @@ -45,6 +45,7 @@ typedef struct { typedef struct ODP_ALIGNED_CACHE { uint64_t rx_pkt; uint64_t tx_pkt; + uint64_t tmo; } worker_stat_t;
typedef struct queue_context_t { @@ -289,6 +290,9 @@ static int worker_thread_timers(void *arg) queue_context->dst_pktio, queue_context->dst_queue, num_pkt, tmos);
+ if (odp_unlikely(test_global->opt.collect_stat && tmos)) + test_global->worker_stat[worker_id].tmo += tmos; + if (odp_unlikely(num_pkt == 0)) continue;
@@ -527,37 +531,41 @@ static void print_config(test_global_t *test_global) static void print_stat(test_global_t *test_global, uint64_t nsec) { int i; - uint64_t rx, tx, drop; + uint64_t rx, tx, drop, tmo; uint64_t rx_sum = 0; uint64_t tx_sum = 0; + uint64_t tmo_sum = 0; double sec = 0.0;
printf("\nTest statistics\n"); - printf(" worker rx_pkt tx_pkt dropped\n"); + printf(" worker rx_pkt tx_pkt dropped tmo\n");
for (i = 0; i < test_global->opt.num_worker; i++) { rx = test_global->worker_stat[i].rx_pkt; tx = test_global->worker_stat[i].tx_pkt; + tmo = test_global->worker_stat[i].tmo; rx_sum += rx; tx_sum += tx; + tmo_sum += tmo;
- printf(" %6i %16" PRIu64 " %16" PRIu64 " %16" PRIu64 "\n", - i, rx, tx, rx - tx); + printf(" %6i %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" + PRIu64 "\n", i, rx, tx, rx - tx, tmo); }
test_global->rx_pkt_sum = rx_sum; test_global->tx_pkt_sum = tx_sum; drop = rx_sum - tx_sum;
- printf(" --------------------------------------------------\n"); - printf(" total %16" PRIu64 " %16" PRIu64 " %16" PRIu64 "\n\n", - rx_sum, tx_sum, drop); + printf(" -------------------------------------------------------------------\n"); + printf(" total %16" PRIu64 " %16" PRIu64 " %16" PRIu64 " %16" + PRIu64 "\n\n", rx_sum, tx_sum, drop, tmo_sum);
sec = nsec / 1000000000.0; printf(" Total test time: %.2f sec\n", sec); printf(" Rx packet rate: %.2f pps\n", rx_sum / sec); printf(" Tx packet rate: %.2f pps\n", tx_sum / sec); - printf(" Drop rate: %.2f pps\n\n", drop / sec); + printf(" Drop rate: %.2f pps\n", drop / sec); + printf(" Timeout rate: %.2f per sec\n\n", tmo_sum / sec); }
static int open_pktios(test_global_t *test_global)
commit a459233d0ac535d67e3141e21dee3e805c4e906f Author: Petri Savolainen petri.savolainen@linaro.org Date: Thu May 17 11:38:36 2018 +0300
test: sched_pktio: timer reset return codes
Timer reset may fail since timer has been expired or it's about to expire. Return code ODP_TIMER_NOEVENT indicates this.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/performance/odp_sched_pktio.c b/test/performance/odp_sched_pktio.c index 8fa4cbb2..18fcc20a 100644 --- a/test/performance/odp_sched_pktio.c +++ b/test/performance/odp_sched_pktio.c @@ -246,8 +246,11 @@ static int worker_thread_timers(void *arg) ret = odp_timer_set_rel(timer, tick, &ev[i]);
if (odp_unlikely(ret != ODP_TIMER_SUCCESS)) { - /* Should never happen */ - printf("Expired timer reset failed\n"); + /* Should never happen. Timeout event + * has been received, timer should be + * ready to be set again. */ + printf("Expired timer reset failed " + "%i\n", ret); odp_event_free(ev[i]); }
@@ -265,11 +268,12 @@ static int worker_thread_timers(void *arg) ret = odp_timer_set_rel(timer, tick, NULL);
if (odp_unlikely(ret != ODP_TIMER_SUCCESS && - ret != ODP_TIMER_TOOEARLY)) { - /* Should never happen. Reset should either - * succeed or be too close to timer expiration - * in which case timeout event will be received - * soon. */ + ret != ODP_TIMER_NOEVENT)) { + /* Tick period is too short or long. Normally, + * reset either succeeds or fails due to timer + * expiration, in which case timeout event will + * be received soon and reset will be done + * then. */ printf("Timer reset failed %i\n", ret); } }
commit 0e81876e6119fd76282f3de4bb50dad9e67ec6f2 Author: Petri Savolainen petri.savolainen@linaro.org Date: Wed May 16 13:58:20 2018 +0300
test: sched_pktio: don't call pktout_send with 0 packets
When only timouts are received from the scheduler, avoid odp_pktout_send() call with 0 packets. Rename variable to num_pkt to highlight difference between event count and packet count.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/performance/odp_sched_pktio.c b/test/performance/odp_sched_pktio.c index 109ae87e..8fa4cbb2 100644 --- a/test/performance/odp_sched_pktio.c +++ b/test/performance/odp_sched_pktio.c @@ -127,7 +127,7 @@ static inline void fill_eth_addr(odp_packet_t pkt[], int num, static int worker_thread(void *arg) { odp_event_t ev[BURST_SIZE]; - int num, sent, drop, out; + int num_pkt, sent, drop, out; odp_pktout_queue_t pktout; odp_queue_t queue; queue_context_t *queue_context; @@ -144,8 +144,8 @@ static int worker_thread(void *arg) while (1) { odp_packet_t pkt[BURST_SIZE];
- num = odp_schedule_multi(&queue, ODP_SCHED_NO_WAIT, - ev, BURST_SIZE); + num_pkt = odp_schedule_multi(&queue, ODP_SCHED_NO_WAIT, + ev, BURST_SIZE);
polls++;
@@ -155,7 +155,7 @@ static int worker_thread(void *arg) break; }
- if (num <= 0) + if (num_pkt <= 0) continue;
queue_context = odp_queue_context(queue); @@ -166,27 +166,27 @@ static int worker_thread(void *arg) queue_context->src_pktio, queue_context->src_queue, queue_context->dst_pktio, - queue_context->dst_queue, num); + queue_context->dst_queue, num_pkt);
- odp_packet_from_event_multi(pkt, ev, num); + odp_packet_from_event_multi(pkt, ev, num_pkt);
pktout = queue_context->dst_pktout; out = queue_context->dst_pktio;
- fill_eth_addr(pkt, num, test_global, out); + fill_eth_addr(pkt, num_pkt, test_global, out);
- sent = odp_pktout_send(pktout, pkt, num); + sent = odp_pktout_send(pktout, pkt, num_pkt);
if (odp_unlikely(sent < 0)) sent = 0;
- drop = num - sent; + drop = num_pkt - sent;
if (odp_unlikely(drop)) odp_packet_free_multi(&pkt[sent], drop);
if (odp_unlikely(test_global->opt.collect_stat)) { - test_global->worker_stat[worker_id].rx_pkt += num; + test_global->worker_stat[worker_id].rx_pkt += num_pkt; test_global->worker_stat[worker_id].tx_pkt += sent; } } @@ -199,7 +199,7 @@ static int worker_thread(void *arg) static int worker_thread_timers(void *arg) { odp_event_t ev[BURST_SIZE]; - int num, sent, drop, out, tmos, i, src_pktio, src_queue; + int num, num_pkt, sent, drop, out, tmos, i, src_pktio, src_queue; odp_pktout_queue_t pktout; odp_queue_t queue; queue_context_t *queue_context; @@ -274,7 +274,7 @@ static int worker_thread_timers(void *arg) } }
- num = num - tmos; + num_pkt = num - tmos;
if (DEBUG_PRINT) printf("worker %i: [%i/%i] -> [%i/%i], %i packets " @@ -283,25 +283,28 @@ static int worker_thread_timers(void *arg) queue_context->src_pktio, queue_context->src_queue, queue_context->dst_pktio, - queue_context->dst_queue, num, tmos); + queue_context->dst_queue, num_pkt, tmos); + + if (odp_unlikely(num_pkt == 0)) + continue;
pktout = queue_context->dst_pktout; out = queue_context->dst_pktio;
- fill_eth_addr(pkt, num, test_global, out); + fill_eth_addr(pkt, num_pkt, test_global, out);
- sent = odp_pktout_send(pktout, pkt, num); + sent = odp_pktout_send(pktout, pkt, num_pkt);
if (odp_unlikely(sent < 0)) sent = 0;
- drop = num - sent; + drop = num_pkt - sent;
if (odp_unlikely(drop)) odp_packet_free_multi(&pkt[sent], drop);
if (odp_unlikely(test_global->opt.collect_stat)) { - test_global->worker_stat[worker_id].rx_pkt += num; + test_global->worker_stat[worker_id].rx_pkt += num_pkt; test_global->worker_stat[worker_id].tx_pkt += sent; } }
-----------------------------------------------------------------------
Summary of changes: test/performance/odp_sched_pktio.c | 79 +++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 32 deletions(-)
hooks/post-receive