#include "pipeline_passthrough.h"
#include "pipeline_firewall.h"
#include "pipeline_flow_classification.h"
+#include "pipeline_flow_actions.h"
#include "pipeline_routing.h"
+#include "thread_fe.h"
#define APP_NAME_SIZE 32
"init error\n", params->name);
}
+ data->ptype = ptype;
+
data->timer_period = (rte_get_tsc_hz() * params->timer_period)
/ 1000;
}
t = &app->thread_data[lcore_id];
+ t->timer_period = (rte_get_tsc_hz() * APP_THREAD_TIMER_PERIOD) / 1000;
+ t->thread_req_deadline = time + t->timer_period;
+
+ t->msgq_in = app_thread_msgq_in_get(app,
+ params->socket_id,
+ params->core_id,
+ params->hyper_th_id);
+ if (t->msgq_in == NULL)
+ rte_panic("Init error: Cannot find MSGQ_IN for thread %" PRId32,
+ lcore_id);
+
+ t->msgq_out = app_thread_msgq_out_get(app,
+ params->socket_id,
+ params->core_id,
+ params->hyper_th_id);
+ if (t->msgq_out == NULL)
+ rte_panic("Init error: Cannot find MSGQ_OUT for thread %" PRId32,
+ lcore_id);
+
ptype = app_pipeline_type_find(app, params->type);
if (ptype == NULL)
rte_panic("Init error: Unknown pipeline "
&t->regular[t->n_regular] :
&t->custom[t->n_custom];
+ p->pipeline_id = p_id;
p->be = data->be;
p->f_run = ptype->be_ops->f_run;
p->f_timer = ptype->be_ops->f_timer;
p->timer_period = data->timer_period;
p->deadline = time + data->timer_period;
+ data->enabled = 1;
+
if (ptype->be_ops->f_run == NULL)
t->n_regular++;
else
app_init_msgq(app);
app_pipeline_common_cmd_push(app);
+ app_pipeline_thread_cmd_push(app);
app_pipeline_type_register(app, &pipeline_master);
app_pipeline_type_register(app, &pipeline_passthrough);
app_pipeline_type_register(app, &pipeline_flow_classification);
+ app_pipeline_type_register(app, &pipeline_flow_actions);
app_pipeline_type_register(app, &pipeline_firewall);
app_pipeline_type_register(app, &pipeline_routing);
/* Push pipeline commands into the application */
memcpy(&app->cmds[app->n_cmds],
cmds,
- n_cmds * sizeof(cmdline_parse_ctx_t *));
+ n_cmds * sizeof(cmdline_parse_ctx_t));
for (i = 0; i < n_cmds; i++)
app->cmds[app->n_cmds + i]->data = app;