Skip to content

Commit

Permalink
Fix per comments:
Browse files Browse the repository at this point in the history
1. not enable dpdk_plugin.so, then not need hugepage allocation
2. Update NODE_FN dash_node to be simple
  • Loading branch information
jimmyzhai committed Nov 22, 2024
1 parent 073d10d commit 2e81843
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 359 deletions.
28 changes: 5 additions & 23 deletions dash-pipeline/dpapp/dash/dash.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @brief Dash Plugin, plugin API / trace / CLI handling.
Expand Down Expand Up @@ -183,19 +169,15 @@ VNET_FEATURE_ARC_INIT (dash_pipeline, static) =
static uword
dash_timer_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
{

int i;
f64 sleep_duration = 1.0;

unix_sleep (5.0); /* FIXME: delay 5s */

while (1)
{
/* FIXME: Use time-wheel per-worker thread later */
//for (i = 1; i < vlib_get_n_threads(); i++) {
vlib_node_set_interrupt_pending (vlib_get_main_by_index(1),
dash_flow_scan_node.index);
//}
/*
* Notify the first worker thread to scan flow table
*/
vlib_node_set_interrupt_pending (vlib_get_main_by_index(1),
dash_flow_scan_node.index);

vlib_process_suspend (vm, sleep_duration);
}
Expand Down
14 changes: 0 additions & 14 deletions dash-pipeline/dpapp/dash/dash.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __included_dash_h__
#define __included_dash_h__

Expand Down
14 changes: 0 additions & 14 deletions dash-pipeline/dpapp/dash/dash_test.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
*------------------------------------------------------------------
* dash_test.c - test harness plugin
Expand Down
10 changes: 6 additions & 4 deletions dash-pipeline/dpapp/dash/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ dash_flow_show_walk_cb (BVT (clib_bihash_kv) * kvp, void *arg)
offsetof(dash_flow_entry_t, flow_data));

vlib_cli_output (ctx->vm, "%6u: %U", flow->index, dash_flow_format, flow);

return BIHASH_WALK_CONTINUE;
}

static clib_error_t *
Expand Down Expand Up @@ -382,13 +384,13 @@ dash_cmd_show_flow_stats_fn (vlib_main_t * vm,
clib_error_t *error = 0;
dash_flow_table_t *flow_table = dash_flow_table_get();

vlib_cli_output (vm, "%10s: %u", "create_ok",
vlib_cli_output (vm, "%12s: %u", "create_ok",
flow_table->flow_stats.create_ok);
vlib_cli_output (vm, "%10s: %u", "create_fail",
vlib_cli_output (vm, "%12s: %u", "create_fail",
flow_table->flow_stats.create_fail);
vlib_cli_output (vm, "%10s: %u", "remove_ok",
vlib_cli_output (vm, "%12s: %u", "remove_ok",
flow_table->flow_stats.remove_ok);
vlib_cli_output (vm, "%10s: %u", "remove_fail",
vlib_cli_output (vm, "%12s: %u", "remove_fail",
flow_table->flow_stats.remove_fail);

return error;
Expand Down
Loading

0 comments on commit 2e81843

Please sign in to comment.