Soft Patch Panel
 help / color / mirror / Atom feed
From: yasufum.o@gmail.com
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 8/9] spp_pcap: revise util func for status command
Date: Thu, 12 Sep 2019 19:48:23 +0900	[thread overview]
Message-ID: <20190912104824.21519-9-yasufum.o@gmail.com> (raw)
In-Reply-To: <20190912104824.21519-1-yasufum.o@gmail.com>

From: Yasufumi Ogawa <yasufum.o@gmail.com>

As previous patch for spp_vf, this update is to rename it to
iterate_lcore_info() and add comments as refactoring.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
---
 src/pcap/cmd_runner.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/pcap/cmd_runner.c b/src/pcap/cmd_runner.c
index 63658a5..ac5181d 100644
--- a/src/pcap/cmd_runner.c
+++ b/src/pcap/cmd_runner.c
@@ -61,12 +61,9 @@ const char *CAPTURE_STATUS_STRINGS[] = {
 	"", /* termination */
 };
 
-/**
- * Iterate core information for number of available cores to
- * append response for status command.
- */
+/* Iterate core info to create response of spp_pcap status */
 static int
-spp_iterate_core_info(struct sppwk_lcore_params *params)
+iterate_lcore_info(struct sppwk_lcore_params *params)
 {
 	int ret;
 	int lcore_id;
@@ -78,8 +75,7 @@ spp_iterate_core_info(struct sppwk_lcore_params *params)
 		ret = spp_pcap_get_core_status(lcore_id, params);
 		if (unlikely(ret != 0)) {
 			RTE_LOG(ERR, PCAP_RUNNER,
-					"Cannot iterate core information. "
-						"(core = %d)\n", lcore_id);
+					"Failed to get lcore %d\n", lcore_id);
 			return SPPWK_RET_NG;
 		}
 	}
@@ -524,7 +520,7 @@ append_core_value(const char *name, char **output,
 	lcore_params.output = tmp_buff;
 	lcore_params.lcore_proc = append_pcap_core_element_value;
 
-	ret = spp_iterate_core_info(&lcore_params);
+	ret = iterate_lcore_info(&lcore_params);
 	if (unlikely(ret != SPPWK_RET_OK)) {
 		spp_strbuf_free(lcore_params.output);
 		return SPPWK_RET_NG;
-- 
2.17.1


  parent reply	other threads:[~2019-09-12 10:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 10:48 [spp] [PATCH 0/9] Refactor ringlatencystats yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 1/9] shared: rename file ringlatencystats to be short yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 2/9] shared: rename func for calc latency of ring yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 3/9] shared: rename struct for ring latency stats yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 4/9] shared: rename func for init " yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 5/9] shared: renaem util funcs of ring latency yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 6/9] spp_vf: revise util func for status command yasufum.o
2019-09-12 10:48 ` [spp] [PATCH 7/9] spp_mirror: " yasufum.o
2019-09-12 10:48 ` yasufum.o [this message]
2019-09-12 10:48 ` [spp] [PATCH 9/9] shared: add TODO to fix bug in latency stats yasufum.o

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=20190912104824.21519-9-yasufum.o@gmail.com \
    --to=yasufum.o@gmail.com \
    --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).