From: Maryam Tahhan <maryam.tahhan@intel.com>
To: dev@dpdk.org
Cc: Maryam Tahhan <maryam.tahhan@intel.com>
Subject: [dpdk-dev] [PATCH v2 1/1] dpdk_procinfo: check for primary process
Date: Wed, 7 Sep 2016 11:37:50 +0100 [thread overview]
Message-ID: <1473244670-154926-1-git-send-email-maryam.tahhan@intel.com> (raw)
Add a check to see if the primary process is running and exit gracefully if it
is not.
v2:
* Updated to tone down message and remove unnecessary brackets.
Suggested-by: Patrick Kutch <patrick.g.kutch@intel.com>
Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com>
---
app/proc_info/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/proc_info/main.c b/app/proc_info/main.c
index 6dc0bbb..9c1eb91 100644
--- a/app/proc_info/main.c
+++ b/app/proc_info/main.c
@@ -329,6 +329,9 @@ main(int argc, char **argv)
argc -= ret;
argv += (ret - 3);
+ if (!rte_eal_primary_proc_alive(NULL))
+ rte_exit(EXIT_FAILURE, "No primary DPDK process is running.\n");
+
/* parse app arguments */
ret = proc_info_parse_args(argc, argv);
if (ret < 0)
--
2.4.11
next reply other threads:[~2016-09-07 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 10:37 Maryam Tahhan [this message]
2016-09-08 12:31 ` Van Haaren, Harry
2016-09-23 18:44 ` 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=1473244670-154926-1-git-send-email-maryam.tahhan@intel.com \
--to=maryam.tahhan@intel.com \
--cc=dev@dpdk.org \
/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).