ccp_read_msg()读取来自netlink信息
消息类型
#define CREATE 0
#define MEASURE 1
#define INSTALL_EXPR 2
//进行datapath_program安装
//datapath_program_install(&expr_msg_info, msg_ptr)
#define UPDATE_FIELDS 3
//修改state->pending_update
#define CHANGE_PROG 4
//修改tcp sock对应datapath_program
//因为有sid标记每条tcp sock
//conn = ccp_connection_lookup(hdr.SocketId);即可得到相应sock
//state = get_ccp_priv_state(conn);
//msg_program_index = datapath_program_lookup_uid(change_program.program_uid);
//state->staged_program_index = (u16)msg_program_index;
tcp_ccp_cong_control(sk,rs)
//rate sample参考https://github.com/torvalds/linux/blob/63bdf4284c38a48af21745ceb148a087b190cd21/include/net/tcp.h
调用load_primitives(sk,rs) 主要把rate_sample数据储存为sock的icsk_ca_priv
调用ccp_invoke(dp)
ccp_invoke(dp)
1.将state->pending_update更新到state->registers.impl_registers
2. state->program_index = state->staged_program_index;
//program_index指明调用哪个已经安装的datapath_program
1,2都是把ccp_read_msg()读取到的信息进行再确认
3.state_machine(conn)重点!!!
这里会对CHANGE_PROG消息指明的datapath_program进行运算
datapath_program_lookup(state->program_index);
process_expression(i, state, primitives);
//处理算法
send_measurement(conn, program->program_uid, state->registers.report_registers, program->num_to_return);
//通过netlink反馈tcp sock详细信息给用户态程序