From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 4/5] spp_pcap: add lcore IDs in status message
Date: Wed, 8 May 2019 10:59:43 +0900 [thread overview]
Message-ID: <1557280784-7620-5-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1557280784-7620-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Add lcore IDs in response of status command to know which of lcores are
in use.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
src/pcap/command_proc.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/pcap/command_proc.c b/src/pcap/command_proc.c
index 28c6b97..96218c0 100644
--- a/src/pcap/command_proc.c
+++ b/src/pcap/command_proc.c
@@ -523,6 +523,16 @@ append_pcap_core_element_value(
return ret;
}
+/* append master lcore in JSON format */
+static int
+append_master_lcore_value(const char *name, char **output,
+ void *tmp __attribute__ ((unused)))
+{
+ int ret = SPP_RET_NG;
+ ret = append_json_int_value(name, output, rte_get_master_lcore());
+ return ret;
+}
+
/* append a list of core information for JSON format */
static int
append_core_value(const char *name, char **output,
@@ -625,6 +635,7 @@ struct command_response_list response_result_list[] = {
struct command_response_list response_info_list[] = {
{ "client-id", append_client_id_value },
{ "status", append_capture_status_value },
+ { "master-lcore", append_master_lcore_value },
{ "core", append_core_value },
COMMAND_RESP_TAG_LIST_EMPTY
};
--
2.17.1
next prev parent reply other threads:[~2019-05-08 2:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 1:59 [spp] [PATCH 0/5] Show lcores in status of spp_vf and siblings ogawa.yasufumi
2019-05-08 1:59 ` [spp] [PATCH 1/5] spp_vf/common: add lcore IDs in status message ogawa.yasufumi
2019-05-08 1:59 ` [spp] [PATCH 2/5] controller: add paring lcore IDs for vf and mirror ogawa.yasufumi
2019-05-08 1:59 ` [spp] [PATCH 3/5] spp-ctl: add master lcore entry for SPP CLI ogawa.yasufumi
2019-05-08 1:59 ` ogawa.yasufumi [this message]
2019-05-08 1:59 ` [spp] [PATCH 5/5] controller: add parsing lcore IDs for spp_pcap ogawa.yasufumi
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=1557280784-7620-5-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
--to=ogawa.yasufumi@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@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).