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 CC8F2A0096 for ; Wed, 8 May 2019 04:03:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 67D295689; Wed, 8 May 2019 04:03:58 +0200 (CEST) Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id CAEFE1D7 for ; Wed, 8 May 2019 04:03:54 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4823r2O016078; Wed, 8 May 2019 11:03:53 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 76FFDEA407F; Wed, 8 May 2019 11:03:53 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 42124EA7093; Wed, 8 May 2019 11:03:53 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Wed, 8 May 2019 11:01:35 +0900 Message-Id: <1557280895-7978-18-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557280895-7978-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1557280895-7978-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 17/17] shared/sec: rename func for parsing request 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 For refactoring, This update is to rename `spp_command_decode_request()` to `sppwk_parse_req()` because it is too long and not for decoding. Signed-off-by: Yasufumi Ogawa --- src/shared/secondary/spp_worker_th/cmd_parser.h | 2 +- src/shared/secondary/spp_worker_th/command_dec.c | 4 ++-- src/shared/secondary/spp_worker_th/command_proc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.h b/src/shared/secondary/spp_worker_th/cmd_parser.h index e42bc14..785fffe 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.h +++ b/src/shared/secondary/spp_worker_th/cmd_parser.h @@ -150,7 +150,7 @@ struct sppwk_parse_err_msg { * @retval SPP_RET_OK succeeded. * @retval !0 failed. */ -int spp_command_decode_request(struct sppwk_cmd_req *request, +int sppwk_parse_req(struct sppwk_cmd_req *request, const char *request_str, size_t request_str_len, struct sppwk_parse_err_msg *wk_err_msg); diff --git a/src/shared/secondary/spp_worker_th/command_dec.c b/src/shared/secondary/spp_worker_th/command_dec.c index 80fd6d2..723d8c4 100644 --- a/src/shared/secondary/spp_worker_th/command_dec.c +++ b/src/shared/secondary/spp_worker_th/command_dec.c @@ -1080,9 +1080,9 @@ decode_command_in_list(struct sppwk_cmd_req *request, return set_string_value_decode_error(wk_err_msg, argv[0], "command"); } -/* decode request from no-null-terminated string */ +/* Parse request of non null terminated string. */ int -spp_command_decode_request( +sppwk_parse_req( struct sppwk_cmd_req *request, const char *request_str, size_t request_str_len, struct sppwk_parse_err_msg *wk_err_msg) diff --git a/src/shared/secondary/spp_worker_th/command_proc.c b/src/shared/secondary/spp_worker_th/command_proc.c index 1cb43e7..f345759 100644 --- a/src/shared/secondary/spp_worker_th/command_proc.c +++ b/src/shared/secondary/spp_worker_th/command_proc.c @@ -1660,7 +1660,7 @@ process_request(int *sock, const char *request_str, size_t request_str_len) (int)request_str_len, request_str); /* decode request message */ - ret = spp_command_decode_request( + ret = sppwk_parse_req( &request, request_str, request_str_len, &wk_err_msg); if (unlikely(ret != SPP_RET_OK)) { /* send error response */ -- 2.17.1