summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasufumi Ogawa <yasufum.o@gmail.com>2019-09-12 20:40:35 +0900
committerYasufumi Ogawa <yasufum.o@gmail.com>2019-10-04 22:06:14 +0900
commit0d2c48c45b3de6b150f7405195c6c2358f9b1730 (patch)
treed9446c3c1307e83869a5658efcbff2f689d019ae
parent293cbf1932c74db60c6b1ccc0fc99356433e6cd8 (diff)
downloadspp-0d2c48c45b3de6b150f7405195c6c2358f9b1730.zip
spp-0d2c48c45b3de6b150f7405195c6c2358f9b1730.tar.gz
spp-0d2c48c45b3de6b150f7405195c6c2358f9b1730.tar.xz
shared: rename func spp_check_used_port
This update is to rename spp_check_used_port() to sppwk_check_used_port() for conventions. Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
-rw-r--r--src/shared/secondary/spp_worker_th/cmd_parser.c6
-rw-r--r--src/shared/secondary/spp_worker_th/cmd_utils.c6
-rw-r--r--src/shared/secondary/spp_worker_th/cmd_utils.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/shared/secondary/spp_worker_th/cmd_parser.c b/src/shared/secondary/spp_worker_th/cmd_parser.c
index a136b84..3f947f5 100644
--- a/src/shared/secondary/spp_worker_th/cmd_parser.c
+++ b/src/shared/secondary/spp_worker_th/cmd_parser.c
@@ -463,10 +463,10 @@ parse_port(void *output, const char *arg_val, int allow_override)
/* If action is `add`, check the port is already used for rx and tx. */
if (allow_override == 0) {
if ((port->wk_action == SPPWK_ACT_ADD) &&
- (spp_check_used_port(tmp_port.iface_type,
+ (sppwk_check_used_port(tmp_port.iface_type,
tmp_port.iface_no,
SPPWK_PORT_DIR_RX) >= 0) &&
- (spp_check_used_port(tmp_port.iface_type,
+ (sppwk_check_used_port(tmp_port.iface_type,
tmp_port.iface_no,
SPPWK_PORT_DIR_TX) >= 0)) {
RTE_LOG(ERR, WK_CMD_PARSER,
@@ -498,7 +498,7 @@ parse_port_direction(void *output, const char *arg_val, int allow_override)
/* add vlantag command check */
if (allow_override == 0) {
if ((port->wk_action == SPPWK_ACT_ADD) &&
- (spp_check_used_port(port->port.iface_type,
+ (sppwk_check_used_port(port->port.iface_type,
port->port.iface_no, ret) >= 0)) {
RTE_LOG(ERR, WK_CMD_PARSER,
"Port in used. (port command) val=%s\n",
diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.c b/src/shared/secondary/spp_worker_th/cmd_utils.c
index 1606d4f..f3d5de8 100644
--- a/src/shared/secondary/spp_worker_th/cmd_utils.c
+++ b/src/shared/secondary/spp_worker_th/cmd_utils.c
@@ -519,7 +519,7 @@ sppwk_is_lcore_updated(unsigned int lcore_id)
/* Check if component is using port. */
int
-spp_check_used_port(
+sppwk_check_used_port(
enum port_type iface_type,
int iface_no,
enum sppwk_port_dir dir)
@@ -562,14 +562,14 @@ set_component_change_port(struct sppwk_port_info *port,
{
int ret = 0;
if ((dir == SPPWK_PORT_DIR_RX) || (dir == SPPWK_PORT_DIR_BOTH)) {
- ret = spp_check_used_port(port->iface_type, port->iface_no,
+ ret = sppwk_check_used_port(port->iface_type, port->iface_no,
SPPWK_PORT_DIR_RX);
if (ret >= 0)
*(g_mng_data.p_change_component + ret) = 1;
}
if ((dir == SPPWK_PORT_DIR_TX) || (dir == SPPWK_PORT_DIR_BOTH)) {
- ret = spp_check_used_port(port->iface_type, port->iface_no,
+ ret = sppwk_check_used_port(port->iface_type, port->iface_no,
SPPWK_PORT_DIR_TX);
if (ret >= 0)
*(g_mng_data.p_change_component + ret) = 1;
diff --git a/src/shared/secondary/spp_worker_th/cmd_utils.h b/src/shared/secondary/spp_worker_th/cmd_utils.h
index db12e75..df1b0dc 100644
--- a/src/shared/secondary/spp_worker_th/cmd_utils.h
+++ b/src/shared/secondary/spp_worker_th/cmd_utils.h
@@ -225,7 +225,7 @@ int sppwk_is_lcore_updated(unsigned int lcore_id);
* @retval 0~127 If match component ID
* @retval SPPWK_RET_NG If failed.
*/
-int spp_check_used_port(
+int sppwk_check_used_port(
enum port_type iface_type,
int iface_no,
enum sppwk_port_dir dir);