summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Qiuwen <[email protected]>2022-07-05 23:57:02 -0400
committerLu Qiuwen <[email protected]>2022-07-05 23:57:02 -0400
commit23c9f9f11fcd7b4261d8c1805415b903f36fbb9d (patch)
tree523190a94cc8ac83951c7ec5649d1435f958127b
parente38dda5e172b2698e92ed02981e1253ac62af697 (diff)
修正vlan_fwd服务没有注册入口函数的问题。v4.5.3-20220706
-rw-r--r--service/src/core.c15
-rw-r--r--service/src/phydev.c2
-rw-r--r--service/src/vlan_fwd.c2
3 files changed, 18 insertions, 1 deletions
diff --git a/service/src/core.c b/service/src/core.c
index dd9647e..a009468 100644
--- a/service/src/core.c
+++ b/service/src/core.c
@@ -806,14 +806,17 @@ void service_performance_calc_cycle_per_loop(struct service_performance_monit *
}
static struct service_performance_monit sw_info_sw_fwd;
+static struct service_performance_monit sw_info_sw_vlan_fwd;
static struct service_performance_monit sw_info_smartoffload;
cJSON * service_monit_loop(struct sc_main * sc)
{
uint64_t cycle_per_call_counts_sw_fwd = 0;
+ uint64_t cycle_per_call_counts_sw_vlan_fwd = 0;
uint64_t cycle_per_call_counts_smartoffload = 0;
service_performance_calc_cycle_per_loop(&sw_info_sw_fwd, &cycle_per_call_counts_sw_fwd);
+ service_performance_calc_cycle_per_loop(&sw_info_sw_vlan_fwd, &cycle_per_call_counts_sw_vlan_fwd);
service_performance_calc_cycle_per_loop(&sw_info_smartoffload, &cycle_per_call_counts_smartoffload);
cJSON * j_root = cJSON_CreateArray();
@@ -823,6 +826,11 @@ cJSON * service_monit_loop(struct sc_main * sc)
cJSON_AddNumberToObject(j_serv_sw_fwd, "cycles_per_call_count", cycle_per_call_counts_sw_fwd);
cJSON_AddItemToArray(j_root, j_serv_sw_fwd);
+ cJSON * j_serv_sw_vlan_fwd = cJSON_CreateObject();
+ cJSON_AddStringToObject(j_serv_sw_vlan_fwd, "symbol", "sw_vlan_fwd");
+ cJSON_AddNumberToObject(j_serv_sw_vlan_fwd, "cycles_per_call_count", cycle_per_call_counts_sw_vlan_fwd);
+ cJSON_AddItemToArray(j_root, j_serv_sw_vlan_fwd);
+
cJSON * j_serv_smartoffload = cJSON_CreateObject();
cJSON_AddStringToObject(j_serv_smartoffload, "symbol", "smartoffload");
cJSON_AddNumberToObject(j_serv_smartoffload, "cycles_per_call_count", cycle_per_call_counts_smartoffload);
@@ -1204,6 +1212,13 @@ int main(int argc, char * argv[])
goto quit;
}
+ ret = __rte_service_register_helper(&sw_vlan_base_fwd_service_spec, &sc->cpu_set_io, &sw_info_sw_vlan_fwd.service_id);
+ if(unlikely(ret < 0))
+ {
+ MR_ERROR("Failed at starting service %s", sw_vlan_base_fwd_service_spec.name);
+ goto quit;
+ }
+
ret = __rte_service_register_helper(&smartoffload_spec, &sc->cpu_set_offload, &sw_info_smartoffload.service_id);
if (unlikely(ret < 0))
{
diff --git a/service/src/phydev.c b/service/src/phydev.c
index ae44299..e691651 100644
--- a/service/src/phydev.c
+++ b/service/src/phydev.c
@@ -425,7 +425,7 @@ static int phydev_setup_default_flows(struct sc_main * sc, struct phydev_main *
/* TODO: maybe we have much more better way to do the symmetric hash */
struct rte_flow_action_rss rss = {
.level = 0,
- .queue = &target_queue_id,
+ .queue = target_queue_id,
.queue_num = dev->nr_rxq,
.types = rss_type,
.key = rss_key,
diff --git a/service/src/vlan_fwd.c b/service/src/vlan_fwd.c
index f4b0b9b..624fdf5 100644
--- a/service/src/vlan_fwd.c
+++ b/service/src/vlan_fwd.c
@@ -256,6 +256,8 @@ struct vb_fwd_table * vlan_table_lookup(struct vb_fwd_table_list * list, port_id
{
return vb_fwd_table_iter;
}
+
+ return NULL;
}
/*