DPDK patches and discussions
 help / color / mirror / Atom feed
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, stable@dpdk.org, ian.betts@intel.com
Subject: [dpdk-dev] [PATCH 2/2] examples/performance-thread: init timer subsystem
Date: Mon, 15 Jul 2019 10:39:32 -0500	[thread overview]
Message-ID: <1563205172-352-3-git-send-email-erik.g.carrillo@intel.com> (raw)
In-Reply-To: <1563205172-352-1-git-send-email-erik.g.carrillo@intel.com>

The timer subsystem should be initialized in the l3fwd-thread app before
the L-thread subsystem can be used.

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")
Cc: stable@dpdk.org
Cc: ian.betts@intel.com

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index dd46895..c4065e8 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -40,6 +40,7 @@
 #include <rte_udp.h>
 #include <rte_string_fns.h>
 #include <rte_pause.h>
+#include <rte_timer.h>
 
 #include <cmdline_parse.h>
 #include <cmdline_parse_etheraddr.h>
@@ -3497,6 +3498,10 @@ main(int argc, char **argv)
 	argc -= ret;
 	argv += ret;
 
+	ret = rte_timer_subsystem_init();
+	if (ret < 0)
+		rte_exit(EXIT_FAILURE, "Failed to initialize timer subystem\n");
+
 	/* pre-init dst MACs for all ports to 02:00:00:00:00:xx */
 	for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++) {
 		dest_eth_addr[portid] = RTE_ETHER_LOCAL_ADMIN_ADDR +
-- 
2.6.4


  parent reply	other threads:[~2019-07-15 15:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 15:39 [dpdk-dev] [PATCH 0/2] fix segfault seen with performance-thread example Erik Gabriel Carrillo
2019-07-15 15:39 ` [dpdk-dev] [PATCH 1/2] timer: fix null pointer dereference Erik Gabriel Carrillo
2019-07-15 15:48   ` Stephen Hemminger
2019-07-15 16:04     ` Carrillo, Erik G
2019-07-15 19:48       ` Carrillo, Erik G
2019-07-16  8:31         ` Bruce Richardson
2019-07-16 14:58           ` Carrillo, Erik G
2019-07-15 15:39 ` Erik Gabriel Carrillo [this message]
2019-07-18 21:20 ` [dpdk-dev] [PATCH 0/2] fix segfault seen with performance-thread example Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1563205172-352-3-git-send-email-erik.g.carrillo@intel.com \
    --to=erik.g.carrillo@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.betts@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).