ovs 流表
https://blog.csdn.net/u010378472/article/details/79146557
Breakpoint 1, netdev_send (netdev=0x5470900, qid=qid@entry=0, batch=batch@entry=0xfffd58004f20, concurrent_txq=concurrent_txq@entry=true) at lib/netdev.c:885 885 { (gdb) bt #0 netdev_send (netdev=0x5470900, qid=qid@entry=0, batch=batch@entry=0xfffd58004f20, concurrent_txq=concurrent_txq@entry=true) at lib/netdev.c:885 #1 0x000000000096fae8 in dp_netdev_pmd_flush_output_on_port (pmd=pmd@entry=0x54770b0, p=p@entry=0xfffd58004ef0) at lib/dpif-netdev.c:4391 #2 0x000000000096fdfc in dp_netdev_pmd_flush_output_packets (pmd=pmd@entry=0x54770b0, force=force@entry=false) at lib/dpif-netdev.c:4431 #3 0x00000000009787d8 in dp_netdev_pmd_flush_output_packets (force=false, pmd=0x54770b0) at lib/dpif-netdev.c:4501 #4 dp_netdev_process_rxq_port (pmd=pmd@entry=0x54770b0, rxq=0x51d14a0, port_no=3) at lib/dpif-netdev.c:4486 #5 0x0000000000978a24 in pmd_thread_main (f_=0x54770b0) at lib/dpif-netdev.c:5731 #6 0x00000000009fc5dc in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs-thread.c:383 #7 0x0000ffffb7fd7d38 in start_thread (arg=0xfffd6d6ed510) at pthread_create.c:309 #8 0x0000ffffb7cbf690 in thread_start () from /lib64/libc.so.6 (gdb) delete 1 (gdb) b dp_execute_cb Breakpoint 2 at 0x9799b4: file lib/dpif-netdev.c, line 7237. (gdb) c Continuing. [Switching to Thread 0xfffd53ffd510 (LWP 19066)] Breakpoint 2, dp_execute_cb (aux_=0xfffd53ff4338, packets_=0xfffd53ff43c8, a=0xfffd53ff44e0, should_steal=true) at lib/dpif-netdev.c:7237 7237 { (gdb) bt #0 dp_execute_cb (aux_=0xfffd53ff4338, packets_=0xfffd53ff43c8, a=0xfffd53ff44e0, should_steal=true) at lib/dpif-netdev.c:7237 #1 0x00000000009ac8ac in odp_execute_actions (dp=dp@entry=0xfffd53ff4338, batch=batch@entry=0xfffd53ff43c8, steal=steal@entry=true, actions=<optimized out>, actions_len=<optimized out>, dp_execute_action=dp_execute_action@entry=0x9799b4 <dp_execute_cb>) at lib/odp-execute.c:864 #2 0x00000000009765c0 in dp_netdev_execute_actions (actions_len=<optimized out>, actions=<optimized out>, flow=0xfffd53ff48d8, should_steal=true, packets=0xfffd53ff43c8, pmd=0x5d3f680) at lib/dpif-netdev.c:7596 #3 handle_packet_upcall (put_actions=0xfffd53ff4388, actions=0xfffd53ff4348, key=0xfffd53ff7e80, packet=0x62ce3efb80, pmd=0x5d3f680) at lib/dpif-netdev.c:6846 #4 fast_path_processing (pmd=pmd@entry=0x5d3f680, packets_=packets_@entry=0xfffd53ffca80, keys=keys@entry=0xfffd53ff7d60, flow_map=flow_map@entry=0xfffd53ff5640, index_map=index_map@entry=0xfffd53ff5620 "", in_port=<optimized out>) at lib/dpif-netdev.c:6942 #5 0x0000000000977f58 in dp_netdev_input__ (pmd=pmd@entry=0x5d3f680, packets=packets@entry=0xfffd53ffca80, md_is_valid=md_is_valid@entry=false, port_no=port_no@entry=2) at lib/dpif-netdev.c:7031 #6 0x0000000000978680 in dp_netdev_input (port_no=2, packets=0xfffd53ffca80, pmd=0x5d3f680) at lib/dpif-netdev.c:7069 #7 dp_netdev_process_rxq_port (pmd=pmd@entry=0x5d3f680, rxq=0x5472b80, port_no=2) at lib/dpif-netdev.c:4480 #8 0x0000000000978a24 in pmd_thread_main (f_=0x5d3f680) at lib/dpif-netdev.c:5731 #9 0x00000000009fc5dc in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs-thread.c:383 #10 0x0000ffffb7fd7d38 in start_thread (arg=0xfffd53ffd510) at pthread_create.c:309 #11 0x0000ffffb7cbf690 in thread_start () from /lib64/libc.so.6 (gdb)
packet_batch_per_flow_execute
(gdb) s packet_batch_per_flow_execute (pmd=<optimized out>, batch=<optimized out>) at lib/dpif-netdev.c:6545 6545 dp_netdev_flow_used(flow, dp_packet_batch_size(&batch->array), (gdb) bt #0 packet_batch_per_flow_execute (pmd=<optimized out>, batch=<optimized out>) at lib/dpif-netdev.c:6545 #1 dp_netdev_input__ (pmd=pmd@entry=0x54770b0, packets=packets@entry=0xfffd6d6eca80, md_is_valid=md_is_valid@entry=false, port_no=port_no@entry=3) at lib/dpif-netdev.c:7060 #2 0x0000000000978680 in dp_netdev_input (port_no=3, packets=0xfffd6d6eca80, pmd=0x54770b0) at lib/dpif-netdev.c:7069 #3 dp_netdev_process_rxq_port (pmd=pmd@entry=0x54770b0, rxq=0x51d14a0, port_no=3) at lib/dpif-netdev.c:4480 #4 0x0000000000978a24 in pmd_thread_main (f_=0x54770b0) at lib/dpif-netdev.c:5731 #5 0x00000000009fc5dc in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs-thread.c:383 #6 0x0000ffffb7fd7d38 in start_thread (arg=0xfffd6d6ed510) at pthread_create.c:309 #7 0x0000ffffb7cbf690 in thread_start () from /lib64/libc.so.6 (gdb) list 6540 struct dp_netdev_pmd_thread *pmd) 6541 { 6542 struct dp_netdev_actions *actions; 6543 struct dp_netdev_flow *flow = batch->flow; 6544 6545 dp_netdev_flow_used(flow, dp_packet_batch_size(&batch->array), 6546 batch->byte_count, 6547 batch->tcp_flags, pmd->ctx.now / 1000); 6548 6549 actions = dp_netdev_flow_get_actions(flow); (gdb) n 6551 dp_netdev_execute_actions(pmd, &batch->array, true, &flow->flow, (gdb) n 6545 dp_netdev_flow_used(flow, dp_packet_batch_size(&batch->array), (gdb) p *flow value has been optimized out (gdb) n 6543 struct dp_netdev_flow *flow = batch->flow; (gdb) p *actions value has been optimized out (gdb) n 6545 dp_netdev_flow_used(flow, dp_packet_batch_size(&batch->array), (gdb) n 6549 actions = dp_netdev_flow_get_actions(flow); (gdb) p *actions value has been optimized out (gdb) n 6551 dp_netdev_execute_actions(pmd, &batch->array, true, &flow->flow, (gdb) p *flow $2 = { flow = { tunnel = { ip_dst = 0, ipv6_dst = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, ip_src = 0, ipv6_src = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, tun_id = 0, flags = 0, ip_tos = 0 '\000', ip_ttl = 0 '\000', tp_src = 0, tp_dst = 0, gbp_id = 0, gbp_flags = 0 '\000', erspan_ver = 0 '\000', erspan_idx = 0, erspan_dir = 0 '\000', erspan_hwid = 0 '\000', pad1 = "\000\000\000\000\000", metadata = { present = { map = 0, len = 0 '\000' }, tab = 0x0, opts = { u8 = '\000' <repeats 255 times>, gnv = {{ opt_class = 0, type = 0 '\000', length = 0 '\000', r3 = 0 '\000', r2 = 0 '\000', r1 = 0 '\000' } <repeats 63 times>} } } }, metadata = 0, regs = {0 <repeats 16 times>}, skb_priority = 0, pkt_mark = 0, dp_hash = 0, in_port = { odp_port = 3, ofp_port = 3 ---Type <return> to continue, or q <return> to quit--- }, recirc_id = 0, ct_state = 0 '\000', ct_nw_proto = 0 '\000', ct_zone = 0, ct_mark = 0, packet_type = 0, ct_label = { u32 = {0, 0, 0, 0}, u64 = { lo = 0, hi = 0 } }, conj_id = 0, actset_output = 0, dl_dst = { { ea = "\001\000^\000\000\022", be16 = {1, 94, 4608} } }, dl_src = { { ea = "\234R\370gŇ", be16 = {21148, 26616, 34757} } }, dl_type = 8, pad1 = "\000", vlans = {{ qtag = 4161994881, { tpid = 129, tci = 63507 } }, { qtag = 0, { tpid = 0, tci = 0 } }}, mpls_lse = {0, 0, 0, 0}, nw_src = 286263818, nw_dst = 301990112, ct_nw_src = 0, ct_nw_dst = 0, ipv6_src = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, ipv6_dst = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, ---Type <return> to continue, or q <return> to quit--- __u6_addr32 = {0, 0, 0, 0} } }, ct_ipv6_src = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, ct_ipv6_dst = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, ipv6_label = 0, nw_frag = 0 '\000', nw_tos = 192 '\300', nw_ttl = 255 '\377', nw_proto = 112 'p', nd_target = { __in6_u = { __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0} } }, arp_sha = { { ea = "\000\000\000\000\000", be16 = {0, 0, 0} } }, arp_tha = { { ea = "\000\000\000\000\000", be16 = {0, 0, 0} } }, tcp_flags = 0, pad2 = 0, nsh = { flags = 0 '\000', ttl = 0 '\000', mdtype = 0 '\000', np = 0 '\000', path_hdr = 0, context = {0, 0, 0, 0} }, tp_src = 0, tp_dst = 0, ct_tp_src = 0, ct_tp_dst = 0, igmp_group_ip4 = 0, pad3 = 0 }, node = { ---Type <return> to continue, or q <return> to quit--- next = { p = 0x0 } }, mark_node = { next = { p = 0x0 } }, ufid = { u32 = {606124318, 874988435, 3050361604, 2998125217}, u64 = { lo = 3758046713309346078, hi = 12876849759378264836 } }, mega_ufid = { u32 = {3878169823, 1965641161, 2915372839, 3824021772}, u64 = { lo = 8442364506044640479, hi = 16424048452847341351 } }, pmd_id = 3, ref_cnt = { count = 2 }, dead = false, mark = 0, stats = { used = 521721519, packet_count = 3981, byte_count = 254784, tcp_flags = 0 }, netdev_flow_get_result = 0, last_stats = { used = 0, packet_count = 0, byte_count = 0, tcp_flags = 0 }, last_attrs = { offloaded = false, dp_layer = 0x0 }, actions = { p = 0xfffd58039c10 }, batch = 0x0, dp_extra_info = 0xfffd58039c30 "miniflow_bits(5,1)", cr = { cmap_node = { next = { p = 0x0 } }, mask = 0xfffd580067f8, flow = { ---Type <return> to continue, or q <return> to quit--- hash = 33036216, len = 64, mf = { map = { bits = {4089268461652410368, 1024} } }, buf = {0, 0, 5952652598692413441, 36637599736, 4161994752, 0 <repeats 66 times>} } } } (gdb) (gdb) p *actions value has been optimized out (gdb) n dp_netdev_input__ (pmd=pmd@entry=0x54770b0, packets=packets@entry=0xfffd6d6eca80, md_is_valid=md_is_valid@entry=false, port_no=port_no@entry=3) at lib/dpif-netdev.c:7059 7059 for (i = 0; i < n_batches; i++) { (gdb)
odp_execute_actions
(gdb) bt #0 odp_execute_actions (dp=dp@entry=0xfffd53ffc9f0, batch=batch@entry=0xfffd53ff5960, steal=steal@entry=true, actions=0xfffd4c0efb84, actions_len=8, dp_execute_action=dp_execute_action@entry=0x9799b4 <dp_execute_cb>) at lib/odp-execute.c:849 #1 0x0000000000977d84 in dp_netdev_execute_actions (actions_len=<optimized out>, actions=<optimized out>, flow=0xfffd4c072bf0, should_steal=true, packets=0xfffd53ff5960, pmd=0x5d3f680) at lib/dpif-netdev.c:7596 #2 packet_batch_per_flow_execute (pmd=0x5d3f680, batch=0xfffd53ff5950) at lib/dpif-netdev.c:6551 #3 dp_netdev_input__ (pmd=pmd@entry=0x5d3f680, packets=packets@entry=0xfffd53ffca80, md_is_valid=md_is_valid@entry=false, port_no=port_no@entry=2) at lib/dpif-netdev.c:7060 #4 0x0000000000978680 in dp_netdev_input (port_no=2, packets=0xfffd53ffca80, pmd=0x5d3f680) at lib/dpif-netdev.c:7069 #5 dp_netdev_process_rxq_port (pmd=pmd@entry=0x5d3f680, rxq=0x5472b80, port_no=2) at lib/dpif-netdev.c:4480 #6 0x0000000000978a24 in pmd_thread_main (f_=0x5d3f680) at lib/dpif-netdev.c:5731 #7 0x00000000009fc5dc in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs-thread.c:383 #8 0x0000ffffb7fd7d38 in start_thread (arg=0xfffd53ffd510) at pthread_create.c:309 #9 0x0000ffffb7cbf690 in thread_start () from /lib64/libc.so.6 (gdb) n 854 NL_ATTR_FOR_EACH_UNSAFE (a, left, actions, actions_len) { (gdb) n 1052 odp_execute_check_pkt_len(dp, packet, steal && last_action, a, (gdb) n 970 odp_execute_sample(dp, packet, steal && last_action, a, (gdb) n 1052 odp_execute_check_pkt_len(dp, packet, steal && last_action, a, (gdb) n 970 odp_execute_sample(dp, packet, steal && last_action, a, (gdb) n 1052 odp_execute_check_pkt_len(dp, packet, steal && last_action, a, (gdb) n 970 odp_execute_sample(dp, packet, steal && last_action, a, (gdb) n 1052 odp_execute_check_pkt_len(dp, packet, steal && last_action, a, (gdb)