接下来就是要调用ovs_dp_process_packet了。 voidovs_dp_process_packet(structsk_buff*skb,structsw_flow_key*key) {conststructvport*p =OVS_CB(skb)->input_vport;structdatapath*dp = p->dp;structsw_flow*flow;structsw_flow_actions*sf_acts;structdp_stats_percpu*stats;u64*stats_counter;u32n_ma...
ovs_vport_receive()处理接收报文,ovs_flow_key_extract()函数生成flow的key内容用以接下来进行流表匹配,最后调用ovs_dp_process_packet()函数进入真正的ovs数据包处理,代码流程如下: Action处理 ovs的action类型如下(只列出常用的几种),使用nla_type()函数获取nl_type的值,入口处理函数为do_execute_actions()。
到这里就差不多进入ovs主要处理流程了,入口函数为ovs_dp_process_packet,这个函数中涉及到ovs中的一些概念和架构,这些等把代码看完之后再回头来整理,这里先大致介绍下ovs_dp_process_packet的工作过程: 根据key查找流表缓存 找到流表(hit),执行actions 没找到流表(miss),进入upcall流程,在用户态vswitchd中就行ope...
ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key) 4 { 5 const struct vport *p = OVS_CB(skb)->input_vport; 6 struct datapath *dp = p->dp; 7 struct sw_flow *flow; 8 struct sw_flow_actions *sf
}ovs_dp_process_packet(skb, &key);// 处理包。。这是重点。return0; } 然后由datapath/datapath.c中的ovs_dp_process_packet函数处理: voidovs_dp_process_packet(structsk_buff *skb,structsw_flow_key *key){conststructvport*p =OVS_CB(skb)->input_vport;// 获取此packet是从哪个vport进来的。st...
dpctl/show [-s | --statistics] [dp...] Prints a summary of configured datapaths, including their datapath numbers and a list of ports connected to each datapath. (The local port is identified as port 0.) If -s or --statistics is specified, then packet and byte c...
dpctl/show [-s | --statistics] [dp...] Prints a summary of configured datapaths, including their datapath numbers and a list of ports connected to each datapath. (The local port is identified as port 0.) If -s or --statistics is specified, then packet and b...
* 30.99% pmd-c01/id:5 libc.so.6 [.] pthread_mutex_lock@@GLIBC_2.2.5 12.27% pmd-c01/id:5 ovs-vswitchd [.] dp_netdev_process_rxq_port 5.18% pmd-c01/id:5 ovs-vswitchd [.] netdev_dpdk_rxq_recv 4.24% pmd-c01/id:5 ovs-vswitchd [.] pmd_thread_main 3.93% pmd-c01/id:5 ov...
dpctl/show [-s | --statistics] [dp...] Prints a summary of configured datapaths, including their datapath numbers and a list of ports connected to each datapath. (The local port is identified as port 0.) If -s or --statistics is specified, then packet and byt...
dpctl/show [-s | --statistics] [dp...] Prints a summary of configured datapaths, including their datapath numbers and a list of ports connected to each datapath. (The local port is identified as port 0.) If -s or --statistics is specified, then packet and byt...