完成polling接口改造和重复流量识别功能

This commit is contained in:
崔一鸣
2019-09-04 18:58:50 +08:00
parent b01f282f34
commit 94e8c6184d
15 changed files with 886 additions and 641 deletions

View File

@@ -2,36 +2,33 @@
log_path = ./log/kni/kni.log
log_level = 10
tfe_node_count = 3
tfe_data_recv_thread_num = 8
manage_eth = eth0
#keepalive_replay: window update replay
keepalive_replay_switch = 1
manage_eth = enp7s0
[tfe0]
enabled = 1
mac_addr = fe:65:b7:03:50:bd
dev_eth_symbol = eth7
ip_addr = 192.168.10.38
dev_eth_symbol = ens1f5
ip_addr = 192.168.100.2
[tfe1]
enabled = 1
mac_addr = fe:65:b7:03:50:bd
dev_eth_symbol = eth8
ip_addr = 192.168.10.39
dev_eth_symbol = ens1f6
ip_addr = 192.168.100.3
[tfe2]
enabled = 1
mac_addr = fe:65:b7:03:50:bd
dev_eth_symbol = eth9
ip_addr = 192.168.10.40
dev_eth_symbol = ens1f7
ip_addr = 192.168.100.4
[tfe_cmsg_receiver]
listen_eth = eth0
listen_eth = ens1.100
listen_port = 2475
[watch_dog]
switch = 1
listen_eth = eth0
listen_eth = ens1.100
listen_port = 2476
keepalive_idle = 2
keepalive_intvl = 1
@@ -39,12 +36,12 @@ keepalive_cnt = 3
[maat]
#readconf_mode: 0 = iris, 1 = json, 2 = redis
readconf_mode = 1
tableinfo_path = ./conf/kni/maat_tableinfo.conf
maatjson_path = ./conf/kni/maat_test.json
redis_ip = 192.168.10.120
redis_port = 6390
redis_index = 4
readconf_mode = 2
tableinfo_path = ./etc/kni/maat_tableinfo.conf
maatjson_path = ./etc/kni/maat_test.json
redis_ip = 192.168.10.31
redis_port = 6379
redis_index = 0
tablename_intercept_ip = PXY_INTERCEPT_IP
tablename_intercept_domain = PXY_INTERCEPT_DOMAIN
#default_action: 0x80 = bypass, 0x02 = intercept
@@ -53,11 +50,11 @@ default_action = 128
[send_logger]
switch = 0
kafka_topic = SESSION-RECORD-LOG
kafka_brokerlist = 192.168.10.119:9092,192.168.10.122:9092,192.168.10.123:9092
#kafka_brokerlist = 192.168.10.119:9092,192.168.10.122:9092,192.168.10.123:9092
kafka_brokerlist = 192.168.10.52:9092
[marsio]
appsym = knifw
dev_vxlan_symbol = vxlan_user
src_mac_addr = 00:0e:c6:d6:72:c1
[kafka]
@@ -65,6 +62,14 @@ queue.buffering.max.messages = 1000000
topic.metadata.refresh.interval.ms = 600000
security.protocol = MG
#128:bypass, 2: intercept
[dup_traffic]
switch = 0
action = 2
capacity = 1000000
error_rate = 0.05
expiry_time = 30
[traceid2pme_htable]
mho_screen_print_ctrl = 0
mho_thread_safe = 1
@@ -74,15 +79,12 @@ mho_hash_max_element_num = 640000
mho_expire_time = 30
mho_eliminate_type = LRU
[keepalive_replay_htable]
[tuple2stream_htable]
mho_screen_print_ctrl = 0
mho_thread_safe = 1
mho_thread_safe = 0
mho_mutex_num = 160
mho_hash_slot_size = 160000
mho_hash_max_element_num = 640000
#must be 0
mho_expire_time = 0
mho_eliminate_type = LRU
[field_stat]
stat_path = ./fs2_kni.status

View File

@@ -5,4 +5,4 @@
3 TSG_OBJ_IP_ADDR ip_plus --
4 PXY_INTERCEPT_DOMAIN expr utf8 utf8 yes 0
4 TSG_OBJ_FQDN expr utf8 utf8 yes 0
5 COMPILE_ALIAS compile escape --
5 COMPILE_ALIAS compile escape --

View File

@@ -10,4 +10,8 @@ FUNC_NAME = kni_tcpall_entry
[HTTP]
FUNC_FLAG = HTTP_HOST
FUNC_NAME = kni_http_entry
FUNC_NAME = kni_http_entry
[POLLING]
FUNC_FLAG=ALL
FUNC_NAME=kni_polling_all_entry