[spp] [PATCH] spp_pcap: rename function spp_format_port_stirng

yasufum.o at gmail.com yasufum.o at gmail.com
Tue Sep 17 12:35:00 CEST 2019


From: Yasufumi Ogawa <yasufum.o at gmail.com>

This update is to rename spp_format_port_stirng() which is for getting
port type as resource UID to sppwk_port_uid().

Signed-off-by: Yasufumi Ogawa <yasufum.o at gmail.com>
---
 src/pcap/cmd_runner.c |  2 +-
 src/pcap/cmd_utils.c  |  2 +-
 src/pcap/cmd_utils.h  | 18 +-----------------
 3 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/src/pcap/cmd_runner.c b/src/pcap/cmd_runner.c
index ac5181d..85c02cd 100644
--- a/src/pcap/cmd_runner.c
+++ b/src/pcap/cmd_runner.c
@@ -398,7 +398,7 @@ append_port_entry(char **output, const struct sppwk_port_idx *port,
 		return SPPWK_RET_NG;
 	}
 
-	spp_format_port_string(port_str, port->iface_type, port->iface_no);
+	sppwk_port_uid(port_str, port->iface_type, port->iface_no);
 	ret = append_json_str_value("port", &tmp_buff, port_str);
 	if (unlikely(ret < SPPWK_RET_OK))
 		return SPPWK_RET_NG;
diff --git a/src/pcap/cmd_utils.c b/src/pcap/cmd_utils.c
index 3c71b2e..5aa131b 100644
--- a/src/pcap/cmd_utils.c
+++ b/src/pcap/cmd_utils.c
@@ -263,7 +263,7 @@ init_mng_data(void)
  * Generate a formatted string of combination from interface type and
  * number and assign to given 'port'
  */
-int spp_format_port_string(char *port, enum port_type iface_type, int iface_no)
+int sppwk_port_uid(char *port, enum port_type iface_type, int iface_no)
 {
 	const char *iface_type_str;
 
diff --git a/src/pcap/cmd_utils.h b/src/pcap/cmd_utils.h
index 2e78c69..95b8a8a 100644
--- a/src/pcap/cmd_utils.h
+++ b/src/pcap/cmd_utils.h
@@ -113,23 +113,7 @@ struct core_info *get_core_info(unsigned int lcore_id);
  */
 /* TODO(yasufum) consider to merge to shared. */
 int
-spp_format_port_string(char *port, enum port_type iface_type, int iface_no);
-
-/**
- * Port type to string
- *
- * @param port
- *  Character string of Port type to be converted.
- * @param iface_type
- *  port interface type
- * @param iface_no
- *  interface no
- *
- * @retval SPPWK_RET_OK succeeded.
- * @retval SPPWK_RET_NG failed.
- */
-int
-spp_format_port_string(char *port, enum port_type iface_type, int iface_no);
+sppwk_port_uid(char *port, enum port_type iface_type, int iface_no);
 
 /**
  * Set mange data address
-- 
2.17.1



More information about the spp mailing list