From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 1/5] spp_nfv: chage to return msg of exit command
Date: Thu, 25 Oct 2018 14:19:39 +0900 [thread overview]
Message-ID: <20181025051943.17129-2-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20181025051943.17129-1-ogawa.yasufumi@lab.ntt.co.jp>
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
This patch is to fix error of receiving data of NfvProc in spp-ctl.
Spp_nfv returns no message after exit command while spp-ctl expects
to get any of message as a result. To fix, change to return empty
message.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
src/nfv/nfv.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/nfv/nfv.c b/src/nfv/nfv.c
index 05290ed..84d3df4 100644
--- a/src/nfv/nfv.c
+++ b/src/nfv/nfv.c
@@ -926,6 +926,7 @@ main(int argc, char *argv[])
int connected = 0;
char str[MSG_SIZE];
unsigned int i;
+ int flg_exit; // used as res of parse_command() to exit if -1
int ret;
ret = rte_eal_init(argc, argv);
@@ -1000,13 +1001,14 @@ main(int argc, char *argv[])
RTE_LOG(DEBUG, APP, "Received string: %s\n", str);
- ret = parse_command(str);
- if (ret < 0) /* terminate process if exit is called */
- break;
+ flg_exit = parse_command(str);
/*Send the message back to client*/
ret = do_send(&connected, &sock, str);
- if (ret < 0)
+
+ if (flg_exit < 0) /* terminate process if exit is called */
+ break;
+ else if (ret < 0)
continue;
}
--
2.7.4
next prev parent reply other threads:[~2018-10-25 5:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 5:19 [spp] [PATCH 0/5] Add exit command support for spp_nfv and spp_vm ogawa.yasufumi
2018-10-25 5:19 ` ogawa.yasufumi [this message]
2018-10-25 5:19 ` [spp] [PATCH 2/5] spp-ctl: add exit cmd support for spp_nfv ogawa.yasufumi
2018-10-25 5:19 ` [spp] [PATCH 3/5] spp_vm: chage to return msg of exit command ogawa.yasufumi
2018-10-25 5:19 ` [spp] [PATCH 4/5] controller: update sec exit cmd to call REST API ogawa.yasufumi
2018-10-25 5:19 ` [spp] [PATCH 5/5] docs: add DELETE method for exiting spp_nfv 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=20181025051943.17129-2-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).