Add packet IO module
* support marsio
* support dumpfile ( 1 thread read dumpfile & N thread handle packet)
This commit is contained in:
@@ -7,79 +7,130 @@
|
||||
|
||||
// return 0: success
|
||||
// retuun -1: failed
|
||||
static int parse_system_section(struct config *cfg, toml_table_t *conf_file_handle)
|
||||
static int parse_device_config(struct device_config *dev_cfg, toml_table_t *conf_file_handle)
|
||||
{
|
||||
const char *ptr;
|
||||
toml_table_t *system_table;
|
||||
toml_table_t *device_table;
|
||||
|
||||
device_table = toml_table_in(conf_file_handle, "device");
|
||||
if (device_table == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing device section");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr = toml_raw_in(device_table, "device_base");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing device.device_base");
|
||||
return -1;
|
||||
}
|
||||
dev_cfg->device_base = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(device_table, "device_offset");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing device.device_offset");
|
||||
return -1;
|
||||
}
|
||||
dev_cfg->device_offset = atoi(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return 0: success
|
||||
// retuun -1: failed
|
||||
static int parse_packet_io_config(struct packet_io_config *pkt_io_cfg, toml_table_t *conf_file_handle)
|
||||
{
|
||||
const char *ptr;
|
||||
toml_table_t *packet_io_table;
|
||||
toml_array_t *mask_array;
|
||||
|
||||
system_table = toml_table_in(conf_file_handle, "system");
|
||||
if (system_table == NULL)
|
||||
packet_io_table = toml_table_in(conf_file_handle, "packet_io");
|
||||
if (packet_io_table == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system section");
|
||||
CONFIG_LOG_ERROR("config file missing packet_io section");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr = toml_raw_in(system_table, "app_symbol");
|
||||
ptr = toml_raw_in(packet_io_table, "mode");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.app_symbol");
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.mode");
|
||||
return -1;
|
||||
}
|
||||
strncpy(cfg->sys_cfg.app_symbol, ptr, sizeof(cfg->sys_cfg.app_symbol) - 1);
|
||||
|
||||
ptr = toml_raw_in(system_table, "dev_symbol");
|
||||
if (ptr == NULL)
|
||||
if (strcmp(ptr, "dumpfile") == 0)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.dev_symbol");
|
||||
pkt_io_cfg->mode = PACKET_IO_DUMPFILE;
|
||||
}
|
||||
else if (strcmp(ptr, "marsio") == 0)
|
||||
{
|
||||
pkt_io_cfg->mode = PACKET_IO_MARSIO;
|
||||
}
|
||||
else
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file invalid packet_io.mode %s, only support dumpfile and marsio", ptr);
|
||||
return -1;
|
||||
}
|
||||
strncpy(cfg->sys_cfg.dev_symbol, ptr, sizeof(cfg->sys_cfg.dev_symbol) - 1);
|
||||
|
||||
ptr = toml_raw_in(system_table, "device_base");
|
||||
if (ptr == NULL)
|
||||
if (pkt_io_cfg->mode == PACKET_IO_DUMPFILE)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.device_base");
|
||||
return -1;
|
||||
ptr = toml_raw_in(packet_io_table, "dumpfile_dir");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.dumpfile_dir");
|
||||
return -1;
|
||||
}
|
||||
// skip ""
|
||||
strncpy(pkt_io_cfg->dumpfile_dir, ptr + 1, strlen(ptr) - 2);
|
||||
}
|
||||
cfg->sys_cfg.device_base = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(system_table, "device_offset");
|
||||
if (ptr == NULL)
|
||||
else
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.device_offset");
|
||||
return -1;
|
||||
ptr = toml_raw_in(packet_io_table, "app_symbol");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.app_symbol");
|
||||
return -1;
|
||||
}
|
||||
strncpy(pkt_io_cfg->app_symbol, ptr, sizeof(pkt_io_cfg->app_symbol) - 1);
|
||||
|
||||
ptr = toml_raw_in(packet_io_table, "dev_symbol");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.dev_symbol");
|
||||
return -1;
|
||||
}
|
||||
strncpy(pkt_io_cfg->dev_symbol, ptr, sizeof(pkt_io_cfg->dev_symbol) - 1);
|
||||
}
|
||||
cfg->sys_cfg.device_offset = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(system_table, "nr_threads");
|
||||
ptr = toml_raw_in(packet_io_table, "nr_threads");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.nr_threads");
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.nr_threads");
|
||||
return -1;
|
||||
}
|
||||
if (atoi(ptr) <= 0 || atoi(ptr) > MAX_THREAD_NUM)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file invalid system.nr_threads %d, range [1, %d]", atoi(ptr), MAX_THREAD_NUM);
|
||||
CONFIG_LOG_ERROR("config file invalid packet_io.nr_threads %d, range [1, %d]", atoi(ptr), MAX_THREAD_NUM);
|
||||
return -1;
|
||||
}
|
||||
cfg->sys_cfg.nr_threads = atoi(ptr);
|
||||
pkt_io_cfg->nr_threads = atoi(ptr);
|
||||
|
||||
mask_array = toml_array_in(system_table, "cpu_mask");
|
||||
mask_array = toml_array_in(packet_io_table, "cpu_mask");
|
||||
if (mask_array == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.cpu_mask");
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.cpu_mask");
|
||||
return -1;
|
||||
}
|
||||
for (uint8_t i = 0; i < cfg->sys_cfg.nr_threads; i++)
|
||||
for (uint8_t i = 0; i < pkt_io_cfg->nr_threads; i++)
|
||||
{
|
||||
ptr = toml_raw_at(mask_array, i);
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing system.cpu_mask[%d]", i);
|
||||
CONFIG_LOG_ERROR("config file missing packet_io.cpu_mask[%d]", i);
|
||||
return -1;
|
||||
}
|
||||
cfg->sys_cfg.cpu_mask[i] = atoi(ptr);
|
||||
pkt_io_cfg->cpu_mask[i] = atoi(ptr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -87,7 +138,56 @@ static int parse_system_section(struct config *cfg, toml_table_t *conf_file_hand
|
||||
|
||||
// return 0: success
|
||||
// retuun -1: failed
|
||||
static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_file_handle)
|
||||
static int parse_ip_reassemble_config(struct ip_reassemble_config *ip_reass_cfg, toml_table_t *conf_file_handle)
|
||||
{
|
||||
const char *ptr;
|
||||
toml_table_t *ip_reass_table;
|
||||
|
||||
ip_reass_table = toml_table_in(conf_file_handle, "ip_reassemble");
|
||||
if (ip_reass_table == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble section");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr = toml_raw_in(ip_reass_table, "enable");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.enable");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->enable = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(ip_reass_table, "timeout");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.timeout");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->timeout = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(ip_reass_table, "bucket_entries");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.bucket_entries");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->bucket_entries = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(ip_reass_table, "bucket_num");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.bucket_num");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->bucket_num = atoi(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return 0: success
|
||||
// retuun -1: failed
|
||||
static int parse_session_manager_section(struct session_manager_config *sess_mgr_cfg, toml_table_t *conf_file_handle)
|
||||
{
|
||||
const char *ptr;
|
||||
toml_table_t *sess_mgr_table;
|
||||
@@ -106,7 +206,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.max_tcp_session_num");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.max_tcp_session_num = atoll(ptr);
|
||||
sess_mgr_cfg->max_tcp_session_num = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "max_udp_session_num");
|
||||
if (ptr == NULL)
|
||||
@@ -114,7 +214,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.max_udp_session_num");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.max_udp_session_num = atoll(ptr);
|
||||
sess_mgr_cfg->max_udp_session_num = atoll(ptr);
|
||||
|
||||
// session overload (1: evict old session, 0: bypass new session)
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_overload_evict_old_sess");
|
||||
@@ -123,7 +223,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_overload_evict_old_sess");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_overload_evict_old_sess = atoi(ptr);
|
||||
sess_mgr_cfg->tcp_overload_evict_old_sess = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_overload_evict_old_sess");
|
||||
if (ptr == NULL)
|
||||
@@ -131,7 +231,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_overload_evict_old_sess");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_overload_evict_old_sess = atoi(ptr);
|
||||
sess_mgr_cfg->udp_overload_evict_old_sess = atoi(ptr);
|
||||
|
||||
// TCP timeout
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_init");
|
||||
@@ -140,7 +240,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_init");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_init = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_init = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_handshake");
|
||||
if (ptr == NULL)
|
||||
@@ -148,7 +248,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_handshake");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_handshake = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_handshake = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_data");
|
||||
if (ptr == NULL)
|
||||
@@ -156,7 +256,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_data");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_data = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_data = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_half_closed");
|
||||
if (ptr == NULL)
|
||||
@@ -164,7 +264,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_half_closed");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_half_closed = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_half_closed = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_time_wait");
|
||||
if (ptr == NULL)
|
||||
@@ -172,7 +272,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_time_wait");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_time_wait = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_time_wait = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_timeout_discard");
|
||||
if (ptr == NULL)
|
||||
@@ -180,7 +280,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_timeout_discard");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_timeout_discard = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_timeout_discard = atoll(ptr);
|
||||
|
||||
// UDP timeout
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_timeout_data");
|
||||
@@ -189,7 +289,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_timeout_data");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_timeout_data = atoll(ptr);
|
||||
sess_mgr_cfg->udp_timeout_data = atoll(ptr);
|
||||
|
||||
// TCP duplicate packet filter
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_dupkt_filter_enable");
|
||||
@@ -198,7 +298,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_dupkt_filter_enable");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_dupkt_filter_enable = atoi(ptr);
|
||||
sess_mgr_cfg->tcp_dupkt_filter_enable = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_dupkt_filter_capacity");
|
||||
if (ptr == NULL)
|
||||
@@ -206,7 +306,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_dupkt_filter_capacity");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_dupkt_filter_capacity = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_dupkt_filter_capacity = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_dupkt_filter_timeout");
|
||||
if (ptr == NULL)
|
||||
@@ -214,7 +314,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_dupkt_filter_timeout");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_dupkt_filter_timeout = atoll(ptr);
|
||||
sess_mgr_cfg->tcp_dupkt_filter_timeout = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "tcp_dupkt_filter_error_rate");
|
||||
if (ptr == NULL)
|
||||
@@ -222,7 +322,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.tcp_dupkt_filter_error_rate");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.tcp_dupkt_filter_error_rate = atof(ptr);
|
||||
sess_mgr_cfg->tcp_dupkt_filter_error_rate = atof(ptr);
|
||||
|
||||
// UDP eviction filter
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_eviction_filter_enable");
|
||||
@@ -231,7 +331,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_eviction_filter_enable");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_eviction_filter_enable = atoi(ptr);
|
||||
sess_mgr_cfg->udp_eviction_filter_enable = atoi(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_eviction_filter_capacity");
|
||||
if (ptr == NULL)
|
||||
@@ -239,7 +339,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_eviction_filter_capacity");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_eviction_filter_capacity = atoll(ptr);
|
||||
sess_mgr_cfg->udp_eviction_filter_capacity = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_eviction_filter_timeout");
|
||||
if (ptr == NULL)
|
||||
@@ -247,7 +347,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_eviction_filter_timeout");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_eviction_filter_timeout = atoll(ptr);
|
||||
sess_mgr_cfg->udp_eviction_filter_timeout = atoll(ptr);
|
||||
|
||||
ptr = toml_raw_in(sess_mgr_table, "udp_eviction_filter_error_rate");
|
||||
if (ptr == NULL)
|
||||
@@ -255,7 +355,7 @@ static int parse_session_manager_section(struct config *cfg, toml_table_t *conf_
|
||||
CONFIG_LOG_ERROR("config file missing session_manager.udp_eviction_filter_error_rate");
|
||||
return -1;
|
||||
}
|
||||
cfg->sess_mgr_cfg.udp_eviction_filter_error_rate = atof(ptr);
|
||||
sess_mgr_cfg->udp_eviction_filter_error_rate = atof(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -285,14 +385,22 @@ int config_load(struct config *cfg, const char *cfg_file)
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
// system config
|
||||
if (parse_system_section(cfg, conf_file_handle) != 0)
|
||||
if (parse_device_config(&cfg->dev_cfg, conf_file_handle) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
// session manager config
|
||||
if (parse_session_manager_section(cfg, conf_file_handle) != 0)
|
||||
if (parse_packet_io_config(&cfg->pkt_io_cfg, conf_file_handle) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if (parse_ip_reassemble_config(&cfg->ip_reass_cfg, conf_file_handle) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if (parse_session_manager_section(&cfg->sess_mgr_cfg, conf_file_handle) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
@@ -320,38 +428,61 @@ void config_dump(struct config *cfg)
|
||||
return;
|
||||
}
|
||||
|
||||
CONFIG_LOG_DEBUG("system.app_symbol : %s", cfg->sys_cfg.app_symbol);
|
||||
CONFIG_LOG_DEBUG("system.dev_symbol : %s", cfg->sys_cfg.dev_symbol);
|
||||
CONFIG_LOG_DEBUG("system.device_base : %d", cfg->sys_cfg.device_base);
|
||||
CONFIG_LOG_DEBUG("system.device_offset : %d", cfg->sys_cfg.device_offset);
|
||||
CONFIG_LOG_DEBUG("system.nr_threads : %d", cfg->sys_cfg.nr_threads);
|
||||
for (uint8_t i = 0; i < cfg->sys_cfg.nr_threads; i++)
|
||||
struct device_config *dev_cfg = &cfg->dev_cfg;
|
||||
struct packet_io_config *pkt_io_cfg = &cfg->pkt_io_cfg;
|
||||
struct ip_reassemble_config *ip_reass_cfg = &cfg->ip_reass_cfg;
|
||||
struct session_manager_config *sess_mgr_cfg = &cfg->sess_mgr_cfg;
|
||||
|
||||
// device config
|
||||
CONFIG_LOG_DEBUG("device->device_base : %d", dev_cfg->device_base);
|
||||
CONFIG_LOG_DEBUG("device->device_offset : %d", dev_cfg->device_offset);
|
||||
|
||||
// packet io config
|
||||
CONFIG_LOG_DEBUG("packet_io->mode : %s", pkt_io_cfg->mode == PACKET_IO_DUMPFILE ? "dumpfile" : "marsio");
|
||||
if (pkt_io_cfg->mode == PACKET_IO_DUMPFILE)
|
||||
{
|
||||
CONFIG_LOG_DEBUG("system.cpu_mask[%d] : %d", i, cfg->sys_cfg.cpu_mask[i]);
|
||||
CONFIG_LOG_DEBUG("packet_io->dumpfile_dir : %s", pkt_io_cfg->dumpfile_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
CONFIG_LOG_DEBUG("packet_io->app_symbol : %s", pkt_io_cfg->app_symbol);
|
||||
CONFIG_LOG_DEBUG("packet_io->dev_symbol : %s", pkt_io_cfg->dev_symbol);
|
||||
}
|
||||
CONFIG_LOG_DEBUG("packet_io->nr_threads : %d", pkt_io_cfg->nr_threads);
|
||||
for (uint8_t i = 0; i < pkt_io_cfg->nr_threads; i++)
|
||||
{
|
||||
CONFIG_LOG_DEBUG("packet_io->cpu_mask[%03d] : %d", i, pkt_io_cfg->cpu_mask[i]);
|
||||
}
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.max_tcp_session_num : %ld", cfg->sess_mgr_cfg.max_tcp_session_num);
|
||||
CONFIG_LOG_DEBUG("session_manager.max_udp_session_num : %ld", cfg->sess_mgr_cfg.max_udp_session_num);
|
||||
// ip reassemble config
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->enable : %d", ip_reass_cfg->enable);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->timeout : %d", ip_reass_cfg->timeout);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->bucket_entries : %d", ip_reass_cfg->bucket_entries);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->bucket_num : %d", ip_reass_cfg->bucket_num);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_overload_evict_old_sess : %d", cfg->sess_mgr_cfg.tcp_overload_evict_old_sess);
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_overload_evict_old_sess : %d", cfg->sess_mgr_cfg.udp_overload_evict_old_sess);
|
||||
// session manager config
|
||||
CONFIG_LOG_DEBUG("session_manager->max_tcp_session_num : %ld", sess_mgr_cfg->max_tcp_session_num);
|
||||
CONFIG_LOG_DEBUG("session_manager->max_udp_session_num : %ld", sess_mgr_cfg->max_udp_session_num);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_init : %ld", cfg->sess_mgr_cfg.tcp_timeout_init);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_handshake : %ld", cfg->sess_mgr_cfg.tcp_timeout_handshake);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_data : %ld", cfg->sess_mgr_cfg.tcp_timeout_data);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_half_closed : %ld", cfg->sess_mgr_cfg.tcp_timeout_half_closed);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_time_wait : %ld", cfg->sess_mgr_cfg.tcp_timeout_time_wait);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_timeout_discard : %ld", cfg->sess_mgr_cfg.tcp_timeout_discard);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_overload_evict_old_sess : %d", sess_mgr_cfg->tcp_overload_evict_old_sess);
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_overload_evict_old_sess : %d", sess_mgr_cfg->udp_overload_evict_old_sess);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_timeout_data : %ld", cfg->sess_mgr_cfg.udp_timeout_data);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_init : %ld", sess_mgr_cfg->tcp_timeout_init);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_handshake : %ld", sess_mgr_cfg->tcp_timeout_handshake);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_data : %ld", sess_mgr_cfg->tcp_timeout_data);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_half_closed : %ld", sess_mgr_cfg->tcp_timeout_half_closed);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_time_wait : %ld", sess_mgr_cfg->tcp_timeout_time_wait);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_timeout_discard : %ld", sess_mgr_cfg->tcp_timeout_discard);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_dupkt_filter_enable : %d", cfg->sess_mgr_cfg.tcp_dupkt_filter_enable);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_dupkt_filter_capacity : %ld", cfg->sess_mgr_cfg.tcp_dupkt_filter_capacity);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_dupkt_filter_timeout : %ld", cfg->sess_mgr_cfg.tcp_dupkt_filter_timeout);
|
||||
CONFIG_LOG_DEBUG("session_manager.tcp_dupkt_filter_error_rate : %f", cfg->sess_mgr_cfg.tcp_dupkt_filter_error_rate);
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_timeout_data : %ld", sess_mgr_cfg->udp_timeout_data);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_eviction_filter_enable : %d", cfg->sess_mgr_cfg.udp_eviction_filter_enable);
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_eviction_filter_capacity : %ld", cfg->sess_mgr_cfg.udp_eviction_filter_capacity);
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_eviction_filter_timeout : %ld", cfg->sess_mgr_cfg.udp_eviction_filter_timeout);
|
||||
CONFIG_LOG_DEBUG("session_manager.udp_eviction_filter_error_rate : %f", cfg->sess_mgr_cfg.udp_eviction_filter_error_rate);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_dupkt_filter_enable : %d", sess_mgr_cfg->tcp_dupkt_filter_enable);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_dupkt_filter_capacity : %ld", sess_mgr_cfg->tcp_dupkt_filter_capacity);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_dupkt_filter_timeout : %ld", sess_mgr_cfg->tcp_dupkt_filter_timeout);
|
||||
CONFIG_LOG_DEBUG("session_manager->tcp_dupkt_filter_error_rate : %f", sess_mgr_cfg->tcp_dupkt_filter_error_rate);
|
||||
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_eviction_filter_enable : %d", sess_mgr_cfg->udp_eviction_filter_enable);
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_eviction_filter_capacity : %ld", sess_mgr_cfg->udp_eviction_filter_capacity);
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_eviction_filter_timeout : %ld", sess_mgr_cfg->udp_eviction_filter_timeout);
|
||||
CONFIG_LOG_DEBUG("session_manager->udp_eviction_filter_error_rate : %f", sess_mgr_cfg->udp_eviction_filter_error_rate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user