Hi,

Ovs version 2.5.2:
Os: ubuntu 16.04

I have flows which in open flow groups, and I want to trace the path of one 
kind of flow to know how it is got to a certain open flow port:

Below is my actions in groups:

gongysh@ubuntu16:~/routing$ sudo ovs-ofctl -O OpenFlow13 dump-groups s204
OFPST_GROUP_DESC reply (OF1.3) (xid=0x2):
 
group_id=536870968,type=indirect,bucket=actions=set_field:00:aa:00:00:00:02->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:4116->vlan_vid,group:1310724
 
group_id=536870965,type=indirect,bucket=actions=set_field:00:aa:00:00:00:01->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:4116->vlan_vid,group:1310723
 
group_id=2449473560,type=indirect,bucket=actions=pop_vlan,push_mpls:0x8847,set_field:215->mpls_label,group:2415919127,push_vlan:0x8100,set_field:8191->vlan_vid
 group_id=3221225472,type=indirect,bucket=actions=pop_vlan,CONTROLLER:65535
 
group_id=1076363264,type=all,bucket=actions=group:2621445,bucket=actions=group:2621446
 group_id=2621446,type=indirect,bucket=actions=pop_vlan,output:6
 
group_id=2415919127,type=indirect,bucket=actions=set_field:00:00:00:00:02:27->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:8190->vlan_vid,group:268304386
 
group_id=1879048219,type=select,bucket=actions=group:2449473560,bucket=actions=group:2449473562
 
group_id=1879048224,type=select,bucket=actions=group:2449473565,bucket=actions=group:2449473567
 group_id=2621445,type=indirect,bucket=actions=pop_vlan,output:5
 
group_id=2415919129,type=indirect,bucket=actions=set_field:00:00:00:00:02:26->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:8190->vlan_vid,group:268304385
 group_id=1310724,type=indirect,bucket=actions=pop_vlan,output:4
 
group_id=2415919132,type=indirect,bucket=actions=set_field:00:00:00:00:02:27->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:8190->vlan_vid,group:268304386
 
group_id=2415919134,type=indirect,bucket=actions=set_field:00:00:00:00:02:26->eth_dst,set_field:00:00:00:00:02:04->eth_src,set_field:8190->vlan_vid,group:268304385
 group_id=1310723,type=indirect,bucket=actions=pop_vlan,output:3
 
group_id=2449473565,type=indirect,bucket=actions=pop_vlan,push_mpls:0x8847,set_field:205->mpls_label,group:2415919132,push_vlan:0x8100,set_field:8191->vlan_vid
 
group_id=2449473567,type=indirect,bucket=actions=pop_vlan,push_mpls:0x8847,set_field:205->mpls_label,group:2415919134,push_vlan:0x8100,set_field:8191->vlan_vid
 group_id=268304386,type=indirect,bucket=actions=pop_vlan,output:2
 
group_id=1075052544,type=all,bucket=actions=group:1310724,bucket=actions=group:1310723
 group_id=268304385,type=indirect,bucket=actions=pop_vlan,output:1
 
group_id=2449473562,type=indirect,bucket=actions=pop_vlan,push_mpls:0x8847,set_field:215->mpls_label,group:2415919129,push_vlan:0x8100,set_field:8191->vlan_vid


Here is my trace command and its output:
gongysh@ubuntu16:~/routing$ sudo ovs-appctl ofproto/trace s204 
in_port=3,dl_type=0x0800,dl_src=00:aa:00:00:00:01,nw_src=10.0.2.1,dl_dst=00:00:00:00:02:04,nw_dst=10.0.99.2,nw_proto=1
Bridge: s204
Flow: 
icmp,in_port=3,vlan_tci=0x0000,dl_src=00:aa:00:00:00:01,dl_dst=00:00:00:00:02:04,nw_src=10.0.2.1,nw_dst=10.0.99.2,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0

Rule: table=0 cookie=0x850000bd57cb49 priority=0
OpenFlow actions=goto_table:10

        Resubmitted flow: 
icmp,in_port=3,vlan_tci=0x0000,dl_src=00:aa:00:00:00:01,dl_dst=00:00:00:00:02:04,nw_src=10.0.2.1,nw_dst=10.0.99.2,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
        Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 reg3=0x0 reg4=0x0 reg5=0x0 
reg6=0x0 reg7=0x0
        Resubmitted  odp: drop
        Resubmitted megaflow: 
recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,nw_frag=no
        Rule: table=10 cookie=0x7a0000d4173ff7 in_port=3,vlan_tci=0x0000/0x1fff
        OpenFlow actions=push_vlan:0x8100,set_field:4116->vlan_vid,goto_table:20

                Resubmitted flow: 
icmp,in_port=3,dl_vlan=20,dl_vlan_pcp=0,dl_src=00:aa:00:00:00:01,dl_dst=00:00:00:00:02:04,nw_src=10.0.2.1,nw_dst=10.0.99.2,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
                Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 reg3=0x0 reg4=0x0 
reg5=0x0 reg6=0x0 reg7=0x0
                Resubmitted  odp: drop
                Resubmitted megaflow: 
recirc_id=0,ip,in_port=3,vlan_tci=0x0000,dl_dst=00:00:00:00:02:04,nw_frag=no
                Rule: table=20 cookie=0x7a00004b3d1965 
ip,in_port=3,dl_vlan=20,dl_dst=00:00:00:00:02:04
                OpenFlow actions=goto_table:30

                        Resubmitted flow: unchanged
                        Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 reg3=0x0 
reg4=0x0 reg5=0x0 reg6=0x0 reg7=0x0
                        Resubmitted  odp: drop
                        Resubmitted megaflow: 
recirc_id=0,ip,in_port=3,vlan_tci=0x0000,dl_dst=00:00:00:00:02:04,nw_dst=10.0.99.0/24,nw_frag=no
                        Rule: table=30 cookie=0x7a00002deb373b 
priority=48010,ip,nw_dst=10.0.99.0/24
                        OpenFlow 
actions=write_actions(group:1879048224),goto_table:60

                                Resubmitted flow: unchanged
                                Resubmitted regs: reg0=0x0 reg1=0x0 reg2=0x0 
reg3=0x0 reg4=0x0 reg5=0x0 reg6=0x0 reg7=0x0
                                Resubmitted  odp: drop
                                Resubmitted megaflow: 
recirc_id=0,icmp,in_port=3,vlan_tci=0x0000,dl_dst=00:00:00:00:02:04,nw_dst=10.0.99.0/24,nw_frag=no
                                Rule: table=60 cookie=0x85000038b487e7 
priority=0
                                OpenFlow actions=drop

Final flow: 
icmp,in_port=3,dl_vlan=20,dl_vlan_pcp=0,dl_src=00:aa:00:00:00:01,dl_dst=00:00:00:00:02:04,nw_src=10.0.2.1,nw_dst=10.0.99.2,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
Megaflow: 
recirc_id=0,icmp,in_port=3,vlan_tci=0x0000,dl_src=00:aa:00:00:00:01,dl_dst=00:00:00:00:02:04,nw_src=10.0.2.1,nw_dst=10.0.99.2,nw_tos=0,nw_ttl=0,mpls_label=0,nw_frag=no,icmp_type=0x0/0xff,icmp_code=0x0/0xff
Datapath actions: 
set(eth(src=00:00:00:00:02:04,dst=00:00:00:00:02:27)),push_mpls(label=205,tc=0,ttl=64,bos=1,eth_type=0x8847),19


The out put does not show how the flow is passing the groups and last get to 
the last open flow port.

Is there a way to trace into group?

Regards


yong sheng gong

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to