From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 06839A045E for ; Fri, 31 May 2019 05:38:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0E15375B; Fri, 31 May 2019 05:38:40 +0200 (CEST) Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 643502C60 for ; Fri, 31 May 2019 05:38:39 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4V3ccFP029268; Fri, 31 May 2019 12:38:38 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 2C8CC6395BB; Fri, 31 May 2019 12:38:38 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 1474D6395D8; Fri, 31 May 2019 12:38:38 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Fri, 31 May 2019 12:35:55 +0900 Message-Id: <1559273765-26130-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559273765-26130-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1559273765-26130-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 01/11] shared/sec: rename functions of sppwk_cmd_runner X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa This update is to rename functions defined in header file `sppwk_cmd_runner.h` to be more specific. Signed-off-by: Yasufumi Ogawa --- src/mirror/spp_mirror.c | 4 +-- .../secondary/spp_worker_th/cmd_runner.c | 10 +++--- .../secondary/spp_worker_th/cmd_runner.h | 32 +++++++++---------- src/vf/spp_vf.c | 4 +-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c index d46d3da..202475a 100644 --- a/src/mirror/spp_mirror.c +++ b/src/mirror/spp_mirror.c @@ -626,7 +626,7 @@ main(int argc, char *argv[]) spp_port_ability_init(); /* Setup connection for accepting commands from controller */ - int ret_command_init = spp_command_proc_init( + int ret_command_init = sppwk_cmd_runner_conn( g_startup_param.server_ip, g_startup_param.server_port); if (unlikely(ret_command_init != SPP_RET_OK)) @@ -675,7 +675,7 @@ main(int argc, char *argv[]) { #endif /* Receive command */ - ret_do = spp_command_proc_do(); + ret_do = sppwk_cmd_run(); if (unlikely(ret_do != SPP_RET_OK)) break; /* diff --git a/src/shared/secondary/spp_worker_th/cmd_runner.c b/src/shared/secondary/spp_worker_th/cmd_runner.c index 153ea01..74b41dd 100644 --- a/src/shared/secondary/spp_worker_th/cmd_runner.c +++ b/src/shared/secondary/spp_worker_th/cmd_runner.c @@ -1710,16 +1710,16 @@ process_request(int *sock, const char *request_str, size_t request_str_len) return SPP_RET_OK; } -/* initialize command processor. */ +/* Setup connection for accepting commands from spp-ctl. */ int -spp_command_proc_init(const char *controller_ip, int controller_port) +sppwk_cmd_runner_conn(const char *ctl_ipaddr, int ctl_port) { - return spp_command_conn_init(controller_ip, controller_port); + return spp_command_conn_init(ctl_ipaddr, ctl_port); } -/* process command from controller. */ +/* Run command from spp-ctl. */ int -spp_command_proc_do(void) +sppwk_cmd_run(void) { int ret = SPP_RET_NG; int msg_ret = -1; diff --git a/src/shared/secondary/spp_worker_th/cmd_runner.h b/src/shared/secondary/spp_worker_th/cmd_runner.h index bccc0c5..4b768b7 100644 --- a/src/shared/secondary/spp_worker_th/cmd_runner.h +++ b/src/shared/secondary/spp_worker_th/cmd_runner.h @@ -7,36 +7,36 @@ /** * @file - * SPP Command processing + * Run command for SPP worker thread. * - * Receive and process the command message, then send back the - * result JSON formatted data. + * Receive command message from SPP controller and run. The result is returned + * to SPP controller as a JSON formatted message. */ #include "spp_proc.h" /** - * initialize command processor. + * Setup connection for accepting commands from spp-ctl. * - * @param controller_ip - * The controller's ip address. - * @param controller_port - * The controller's port number. + * @param ctl_ipaddr + * IP address of spp-ctl. + * @param ctl_port + * Port number of spp-ctl. * - * @retval SPP_RET_OK succeeded. - * @retval SPP_RET_NG failed. + * @retval SPP_RET_OK if succeeded. + * @retval SPP_RET_NG if failed. */ int -spp_command_proc_init(const char *controller_ip, int controller_port); +sppwk_cmd_runner_conn(const char *ctl_ipaddr, int ctl_port); /** - * process command from controller. + * Run command from spp-ctl. * - * @retval SPP_RET_OK succeeded. - * @retval SPP_RET_NG process termination is required. - * (occurred connection failure, or received exit command) + * @retval SPP_RET_OK if succeeded. + * TODO(yasufum) change exclude case of exit cmd because it is not NG. + * @retval SPP_RET_NG if connection failure or received exit command. */ int -spp_command_proc_do(void); +sppwk_cmd_run(void); #endif /* _SPPWK_CMD_RUNNER_H_ */ diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c index cbaa0c1..4134647 100644 --- a/src/vf/spp_vf.c +++ b/src/vf/spp_vf.c @@ -299,7 +299,7 @@ main(int argc, char *argv[]) spp_port_ability_init(); /* Setup connection for accepting commands from controller */ - int ret_command_init = spp_command_proc_init( + int ret_command_init = sppwk_cmd_runner_conn( g_startup_param.server_ip, g_startup_param.server_port); if (unlikely(ret_command_init != SPP_RET_OK)) @@ -342,7 +342,7 @@ main(int argc, char *argv[]) { #endif /* Receive command */ - ret_do = spp_command_proc_do(); + ret_do = sppwk_cmd_run(); if (unlikely(ret_do != SPP_RET_OK)) break; -- 2.17.1