[spp] [PATCH] spp_vf: change exit command to return response
x-fn-spp at sl.ntt-tx.co.jp
x-fn-spp at sl.ntt-tx.co.jp
Fri Dec 21 07:23:44 CET 2018
From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
For secondary processes use common process_request(), it causes an
error because spp-ctl expects a response but these processes do not
return anything. This patch is to change it to return message.
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki at lab.ntt.co.jp>
---
src/vf/common/command_proc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/vf/common/command_proc.c b/src/vf/common/command_proc.c
index cf35ce0..a612061 100644
--- a/src/vf/common/command_proc.c
+++ b/src/vf/common/command_proc.c
@@ -1600,8 +1600,10 @@ process_request(int *sock, const char *request_str, size_t request_str_len)
if (request.is_requested_exit) {
/* Terminated by process exit command. */
/* Other route is normal end because it responds to command. */
+ set_command_results(&command_results[0], CRES_SUCCESS, "");
+ send_command_result_response(sock, &request, command_results);
RTE_LOG(INFO, SPP_COMMAND_PROC,
- "No response with process exit command.\n");
+ "Terminate process for exit.\n");
return SPP_RET_NG;
}
--
2.17.1
More information about the spp
mailing list