X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fovs-ofctl.at;h=0648f067d901ceab632cf0a6e5e8fd2a5de790f1;hb=eb9b830766044475277a590dbf8d213b77b62188;hp=563a7c6b84c1ac1a41dbf8c1905972f5264cb898;hpb=21dd5f55a40fa16e4d9fae1a354f51b0a2992e22;p=openvswitch diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index 563a7c6b..0648f067 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -1,7 +1,7 @@ AT_BANNER([ovs-ofctl]) AT_SETUP([ovs-ofctl parse-flows]) -AT_DATA([flows.txt], [ +AT_DATA([flows.txt], [[ # comment tcp,tp_src=123,actions=flood in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop @@ -13,11 +13,14 @@ cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note tun_id=0x1234,cookie=0x5678,actions=flood actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789 +actions=multipath(eth_src, 50, hrw, 12, 0, NXM_NX_REG0[0..3]),multipath(symmetric_l4, 1024, iter_hash, 5000, 5050, NXM_NX_REG0[0..12]) actions=drop -]) -AT_CHECK([ovs-ofctl parse-flows flows.txt], [0], [stdout], [stderr]) -AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl -OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD +tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop +]]) +AT_CHECK([ovs-ofctl parse-flows flows.txt +], [0], [stdout], [stderr]) +AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], +[[OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD OFPT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop OFPT_FLOW_MOD: ADD arp,nw_src=192.168.0.1 actions=drop_spoofed_arp,NORMAL OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0 @@ -28,8 +31,11 @@ OFPT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.0 NXT_TUN_ID_FROM_COOKIE: set=1 OFPT_FLOW_MOD: ADD cookie:0x123400005678 actions=FLOOD OFPT_FLOW_MOD: ADD actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789 +OFPT_FLOW_MOD: ADD actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l4,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12]) OFPT_FLOW_MOD: ADD actions=drop -]) +NXT_SET_FLOW_FORMAT: format=nxm +NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop +]]) AT_CHECK([sed 's/.*|//' stderr], [0], [dnl normalization changed ofp_match, details: pre: wildcards= 0x3820f8 in_port=65534 dl_src=00:0a:e4:25:6b:b0 dl_dst=00:00:00:00:00:00 dl_vlan= 9 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 @@ -62,6 +68,7 @@ cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note tun_id=0x1234,cookie=0x5678,actions=flood actions=drop +tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop ]) AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout]) AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl @@ -75,6 +82,7 @@ NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTRO NXT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD NXT_FLOW_MOD: ADD actions=drop +NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop ]) AT_CLEANUP @@ -105,7 +113,7 @@ NXT_FLOW_MOD: ADD cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTR NXT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD NXT_FLOW_MOD: ADD actions=drop -NXT_FLOW_MOD: ADD NXM_NX_REG0(0000007b) actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:55->NXM_NX_REG2[],move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[] +NXT_FLOW_MOD: ADD NXM_NX_REG0(0000007b) actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:0x37->NXM_NX_REG2[],move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[] ]]) AT_CLEANUP @@ -211,6 +219,7 @@ NXM_OF_ARP_TPA_W(C0D80000/FFFF0000) # Tunnel ID. NXM_NX_TUN_ID(00000000abcdef01) +NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF) # Register 0. NXM_NX_REG0(acebdf56) @@ -328,6 +337,7 @@ nx_pull_match() returned error 44010104 # Tunnel ID. NXM_NX_TUN_ID(00000000abcdef01) +NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff) # Register 0. NXM_NX_REG0(acebdf56)