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 C2BBFA045E for ; Fri, 31 May 2019 05:39:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 797001B94E; Fri, 31 May 2019 05:39:34 +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 82CBF375B for ; Fri, 31 May 2019 05:39:32 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x4V3dVEH023689; Fri, 31 May 2019 12:39:31 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 63D236395DC; Fri, 31 May 2019 12:39:31 +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 5029B6395DF; Fri, 31 May 2019 12:39:31 +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:36:57 +0900 Message-Id: <1559273819-26243-5-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559273819-26243-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1559273819-26243-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 4/6] shared/sec: rename file spp_proc to cmd_utils 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 spp_proc.c and its header file define a set of utility functions for parsing or running commands of SPP worker threads. The term `spp proc` is not appropriate for the meaning, rename to simply `cmd_utils`. Signed-off-by: Yasufumi Ogawa --- src/mirror/Makefile | 2 +- src/mirror/spp_mirror.c | 2 +- src/pcap/Makefile | 2 +- src/pcap/{spp_proc.c => cmd_utils.c} | 2 +- src/pcap/{spp_proc.h => cmd_utils.h} | 6 +++--- src/pcap/command_dec.h | 2 +- src/pcap/command_proc.h | 2 +- src/pcap/spp_pcap.c | 2 +- src/pcap/spp_pcap.h | 2 +- src/shared/secondary/spp_worker_th/cmd_parser.h | 2 +- src/shared/secondary/spp_worker_th/cmd_runner.h | 6 +++--- .../spp_worker_th/{spp_proc.c => cmd_utils.c} | 2 +- .../spp_worker_th/{spp_proc.h => cmd_utils.h} | 11 +++++------ src/shared/secondary/spp_worker_th/command_conn.h | 2 +- src/shared/secondary/spp_worker_th/mirror_deps.h | 2 +- src/shared/secondary/spp_worker_th/ringlatencystats.c | 2 +- src/shared/secondary/spp_worker_th/spp_port.h | 8 ++++---- src/shared/secondary/spp_worker_th/vf_deps.h | 8 ++++---- src/vf/Makefile | 2 +- src/vf/spp_vf.c | 2 +- 20 files changed, 34 insertions(+), 35 deletions(-) rename src/pcap/{spp_proc.c => cmd_utils.c} (99%) rename src/pcap/{spp_proc.h => cmd_utils.h} (99%) rename src/shared/secondary/spp_worker_th/{spp_proc.c => cmd_utils.c} (99%) rename src/shared/secondary/spp_worker_th/{spp_proc.h => cmd_utils.h} (99%) diff --git a/src/mirror/Makefile b/src/mirror/Makefile index 07bf7ca..d1ae9ce 100644 --- a/src/mirror/Makefile +++ b/src/mirror/Makefile @@ -17,7 +17,7 @@ SPP_WKT_DIR = ../shared/secondary/spp_worker_th SRCS-y := spp_mirror.c SRCS-y += ../shared/common.c SRCS-y += ../shared/secondary/utils.c ../shared/secondary/add_port.c -SRCS-y += $(SPP_WKT_DIR)/spp_proc.c +SRCS-y += $(SPP_WKT_DIR)/cmd_utils.c SRCS-y += $(SPP_WKT_DIR)/spp_port.c SRCS-y += $(SPP_WKT_DIR)/command_conn.c SRCS-y += $(SPP_WKT_DIR)/cmd_parser.c diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c index 26c250b..574e31f 100644 --- a/src/mirror/spp_mirror.c +++ b/src/mirror/spp_mirror.c @@ -14,7 +14,7 @@ #include "shared/secondary/utils.h" #include "shared/secondary/spp_worker_th/cmd_runner.h" #include "shared/secondary/spp_worker_th/cmd_parser.h" -#include "shared/secondary/spp_worker_th/spp_proc.h" +#include "shared/secondary/spp_worker_th/cmd_utils.h" #include "shared/secondary/spp_worker_th/spp_port.h" /* Declare global variables */ diff --git a/src/pcap/Makefile b/src/pcap/Makefile index a58b79a..e5e0b00 100644 --- a/src/pcap/Makefile +++ b/src/pcap/Makefile @@ -15,7 +15,7 @@ SPP_WKT_DIR = ../shared/secondary/spp_worker_th # all source are stored in SRCS-y SRCS-y := spp_pcap.c -SRCS-y += spp_proc.c +SRCS-y += cmd_utils.c SRCS-y += command_proc.c command_dec.c SRCS-y += ../shared/common.c SRCS-y += $(SPP_WKT_DIR)/command_conn.c diff --git a/src/pcap/spp_proc.c b/src/pcap/cmd_utils.c similarity index 99% rename from src/pcap/spp_proc.c rename to src/pcap/cmd_utils.c index 4e3b2c9..be12058 100644 --- a/src/pcap/spp_proc.c +++ b/src/pcap/cmd_utils.c @@ -8,7 +8,7 @@ #include #include -#include "spp_proc.h" +#include "cmd_utils.h" #define RTE_LOGTYPE_SPP_PROC RTE_LOGTYPE_USER2 diff --git a/src/pcap/spp_proc.h b/src/pcap/cmd_utils.h similarity index 99% rename from src/pcap/spp_proc.h rename to src/pcap/cmd_utils.h index 2265b21..61b6da5 100644 --- a/src/pcap/spp_proc.h +++ b/src/pcap/cmd_utils.h @@ -2,8 +2,8 @@ * Copyright(c) 2018 Nippon Telegraph and Telephone Corporation */ -#ifndef _SPP_PROC_H_ -#define _SPP_PROC_H_ +#ifndef _SPPWK_CMD_UTILS_H_ +#define _SPPWK_CMD_UTILS_H_ /** * @file @@ -386,4 +386,4 @@ void spp_get_mng_data_addr(struct startup_param **startup_param_addr, int **capture_request_addr, int **capture_status_addr); -#endif /* _SPP_PROC_H_ */ +#endif /* _SPPWK_CMD_UTILS_H_ */ diff --git a/src/pcap/command_dec.h b/src/pcap/command_dec.h index 0835382..84f7ae6 100644 --- a/src/pcap/command_dec.h +++ b/src/pcap/command_dec.h @@ -12,7 +12,7 @@ * Decode and validate the command message string. */ -#include "spp_proc.h" +#include "cmd_utils.h" /** max number of command per request */ #define SPP_CMD_MAX_COMMANDS 32 diff --git a/src/pcap/command_proc.h b/src/pcap/command_proc.h index 8094649..cbaf6a2 100644 --- a/src/pcap/command_proc.h +++ b/src/pcap/command_proc.h @@ -13,7 +13,7 @@ * result JSON formatted data. */ -#include "spp_proc.h" +#include "cmd_utils.h" /** * initialize command processor. diff --git a/src/pcap/spp_pcap.c b/src/pcap/spp_pcap.c index f8f3f79..b048237 100644 --- a/src/pcap/spp_pcap.c +++ b/src/pcap/spp_pcap.c @@ -13,7 +13,7 @@ #include #include "shared/common.h" -#include "spp_proc.h" +#include "cmd_utils.h" #include "spp_pcap.h" #include "command_proc.h" #include "command_dec.h" diff --git a/src/pcap/spp_pcap.h b/src/pcap/spp_pcap.h index d282226..6a4ded7 100644 --- a/src/pcap/spp_pcap.h +++ b/src/pcap/spp_pcap.h @@ -5,7 +5,7 @@ #ifndef __SPP_PCAP_H__ #define __SPP_PCAP_H__ -#include "spp_proc.h" +#include "cmd_utils.h" /** * @file diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.h b/src/shared/secondary/spp_worker_th/cmd_parser.h index c8839f1..de4dcba 100644 --- a/src/shared/secondary/spp_worker_th/cmd_parser.h +++ b/src/shared/secondary/spp_worker_th/cmd_parser.h @@ -10,7 +10,7 @@ * @brief Define a set of vars and functions for parsing SPP worker commands. */ -#include "spp_proc.h" +#include "cmd_utils.h" /* Maximum number of commands per request. */ #define SPPWK_MAX_CMDS 32 diff --git a/src/shared/secondary/spp_worker_th/cmd_runner.h b/src/shared/secondary/spp_worker_th/cmd_runner.h index 4b768b7..5c79247 100644 --- a/src/shared/secondary/spp_worker_th/cmd_runner.h +++ b/src/shared/secondary/spp_worker_th/cmd_runner.h @@ -6,14 +6,14 @@ #define _SPPWK_CMD_RUNNER_H_ /** - * @file - * Run command for SPP worker thread. + * @file cmd_runner.h * + * Run command for SPP worker thread. * Receive command message from SPP controller and run. The result is returned * to SPP controller as a JSON formatted message. */ -#include "spp_proc.h" +#include "cmd_utils.h" /** * Setup connection for accepting commands from spp-ctl. diff --git a/src/shared/secondary/spp_worker_th/spp_proc.c b/src/shared/secondary/spp_worker_th/cmd_utils.c similarity index 99% rename from src/shared/secondary/spp_worker_th/spp_proc.c rename to src/shared/secondary/spp_worker_th/cmd_utils.c index 3cdc108..46aa118 100644 --- a/src/shared/secondary/spp_worker_th/spp_proc.c +++ b/src/shared/secondary/spp_worker_th/cmd_utils.c @@ -13,7 +13,7 @@ #include "vf_deps.h" #include "mirror_deps.h" -#include "spp_proc.h" +#include "cmd_utils.h" #include "spp_port.h" #include "shared/secondary/add_port.h" diff --git a/src/shared/secondary/spp_worker_th/spp_proc.h b/src/shared/secondary/spp_worker_th/cmd_utils.h similarity index 99% rename from src/shared/secondary/spp_worker_th/spp_proc.h rename to src/shared/secondary/spp_worker_th/cmd_utils.h index c066f0c..7f15ea6 100644 --- a/src/shared/secondary/spp_worker_th/spp_proc.h +++ b/src/shared/secondary/spp_worker_th/cmd_utils.h @@ -2,14 +2,13 @@ * Copyright(c) 2018-2019 Nippon Telegraph and Telephone Corporation */ -#ifndef _SPP_PROC_H_ -#define _SPP_PROC_H_ +#ifndef _SPPWK_CMD_UTILS_H_ +#define _SPPWK_CMD_UTILS_H_ /** - * @file - * SPP process + * @file cmd_utils.h * - * SPP component common function. + * Command utility functions for SPP worker thread. */ #include @@ -698,4 +697,4 @@ void sppwk_get_mng_data(struct startup_param **startup_param_p, int **change_component_p, struct cancel_backup_info **backup_info_p); -#endif /* _SPP_PROC_H_ */ +#endif /* _SPPWK_CMD_UTILS_H_ */ diff --git a/src/shared/secondary/spp_worker_th/command_conn.h b/src/shared/secondary/spp_worker_th/command_conn.h index 517c0e9..9112847 100644 --- a/src/shared/secondary/spp_worker_th/command_conn.h +++ b/src/shared/secondary/spp_worker_th/command_conn.h @@ -12,7 +12,7 @@ * Command connection management. */ -#include "spp_proc.h" +#include "cmd_utils.h" /** result code - temporary error. please retry */ #define SPP_CONNERR_TEMPORARY -1 diff --git a/src/shared/secondary/spp_worker_th/mirror_deps.h b/src/shared/secondary/spp_worker_th/mirror_deps.h index 31d64b7..02e64d9 100644 --- a/src/shared/secondary/spp_worker_th/mirror_deps.h +++ b/src/shared/secondary/spp_worker_th/mirror_deps.h @@ -5,7 +5,7 @@ #ifndef __SPP_WORKER_TH_MIRROR_DEPS_H__ #define __SPP_WORKER_TH_MIRROR_DEPS_H__ -#include "spp_proc.h" +#include "cmd_utils.h" /** * Update Mirror info diff --git a/src/shared/secondary/spp_worker_th/ringlatencystats.c b/src/shared/secondary/spp_worker_th/ringlatencystats.c index 6ea5a7e..e0cc1aa 100644 --- a/src/shared/secondary/spp_worker_th/ringlatencystats.c +++ b/src/shared/secondary/spp_worker_th/ringlatencystats.c @@ -15,7 +15,7 @@ #include #include "ringlatencystats.h" -#include "spp_proc.h" +#include "cmd_utils.h" #define NS_PER_SEC 1E9 diff --git a/src/shared/secondary/spp_worker_th/spp_port.h b/src/shared/secondary/spp_worker_th/spp_port.h index 10409ab..1f8161a 100644 --- a/src/shared/secondary/spp_worker_th/spp_port.h +++ b/src/shared/secondary/spp_worker_th/spp_port.h @@ -2,8 +2,8 @@ * Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation */ -#ifndef __SPP_PORT_H__ -#define __SPP_PORT_H__ +#ifndef _SPP_PORT_H_ +#define _SPP_PORT_H_ /** * @file @@ -12,7 +12,7 @@ * Provide about the ability per port. */ -#include "spp_proc.h" +#include "cmd_utils.h" /** Calculate TCI of VLAN tag. */ #define SPP_VLANTAG_CALC_TCI(id, pcp) (((pcp & 0x07) << 13) | (id & 0x0fff)) @@ -110,4 +110,4 @@ uint16_t spp_eth_rx_burst(uint16_t port_id, uint16_t queue_id, uint16_t spp_eth_tx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); -#endif /* __SPP_PORT_H__ */ +#endif /* _SPP_PORT_H_ */ diff --git a/src/shared/secondary/spp_worker_th/vf_deps.h b/src/shared/secondary/spp_worker_th/vf_deps.h index 136c49e..4b9cecf 100644 --- a/src/shared/secondary/spp_worker_th/vf_deps.h +++ b/src/shared/secondary/spp_worker_th/vf_deps.h @@ -2,12 +2,12 @@ * Copyright(c) 2019 Nippon Telegraph and Telephone Corporation */ -#ifndef __SPP_WORKER_TH_VF_DEPS_H__ -#define __SPP_WORKER_TH_VF_DEPS_H__ +#ifndef _SPPWK_TH_VF_DEPS_H_ +#define _SPPWK_TH_VF_DEPS_H_ #include #include -#include "spp_proc.h" +#include "cmd_utils.h" /* number of classifier information (reference/update) */ #define NUM_CLASSIFIER_MAC_INFO 2 @@ -149,4 +149,4 @@ int spp_forward_get_component_status( unsigned int lcore_id, int id, struct spp_iterate_core_params *params); -#endif /* __SPP_WORKER_TH_VF_DEPS_H__ */ +#endif /* _SPPWK_TH_VF_DEPS_H_ */ diff --git a/src/vf/Makefile b/src/vf/Makefile index 399871f..bdeff98 100644 --- a/src/vf/Makefile +++ b/src/vf/Makefile @@ -21,7 +21,7 @@ SRCS-y += $(SPP_WKT_DIR)/spp_port.c SRCS-y += $(SPP_WKT_DIR)/command_conn.c SRCS-y += $(SPP_WKT_DIR)/cmd_parser.c SRCS-y += $(SPP_WKT_DIR)/cmd_runner.c -SRCS-y += $(SPP_WKT_DIR)/spp_proc.c +SRCS-y += $(SPP_WKT_DIR)/cmd_utils.c SRCS-y += ../shared/common.c SRCS-y += ../shared/secondary/utils.c ../shared/secondary/add_port.c diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c index 5075c95..fd8944f 100644 --- a/src/vf/spp_vf.c +++ b/src/vf/spp_vf.c @@ -6,7 +6,7 @@ #include #include -#include "shared/secondary/spp_worker_th/spp_proc.h" +#include "shared/secondary/spp_worker_th/cmd_utils.h" #include "spp_vf.h" #include "classifier_mac.h" #include "spp_forward.h" -- 2.17.1