执行resetall指令:Sapp重启后发送resetall状态通知SCE清空流表
This commit is contained in:
@@ -1186,12 +1186,17 @@ static int handle_session_resetall(struct metadata *meta, struct ctrl_pkt_parser
|
||||
{
|
||||
struct thread_ctx *thread = (struct thread_ctx *)ctx;
|
||||
struct global_metrics *g_metrics = thread->ref_metrics;
|
||||
struct sce_ctx *sce_ctx = thread->ref_sce_ctx;
|
||||
|
||||
LOG_ERROR("%s: session %lu notification clears all session tables !!!", LOG_TAG_PKTIO, meta->session_id);
|
||||
|
||||
__atomic_fetch_and(&g_metrics->session_nums, 0, __ATOMIC_RELAXED);
|
||||
|
||||
// TODO reset all session_table
|
||||
for (int i = 0; i < sce_ctx->nr_worker_threads; i++)
|
||||
{
|
||||
struct thread_ctx *thread_ctx = &sce_ctx->work_threads[i];
|
||||
__atomic_fetch_add(&thread_ctx->session_table_need_reset, 1, __ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user