From: x-fn-spp@sl.ntt-tx.co.jp
To: ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Cc: spp@dpdk.org
Subject: [spp] [PATCH v2 4/5] spp_vf: remove to check unused cores no needed
Date: Tue, 12 Feb 2019 18:16:13 +0900 [thread overview]
Message-ID: <201902120916.x1C9GEXv025680@imss03.silk.ntt-tx.co.jp> (raw)
In-Reply-To: <20190212091614.24285-1-x-fn-spp@sl.ntt-tx.co.jp>
From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Checking unused core is no needed anymore after core sharing feature
is introduced. This patch removes `type` from struct `core_info` which
is used for checking unused or not.
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki@lab.ntt.co.jp>
---
src/vf/common/command_dec.c | 13 +------------
src/vf/common/command_proc.c | 10 ----------
src/vf/common/spp_proc.c | 14 +++++---------
src/vf/common/spp_proc.h | 4 +---
4 files changed, 7 insertions(+), 34 deletions(-)
diff --git a/src/vf/common/command_dec.c b/src/vf/common/command_dec.c
index 61dd4f4..4c3e62a 100644
--- a/src/vf/common/command_dec.c
+++ b/src/vf/common/command_dec.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation
+ * Copyright(c) 2017-2019 Nippon Telegraph and Telephone Corporation
*/
#include <unistd.h>
@@ -94,17 +94,6 @@ const char *PORT_ABILITY_STRINGS[] = {
/* termination */ "",
};
-/* Get component type being updated on target core */
-static enum spp_component_type
-spp_get_component_type_update(unsigned int lcore_id)
-{
- struct core_mng_info *core_info;
-
- spp_get_mng_data_addr(NULL, NULL, NULL, &core_info, NULL, NULL, NULL);
- struct core_mng_info *info = (core_info + lcore_id);
- return info->core[info->upd_index].type;
-}
-
/* Check mac address used on the port for registering or removing */
static int
spp_check_classid_used_port(
diff --git a/src/vf/common/command_proc.c b/src/vf/common/command_proc.c
index 3f44174..06e50e6 100644
--- a/src/vf/common/command_proc.c
+++ b/src/vf/common/command_proc.c
@@ -270,12 +270,6 @@ spp_update_component(
}
core = &info->core[info->upd_index];
- if ((core->type != SPP_COMPONENT_UNUSE) &&
- (core->type != type)) {
- RTE_LOG(ERR, APP, "Component type '%s' is invalid.\n",
- name);
- return SPP_RET_NG;
- }
component = (component_info + component_id);
memset(component, 0x00, sizeof(struct spp_component_info));
@@ -284,7 +278,6 @@ spp_update_component(
component->lcore_id = lcore_id;
component->component_id = component_id;
- core->type = type;
core->id[core->num] = component_id;
core->num++;
ret = SPP_RET_OK;
@@ -316,9 +309,6 @@ spp_update_component(
/* If deleted, decrement number. */
core->num--;
- if (core->num == 0)
- core->type = SPP_COMPONENT_UNUSE;
-
ret = SPP_RET_OK;
*(change_component + component_id) = 0;
break;
diff --git a/src/vf/common/spp_proc.c b/src/vf/common/spp_proc.c
index 9a118bd..cf0d760 100644
--- a/src/vf/common/spp_proc.c
+++ b/src/vf/common/spp_proc.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
+ * Copyright(c) 2018-2019 Nippon Telegraph and Telephone Corporation
*/
#include <unistd.h>
@@ -290,15 +290,11 @@ dump_core_info(const struct core_mng_info *core_info)
lcore_id, info->status,
info->ref_index, info->upd_index);
- sprintf(str, "core[%d]-0 type=%d, num=%d", lcore_id,
- info->core[0].type, info->core[0].num);
- dump_buff(str, info->core[0].id,
- sizeof(int)*info->core[0].num);
+ memset(str, 0x00, SPP_NAME_STR_LEN);
+ dump_buff(str, info->core[0].id, sizeof(int)*info->core[0].num);
- sprintf(str, "core[%d]-1 type=%d, num=%d", lcore_id,
- info->core[1].type, info->core[1].num);
- dump_buff(str, info->core[1].id,
- sizeof(int)*info->core[1].num);
+ sprintf(str, "core[%d]-1 num=%d", lcore_id, info->core[1].num);
+ dump_buff(str, info->core[1].id, sizeof(int)*info->core[1].num);
}
}
diff --git a/src/vf/common/spp_proc.h b/src/vf/common/spp_proc.h
index 2fc8cc2..8112af3 100644
--- a/src/vf/common/spp_proc.h
+++ b/src/vf/common/spp_proc.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
+ * Copyright(c) 2018-2019 Nippon Telegraph and Telephone Corporation
*/
#ifndef _SPP_PROC_H_
@@ -244,8 +244,6 @@ struct iface_info {
/* Manage component running in core as global variable */
struct core_info {
- volatile enum spp_component_type type;
- /* Component type */
int num; /* The number of IDs below */
int id[RTE_MAX_LCORE]; /* ID list of components executed on cpu core */
};
--
2.17.1
next prev parent reply other threads:[~2019-02-12 9:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190212091614.24285-1-x-fn-spp@sl.ntt-tx.co.jp>
2019-02-12 9:16 ` [spp] [PATCH v2 1/5] spp_vf: remove while loop in classifier_mac x-fn-spp
2019-02-12 9:16 ` [spp] [PATCH v2 2/5] spp_vf: change to handle multiples component x-fn-spp
2019-02-12 9:16 ` [spp] [PATCH v2 3/5] spp_vf: move classifier component init x-fn-spp
2019-02-12 9:16 ` x-fn-spp [this message]
2019-02-12 9:16 ` [spp] [PATCH v2 5/5] spp_vf: change retrieve component type x-fn-spp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201902120916.x1C9GEXv025680@imss03.silk.ntt-tx.co.jp \
--to=x-fn-spp@sl.ntt-tx.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=ogawa.yasufumi@lab.ntt.co.jp \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).