DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence
@ 2015-03-09 16:05 Pawel Wodkowski
  2015-03-09 16:16 ` Pawel Wodkowski
  2015-03-10 15:13 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Pawel Wodkowski @ 2015-03-09 16:05 UTC (permalink / raw)
  To: dev

Fix check of returned values during application init phase.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
---
 examples/l2fwd-jobstats/main.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index a5a1aaa..ba9d3c0 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -997,11 +997,11 @@ main(int argc, char **argv)
 				drain_tsc, 0);
 
 		rte_timer_init(&qconf->flush_timer);
-		rte_timer_reset(&qconf->flush_timer, drain_tsc, PERIODICAL, lcore_id,
-				&l2fwd_flush_job, NULL);
+		ret = rte_timer_reset(&qconf->flush_timer, drain_tsc, PERIODICAL,
+				lcore_id, &l2fwd_flush_job, NULL);
 
 		if (ret < 0) {
-			rte_exit(1, "Failed to add flush job for lcore %u: %s",
+			rte_exit(1, "Failed to reset flush job timer for lcore %u: %s",
 					lcore_id, rte_strerror(-ret));
 		}
 
@@ -1019,8 +1019,13 @@ main(int argc, char **argv)
 			rte_jobstats_set_update_period_function(job, l2fwd_job_update_cb);
 
 			rte_timer_init(&qconf->rx_timers[i]);
-			rte_timer_reset(&qconf->rx_timers[i], 0, PERIODICAL, lcore_id,
+			ret = rte_timer_reset(&qconf->rx_timers[i], 0, PERIODICAL, lcore_id,
 					&l2fwd_fwd_job, (void *)(uintptr_t)i);
+
+			if (ret < 0) {
+				rte_exit(1, "Failed to reset lcore %u port %u job timer: %s",
+						lcore_id, qconf->rx_port_list[i], rte_strerror(-ret));
+			}
 		}
 	}
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence
  2015-03-09 16:05 [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence Pawel Wodkowski
@ 2015-03-09 16:16 ` Pawel Wodkowski
  2015-03-10 15:13 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Pawel Wodkowski @ 2015-03-09 16:16 UTC (permalink / raw)
  To: dev

On 2015-03-09 17:05, Pawel Wodkowski wrote:
> [PATCH 1/2]

This is standalone patch. '1/2' generated by accident.


-- 
Pawel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence
  2015-03-09 16:05 [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence Pawel Wodkowski
  2015-03-09 16:16 ` Pawel Wodkowski
@ 2015-03-10 15:13 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-03-10 15:13 UTC (permalink / raw)
  To: Pawel Wodkowski; +Cc: dev

2015-03-09 17:05, Pawel Wodkowski:
> Fix check of returned values during application init phase.
> 
> Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-10 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 16:05 [dpdk-dev] [PATCH 1/2] example: fix minor bug in l2fwd-jobstats init sequence Pawel Wodkowski
2015-03-09 16:16 ` Pawel Wodkowski
2015-03-10 15:13 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).