SCE增加CPU绑核,install时部署table_info.conf

This commit is contained in:
luwenpeng
2023-03-02 16:13:02 +08:00
parent 73486ef55d
commit 336e5a7bf3
8 changed files with 50 additions and 7 deletions

View File

@@ -10,6 +10,8 @@ extern "C"
#include "packet_io.h"
#include "session_table.h"
#define MAX_THREAD_NUM 128
/******************************************************************************
* Struct For Thread
******************************************************************************/
@@ -28,6 +30,7 @@ struct thread_ctx
int session_table_need_reset;
int sf_metrics_need_send;
int cpu_mask;
};
/******************************************************************************
@@ -73,11 +76,13 @@ struct sce_ctx
{
int firewall_sids;
int nr_worker_threads;
int enable_cpu_affinity;
int cpu_affinity_mask[MAX_THREAD_NUM];
struct packet_io *io;
struct global_metrics *metrics;
struct policy_enforcer *enforcer;
struct thread_ctx work_threads[128];
struct thread_ctx work_threads[MAX_THREAD_NUM];
};
struct sce_ctx *sce_ctx_create(const char *profile);