Merge lp:~gandelman-a/ubuntu/precise/openvswitch/ovs-ppc-ftbfs into lp:ubuntu/precise-proposed/openvswitch
- Precise (12.04)
- ovs-ppc-ftbfs
- Merge into precise-proposed
Proposed by
Adam Gandelman
on 2012-07-26
| Status: | Merged |
|---|---|
| Merge reported by: | James Page |
| Merged at revision: | not available |
| Proposed branch: | lp:~gandelman-a/ubuntu/precise/openvswitch/ovs-ppc-ftbfs |
| Merge into: | lp:ubuntu/precise-proposed/openvswitch |
| Diff against target: |
1093 lines (+984/-24) 6 files modified
.pc/applied-patches (+1/-0) .pc/fix_ftbfs_big_endian.patch/tests/ofproto-dpif.at (+812/-0) debian/changelog (+6/-0) debian/patches/fix_ftbfs_big_endian.patch (+128/-0) debian/patches/series (+1/-0) tests/ofproto-dpif.at (+36/-24) |
| To merge this branch: | bzr merge lp:~gandelman-a/ubuntu/precise/openvswitch/ovs-ppc-ftbfs |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ubuntu Development Team | 2012-07-26 | Pending | |
|
Review via email:
|
|||
Commit Message
Description of the Change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file '.pc/applied-patches' |
| 2 | --- .pc/applied-patches 2012-07-16 11:06:23 +0000 |
| 3 | +++ .pc/applied-patches 2012-07-26 19:09:22 +0000 |
| 4 | @@ -1,1 +1,2 @@ |
| 5 | update_odputil_key_bytes.patch |
| 6 | +fix_ftbfs_big_endian.patch |
| 7 | |
| 8 | === added directory '.pc/fix_ftbfs_big_endian.patch' |
| 9 | === added file '.pc/fix_ftbfs_big_endian.patch/.timestamp' |
| 10 | === added directory '.pc/fix_ftbfs_big_endian.patch/tests' |
| 11 | === added file '.pc/fix_ftbfs_big_endian.patch/tests/ofproto-dpif.at' |
| 12 | --- .pc/fix_ftbfs_big_endian.patch/tests/ofproto-dpif.at 1970-01-01 00:00:00 +0000 |
| 13 | +++ .pc/fix_ftbfs_big_endian.patch/tests/ofproto-dpif.at 2012-07-26 19:09:22 +0000 |
| 14 | @@ -0,0 +1,812 @@ |
| 15 | +AT_BANNER([ofproto-dpif]) |
| 16 | + |
| 17 | +AT_SETUP([ofproto-dpif - resubmit]) |
| 18 | +OVS_VSWITCHD_START |
| 19 | +AT_DATA([flows.txt], [dnl |
| 20 | +table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21) |
| 21 | +table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18) |
| 22 | +table=0 in_port=3 priority=2000 icmp actions=output(20) |
| 23 | +table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15) |
| 24 | +table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2) |
| 25 | +table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2) |
| 26 | +]) |
| 27 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 28 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 29 | +AT_CHECK([tail -1 stdout], [0], |
| 30 | + [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21 |
| 31 | +]) |
| 32 | +OVS_VSWITCHD_STOP |
| 33 | +AT_CLEANUP |
| 34 | + |
| 35 | +AT_SETUP([ofproto-dpif - registers]) |
| 36 | +OVS_VSWITCHD_START |
| 37 | +AT_DATA([flows.txt], [dnl |
| 38 | +in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91 |
| 39 | +in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92 |
| 40 | +in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11 |
| 41 | +in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]] |
| 42 | +in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]] |
| 43 | +in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]] |
| 44 | +in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]] |
| 45 | +in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]] |
| 46 | +in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]] |
| 47 | +in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]] |
| 48 | +in_port=9,reg0=0xdeadbeef actions=output:20 |
| 49 | +in_port=10,reg1=0xdeadbeef actions=output:21 |
| 50 | +in_port=11,reg2=0xeef22dea actions=output:22 |
| 51 | +]) |
| 52 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 53 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 54 | +AT_CHECK([tail -1 stdout], [0], |
| 55 | + [Datapath actions: 20,21,22 |
| 56 | +]) |
| 57 | +OVS_VSWITCHD_STOP |
| 58 | +AT_CLEANUP |
| 59 | + |
| 60 | +AT_SETUP([ofproto-dpif - output]) |
| 61 | +OVS_VSWITCHD_START |
| 62 | +AT_DATA([flows.txt], [dnl |
| 63 | +in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7 |
| 64 | +in_port=2 actions=output:9 |
| 65 | +in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]] |
| 66 | +in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11 |
| 67 | +in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]] |
| 68 | +in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]] |
| 69 | +in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]] |
| 70 | +]) |
| 71 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 72 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 73 | +AT_CHECK([tail -1 stdout], [0], |
| 74 | + [Datapath actions: 9,55,10,55,66,11,77,88 |
| 75 | +]) |
| 76 | +OVS_VSWITCHD_STOP |
| 77 | +AT_CLEANUP |
| 78 | + |
| 79 | +AT_SETUP([ofproto-dpif - DSCP]) |
| 80 | +dnl This test assumes port p1 is allocated OpenFlow port number 1. |
| 81 | +OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy]) |
| 82 | +AT_DATA([flows.txt], [dnl |
| 83 | +actions=output:65534,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:65534 |
| 84 | +]) |
| 85 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 86 | +AT_CHECK([ovs-vsctl -- \ |
| 87 | + set Port p1 qos=@newqos --\ |
| 88 | + --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\ |
| 89 | + --id=@q1 create Queue dscp=1 --\ |
| 90 | + --id=@q2 create Queue dscp=2], [0], [ignore]) |
| 91 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 92 | +AT_CHECK([tail -1 stdout], [0], |
| 93 | + [Datapath actions: dnl |
| 94 | +0,dnl |
| 95 | +set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x7,ttl=128,frag=no)),set(priority(1)),1,dnl |
| 96 | +set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xb,ttl=128,frag=no)),set(priority(2)),1,dnl |
| 97 | +1,dnl |
| 98 | +set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x7,ttl=128,frag=no)),set(priority(1)),1,dnl |
| 99 | +set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no)),set(priority(0)),1,dnl |
| 100 | +set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x3,ttl=128,frag=no)),1,dnl |
| 101 | +0 |
| 102 | +]) |
| 103 | +OVS_VSWITCHD_STOP |
| 104 | +AT_CLEANUP |
| 105 | + |
| 106 | +AT_SETUP([ofproto-dpif - output/flood flags]) |
| 107 | +dnl This test assumes that OpenFlow port numbers are allocated in order |
| 108 | +dnl starting from one. It does not necessarily require that they are allocated |
| 109 | +dnl in the same order that they are named in the database. Just that the |
| 110 | +dnl following command guarantees OpenFlow port 65534, and ports 1-7 exist in |
| 111 | +dnl the bridge. |
| 112 | +OVS_VSWITCHD_START([dnl |
| 113 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 114 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 115 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 116 | + add-port br0 p4 -- set Interface p4 type=dummy --\ |
| 117 | + add-port br0 p5 -- set Interface p5 type=dummy --\ |
| 118 | + add-port br0 p6 -- set Interface p6 type=dummy --\ |
| 119 | + add-port br0 p7 -- set Interface p7 type=dummy ]) |
| 120 | + |
| 121 | +AT_DATA([flows.txt], [dnl |
| 122 | +in_port=1 actions=flood |
| 123 | +in_port=2 actions=all |
| 124 | +in_port=3 actions=output:65534,output:1,output:2,output:3,output:4,output:5,output:6,output:7 |
| 125 | +in_port=4 actions=enqueue:65534:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1 |
| 126 | +]) |
| 127 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 128 | +AT_CHECK([ovs-ofctl mod-port br0 5 noforward]) |
| 129 | +AT_CHECK([ovs-ofctl mod-port br0 6 noflood]) |
| 130 | + |
| 131 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
| 132 | +AT_CHECK([tail -1 stdout \ |
| 133 | +| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl |
| 134 | +0 |
| 135 | +2 |
| 136 | +3 |
| 137 | +4 |
| 138 | +7 |
| 139 | +]) |
| 140 | + |
| 141 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
| 142 | +AT_CHECK([tail -1 stdout \ |
| 143 | +| sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl |
| 144 | +0 |
| 145 | +1 |
| 146 | +3 |
| 147 | +4 |
| 148 | +6 |
| 149 | +7 |
| 150 | +]) |
| 151 | + |
| 152 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
| 153 | +AT_CHECK([tail -1 stdout], [0], |
| 154 | + [Datapath actions: 0,1,2,4,6,7 |
| 155 | +]) |
| 156 | + |
| 157 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
| 158 | +AT_CHECK([tail -1 stdout], [0], |
| 159 | + [Datapath actions: set(priority(1)),0,1,2,set(priority(2)),3,set(priority(1)),6,7 |
| 160 | +]) |
| 161 | +OVS_VSWITCHD_STOP |
| 162 | +AT_CLEANUP |
| 163 | + |
| 164 | +AT_SETUP([ofproto-dpif - set_tunnel]) |
| 165 | +OVS_VSWITCHD_START |
| 166 | +AT_DATA([flows.txt], [dnl |
| 167 | +in_port=90 actions=resubmit:1,resubmit:2,resubmit:3,resubmit:4,resubmit:5 |
| 168 | +in_port=1 actions=set_tunnel:1,output:1 |
| 169 | +in_port=2 actions=set_tunnel:1,output:2 |
| 170 | +in_port=3 actions=set_tunnel:2,set_tunnel:3,output:3 |
| 171 | +in_port=4 actions=set_tunnel:4,set_tunnel:3,output:4 |
| 172 | +in_port=5 actions=set_tunnel:5 |
| 173 | +]) |
| 174 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 175 | +AT_CHECK([ovs-appctl ofproto/trace br0 'tun_id(0x1),in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 176 | +AT_CHECK([tail -1 stdout], [0], |
| 177 | + [Datapath actions: set(tun_id(0x1)),1,2,set(tun_id(0x3)),3,4 |
| 178 | +]) |
| 179 | +OVS_VSWITCHD_STOP |
| 180 | +AT_CLEANUP |
| 181 | + |
| 182 | +AT_SETUP([ofproto-dpif - VLAN handling]) |
| 183 | +OVS_VSWITCHD_START( |
| 184 | + [set Bridge br0 fail-mode=standalone -- \ |
| 185 | + add-port br0 p1 trunks=10,12 -- \ |
| 186 | + add-port br0 p2 tag=10 -- \ |
| 187 | + add-port br0 p3 tag=12 \ |
| 188 | + other-config:priority-tags=true -- \ |
| 189 | + add-port br0 p4 tag=12 -- \ |
| 190 | + add-port br0 p5 vlan_mode=native-tagged tag=10 -- \ |
| 191 | + add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \ |
| 192 | + add-port br0 p7 vlan_mode=native-untagged tag=12 -- \ |
| 193 | + add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \ |
| 194 | + other-config:priority-tags=true -- \ |
| 195 | + set Interface p1 type=dummy -- \ |
| 196 | + set Interface p2 type=dummy -- \ |
| 197 | + set Interface p3 type=dummy -- \ |
| 198 | + set Interface p4 type=dummy -- \ |
| 199 | + set Interface p5 type=dummy -- \ |
| 200 | + set Interface p6 type=dummy -- \ |
| 201 | + set Interface p7 type=dummy -- \ |
| 202 | + set Interface p8 type=dummy --]) |
| 203 | + |
| 204 | +AT_CHECK( |
| 205 | + [ovs-vsctl \ |
| 206 | + -- get Interface p1 ofport \ |
| 207 | + -- get Interface p2 ofport \ |
| 208 | + -- get Interface p3 ofport \ |
| 209 | + -- get Interface p4 ofport \ |
| 210 | + -- get Interface p5 ofport \ |
| 211 | + -- get Interface p6 ofport \ |
| 212 | + -- get Interface p7 ofport \ |
| 213 | + -- get Interface p8 ofport], |
| 214 | + [0], [stdout]) |
| 215 | +set `cat stdout` |
| 216 | +br0=0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=$7 p8=$8 |
| 217 | + |
| 218 | +dnl Each of these specifies an in_port, a VLAN VID (or "none"), a VLAN |
| 219 | +dnl PCP (used if the VID isn't "none") and the expected set of datapath |
| 220 | +dnl actions. |
| 221 | +for tuple in \ |
| 222 | + "br0 none 0 drop" \ |
| 223 | + "br0 0 0 drop" \ |
| 224 | + "br0 0 1 drop" \ |
| 225 | + "br0 10 0 p1,p5,p6,p7,p8,pop_vlan,p2" \ |
| 226 | + "br0 10 1 p1,p5,p6,p7,p8,pop_vlan,p2" \ |
| 227 | + "br0 11 0 p5,p7" \ |
| 228 | + "br0 11 1 p5,p7" \ |
| 229 | + "br0 12 0 p1,p5,p6,pop_vlan,p3,p4,p7,p8" \ |
| 230 | + "br0 12 1 p1,p5,p6,pop_vlan,p4,p7,push_vlan(vid=0,pcp=1),p3,p8" \ |
| 231 | + "p1 none 0 drop" \ |
| 232 | + "p1 0 0 drop" \ |
| 233 | + "p1 0 1 drop" \ |
| 234 | + "p1 10 0 br0,p5,p6,p7,p8,pop_vlan,p2" \ |
| 235 | + "p1 10 1 br0,p5,p6,p7,p8,pop_vlan,p2" \ |
| 236 | + "p1 11 0 drop" \ |
| 237 | + "p1 11 1 drop" \ |
| 238 | + "p1 12 0 br0,p5,p6,pop_vlan,p3,p4,p7,p8" \ |
| 239 | + "p1 12 1 br0,p5,p6,pop_vlan,p4,p7,push_vlan(vid=0,pcp=1),p3,p8" \ |
| 240 | + "p2 none 0 push_vlan(vid=10,pcp=0),br0,p1,p5,p6,p7,p8" \ |
| 241 | + "p2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),br0,p1,p5,p6,p7,p8" \ |
| 242 | + "p2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),br0,p1,p5,p6,p7,p8" \ |
| 243 | + "p2 10 0 drop" \ |
| 244 | + "p2 10 1 drop" \ |
| 245 | + "p2 11 0 drop" \ |
| 246 | + "p2 11 1 drop" \ |
| 247 | + "p2 12 0 drop" \ |
| 248 | + "p2 12 1 drop" \ |
| 249 | + "p3 none 0 p4,p7,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 250 | + "p3 0 0 pop_vlan,p4,p7,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 251 | + "p3 0 1 p8,pop_vlan,p4,p7,push_vlan(vid=12,pcp=1),br0,p1,p5,p6" \ |
| 252 | + "p3 10 0 drop" \ |
| 253 | + "p3 10 1 drop" \ |
| 254 | + "p3 11 0 drop" \ |
| 255 | + "p3 11 1 drop" \ |
| 256 | + "p3 12 0 drop" \ |
| 257 | + "p3 12 1 drop" \ |
| 258 | + "p4 none 0 p3,p7,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 259 | + "p4 0 0 pop_vlan,p3,p7,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 260 | + "p4 0 1 p3,p8,pop_vlan,p7,push_vlan(vid=12,pcp=1),br0,p1,p5,p6" \ |
| 261 | + "p4 10 0 drop" \ |
| 262 | + "p4 10 1 drop" \ |
| 263 | + "p4 11 0 drop" \ |
| 264 | + "p4 11 1 drop" \ |
| 265 | + "p4 12 0 drop" \ |
| 266 | + "p4 12 1 drop" \ |
| 267 | + "p5 none 0 p2,push_vlan(vid=10,pcp=0),br0,p1,p6,p7,p8" \ |
| 268 | + "p5 0 0 pop_vlan,p2,push_vlan(vid=10,pcp=0),br0,p1,p6,p7,p8" \ |
| 269 | + "p5 0 1 pop_vlan,p2,push_vlan(vid=10,pcp=1),br0,p1,p6,p7,p8" \ |
| 270 | + "p5 10 0 br0,p1,p6,p7,p8,pop_vlan,p2" \ |
| 271 | + "p5 10 1 br0,p1,p6,p7,p8,pop_vlan,p2" \ |
| 272 | + "p5 11 0 br0,p7" \ |
| 273 | + "p5 11 1 br0,p7" \ |
| 274 | + "p5 12 0 br0,p1,p6,pop_vlan,p3,p4,p7,p8" \ |
| 275 | + "p5 12 1 br0,p1,p6,pop_vlan,p4,p7,push_vlan(vid=0,pcp=1),p3,p8" \ |
| 276 | + "p6 none 0 p2,push_vlan(vid=10,pcp=0),br0,p1,p5,p7,p8" \ |
| 277 | + "p6 0 0 pop_vlan,p2,push_vlan(vid=10,pcp=0),br0,p1,p5,p7,p8" \ |
| 278 | + "p6 0 1 pop_vlan,p2,push_vlan(vid=10,pcp=1),br0,p1,p5,p7,p8" \ |
| 279 | + "p6 10 0 br0,p1,p5,p7,p8,pop_vlan,p2" \ |
| 280 | + "p6 10 1 br0,p1,p5,p7,p8,pop_vlan,p2" \ |
| 281 | + "p6 11 0 drop" \ |
| 282 | + "p6 11 1 drop" \ |
| 283 | + "p6 12 0 br0,p1,p5,pop_vlan,p3,p4,p7,p8" \ |
| 284 | + "p6 12 1 br0,p1,p5,pop_vlan,p4,p7,push_vlan(vid=0,pcp=1),p3,p8" \ |
| 285 | + "p7 none 0 p3,p4,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 286 | + "p7 0 0 pop_vlan,p3,p4,p8,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 287 | + "p7 0 1 p3,p8,pop_vlan,p4,push_vlan(vid=12,pcp=1),br0,p1,p5,p6" \ |
| 288 | + "p7 10 0 br0,p1,p5,p6,p8,pop_vlan,p2" \ |
| 289 | + "p7 10 1 br0,p1,p5,p6,p8,pop_vlan,p2" \ |
| 290 | + "p7 11 0 br0,p5" \ |
| 291 | + "p7 11 1 br0,p5" \ |
| 292 | + "p7 12 0 br0,p1,p5,p6,pop_vlan,p3,p4,p8" \ |
| 293 | + "p7 12 1 br0,p1,p5,p6,pop_vlan,p4,push_vlan(vid=0,pcp=1),p3,p8" \ |
| 294 | + "p8 none 0 p3,p4,p7,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 295 | + "p8 0 0 pop_vlan,p3,p4,p7,push_vlan(vid=12,pcp=0),br0,p1,p5,p6" \ |
| 296 | + "p8 0 1 p3,pop_vlan,p4,p7,push_vlan(vid=12,pcp=1),br0,p1,p5,p6" \ |
| 297 | + "p8 10 0 br0,p1,p5,p6,p7,pop_vlan,p2" \ |
| 298 | + "p8 10 1 br0,p1,p5,p6,p7,pop_vlan,p2" \ |
| 299 | + "p8 11 0 drop" \ |
| 300 | + "p8 11 1 drop" \ |
| 301 | + "p8 12 0 br0,p1,p5,p6,pop_vlan,p3,p4,p7" \ |
| 302 | + "p8 12 1 br0,p1,p5,p6,pop_vlan,p4,p7,push_vlan(vid=0,pcp=1),p3" |
| 303 | +do |
| 304 | + set $tuple |
| 305 | + in_port=$1 |
| 306 | + vlan=$2 |
| 307 | + pcp=$3 |
| 308 | + expected=$4 |
| 309 | + |
| 310 | + eval n_in_port=\$$in_port |
| 311 | + if test $vlan = none; then |
| 312 | + flow="in_port($n_in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)" |
| 313 | + else |
| 314 | + flow="in_port($n_in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=$vlan,pcp=$pcp),encap(eth_type(0xabcd))" |
| 315 | + fi |
| 316 | + |
| 317 | + echo "----------------------------------------------------------------------" |
| 318 | + echo "in_port=$in_port vlan=$vlan pcp=$pcp" |
| 319 | + |
| 320 | + AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 321 | + actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
| 322 | + |
| 323 | + AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" br0=$br0 p1=$p1 p2=$p2 p3=$p3 p4=$p4 p5=$p5 p6=$p6 p7=$p7 p8=$p8], [0], [stdout]) |
| 324 | + mv stdout expout |
| 325 | + AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" br0=$br0 p1=$p1 p2=$p2 p3=$p3 p4=$p4 p5=$p5 p6=$p6 p7=$p7 p8=$p8], [0], [expout]) |
| 326 | +done |
| 327 | + |
| 328 | +OVS_VSWITCHD_STOP |
| 329 | +AT_CLEANUP |
| 330 | + |
| 331 | +AT_SETUP([ofproto-dpif - fragment handling]) |
| 332 | +OVS_VSWITCHD_START |
| 333 | +AT_DATA([flows.txt], [dnl |
| 334 | +priority=75 tcp ip_frag=no tp_dst=80 actions=output:1 |
| 335 | +priority=75 tcp ip_frag=first tp_dst=80 actions=output:2 |
| 336 | +priority=75 tcp ip_frag=later tp_dst=80 actions=output:3 |
| 337 | +priority=50 tcp ip_frag=no actions=output:4 |
| 338 | +priority=50 tcp ip_frag=first actions=output:5 |
| 339 | +priority=50 tcp ip_frag=later actions=output:6 |
| 340 | +]) |
| 341 | +AT_CHECK([ovs-ofctl replace-flows br0 flows.txt]) |
| 342 | + |
| 343 | +base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128" |
| 344 | +no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)" |
| 345 | +first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)" |
| 346 | +later_flow="$base_flow,frag=later)" |
| 347 | + |
| 348 | + # mode no first later |
| 349 | +for tuple in \ |
| 350 | + 'normal 1 5 6' \ |
| 351 | + 'drop 1 drop drop' \ |
| 352 | + 'nx-match 1 2 6' |
| 353 | +do |
| 354 | + set $tuple |
| 355 | + mode=$1 |
| 356 | + no=$2 |
| 357 | + first=$3 |
| 358 | + later=$4 |
| 359 | + |
| 360 | + AT_CHECK([ovs-ofctl set-frags br0 $mode]) |
| 361 | + for type in no first later; do |
| 362 | + eval flow=\$${type}_flow exp_output=\$$type |
| 363 | + AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 364 | + AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: $exp_output |
| 365 | +]) |
| 366 | + done |
| 367 | +done |
| 368 | +OVS_VSWITCHD_STOP |
| 369 | +AT_CLEANUP |
| 370 | + |
| 371 | +AT_SETUP([ofproto-dpif - exit]) |
| 372 | +OVS_VSWITCHD_START |
| 373 | +AT_DATA([flows.txt], [dnl |
| 374 | +in_port=1 actions=output:10,exit,output:11 |
| 375 | +in_port=2 actions=output:12,resubmit:1,output:12 |
| 376 | +in_port=3 actions=output:13,resubmit:2,output:14 |
| 377 | +]) |
| 378 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 379 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 380 | +AT_CHECK([tail -1 stdout], [0], |
| 381 | + [Datapath actions: 10 |
| 382 | +]) |
| 383 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 384 | +AT_CHECK([tail -1 stdout], [0], |
| 385 | + [Datapath actions: 12,10 |
| 386 | +]) |
| 387 | +AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
| 388 | +AT_CHECK([tail -1 stdout], [0], |
| 389 | + [Datapath actions: 13,12,10 |
| 390 | +]) |
| 391 | +OVS_VSWITCHD_STOP |
| 392 | +AT_CLEANUP |
| 393 | + |
| 394 | + |
| 395 | +AT_SETUP([ofproto-dpif - mirroring, select_all]) |
| 396 | +OVS_VSWITCHD_START |
| 397 | +AT_CHECK([ovs-vsctl \ |
| 398 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 399 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 400 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 401 | + set Bridge br0 mirrors=@m --\ |
| 402 | + --id=@p3 get Port p3 --\ |
| 403 | + --id=@m create Mirror name=mymirror \ |
| 404 | + select_all=true output_port=@p3 ], [0], [stdout]) |
| 405 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 406 | +<0> |
| 407 | +]) |
| 408 | + |
| 409 | +AT_CHECK( |
| 410 | + [ovs-vsctl \ |
| 411 | + -- get Interface p1 ofport \ |
| 412 | + -- get Interface p2 ofport \ |
| 413 | + -- get Interface p3 ofport], |
| 414 | + [0], [stdout]) |
| 415 | +set `cat stdout` |
| 416 | +p1=$1 p2=$2 p3=$3 |
| 417 | + |
| 418 | +AT_DATA([flows.txt], [dnl |
| 419 | +in_port=1 actions=output:2 |
| 420 | +in_port=2 actions=output:1 |
| 421 | +]) |
| 422 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 423 | + |
| 424 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 425 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 426 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 427 | + [Datapath actions: $p2,$p3 |
| 428 | +]) |
| 429 | + |
| 430 | +flow="in_port($p2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 431 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 432 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 433 | + [Datapath actions: $p1,$p3 |
| 434 | +]) |
| 435 | + |
| 436 | +OVS_VSWITCHD_STOP |
| 437 | +AT_CLEANUP |
| 438 | + |
| 439 | + |
| 440 | +AT_SETUP([ofproto-dpif - mirroring, select_src]) |
| 441 | +OVS_VSWITCHD_START |
| 442 | +AT_CHECK([ovs-vsctl \ |
| 443 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 444 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 445 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 446 | + set Bridge br0 mirrors=@m --\ |
| 447 | + --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\ |
| 448 | + --id=@m create Mirror name=mymirror \ |
| 449 | + select_src_port=@p1 output_port=@p3 ], [0], [stdout]) |
| 450 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 451 | +<0> |
| 452 | +]) |
| 453 | + |
| 454 | +AT_CHECK( |
| 455 | + [ovs-vsctl \ |
| 456 | + -- get Interface p1 ofport \ |
| 457 | + -- get Interface p2 ofport \ |
| 458 | + -- get Interface p3 ofport], |
| 459 | + [0], [stdout]) |
| 460 | +set `cat stdout` |
| 461 | +p1=$1 p2=$2 p3=$3 |
| 462 | + |
| 463 | +AT_DATA([flows.txt], [dnl |
| 464 | +in_port=1 actions=output:2 |
| 465 | +in_port=2 actions=output:1 |
| 466 | +]) |
| 467 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 468 | + |
| 469 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 470 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 471 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 472 | + [Datapath actions: $p2,$p3 |
| 473 | +]) |
| 474 | + |
| 475 | +flow="in_port($p2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 476 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 477 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 478 | + [Datapath actions: $p1 |
| 479 | +]) |
| 480 | +OVS_VSWITCHD_STOP |
| 481 | +AT_CLEANUP |
| 482 | + |
| 483 | +AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port]) |
| 484 | +OVS_VSWITCHD_START |
| 485 | +AT_CHECK([ovs-vsctl \ |
| 486 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 487 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 488 | + set Bridge br0 mirrors=@m --\ |
| 489 | + --id=@p2 get Port p2 --\ |
| 490 | + --id=@m create Mirror name=mymirror \ |
| 491 | + select_all=true output_port=@p2 ], [0], [stdout]) |
| 492 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 493 | +<0> |
| 494 | +]) |
| 495 | + |
| 496 | +AT_CHECK( |
| 497 | + [ovs-vsctl \ |
| 498 | + -- get Interface p1 ofport \ |
| 499 | + -- get Interface p2 ofport], |
| 500 | + [0], [stdout]) |
| 501 | +set `cat stdout` |
| 502 | +p1=$1 p2=$2 |
| 503 | + |
| 504 | +AT_CHECK([ovs-ofctl add-flow br0 action=output:1]) |
| 505 | + |
| 506 | +# "in_port" defaults to OFPP_NONE if it's not specified. |
| 507 | +flow="eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 508 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 509 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 510 | + [Datapath actions: $p1,$p2 |
| 511 | +]) |
| 512 | + |
| 513 | +OVS_VSWITCHD_STOP |
| 514 | +AT_CLEANUP |
| 515 | + |
| 516 | + |
| 517 | +AT_SETUP([ofproto-dpif - mirroring, select_dst]) |
| 518 | +OVS_VSWITCHD_START |
| 519 | +AT_CHECK([ovs-vsctl \ |
| 520 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 521 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 522 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 523 | + set Bridge br0 mirrors=@m --\ |
| 524 | + --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\ |
| 525 | + --id=@m create Mirror name=mymirror \ |
| 526 | + select_dst_port=@p2 output_port=@p3 ], [0], [stdout]) |
| 527 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 528 | +<0> |
| 529 | +]) |
| 530 | + |
| 531 | +AT_CHECK( |
| 532 | + [ovs-vsctl \ |
| 533 | + -- get Interface p1 ofport \ |
| 534 | + -- get Interface p2 ofport \ |
| 535 | + -- get Interface p3 ofport], |
| 536 | + [0], [stdout]) |
| 537 | +set `cat stdout` |
| 538 | +p1=$1 p2=$2 p3=$3 |
| 539 | + |
| 540 | +AT_DATA([flows.txt], [dnl |
| 541 | +in_port=1 actions=output:2 |
| 542 | +in_port=2 actions=output:1 |
| 543 | +]) |
| 544 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 545 | + |
| 546 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 547 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 548 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 549 | + [Datapath actions: $p2,$p3 |
| 550 | +]) |
| 551 | + |
| 552 | +flow="in_port($p2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 553 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 554 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 555 | + [Datapath actions: $p1 |
| 556 | +]) |
| 557 | + |
| 558 | +OVS_VSWITCHD_STOP |
| 559 | +AT_CLEANUP |
| 560 | + |
| 561 | + |
| 562 | +AT_SETUP([ofproto-dpif - mirroring, select_vlan]) |
| 563 | +OVS_VSWITCHD_START |
| 564 | +AT_CHECK([ovs-vsctl \ |
| 565 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 566 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 567 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 568 | + set Bridge br0 mirrors=@m --\ |
| 569 | + --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\ |
| 570 | + --id=@m create Mirror name=mymirror \ |
| 571 | + select_all=true select_vlan=11 output_port=@p3 ], [0], [stdout]) |
| 572 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 573 | +<0> |
| 574 | +]) |
| 575 | + |
| 576 | +AT_CHECK( |
| 577 | + [ovs-vsctl \ |
| 578 | + -- get Interface p1 ofport \ |
| 579 | + -- get Interface p2 ofport \ |
| 580 | + -- get Interface p3 ofport], |
| 581 | + [0], [stdout]) |
| 582 | +set `cat stdout` |
| 583 | +p1=$1 p2=$2 p3=$3 |
| 584 | + |
| 585 | +AT_DATA([flows.txt], [dnl |
| 586 | +in_port=1, actions=output:2 |
| 587 | +]) |
| 588 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 589 | + |
| 590 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 591 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 592 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 593 | + [Datapath actions: $p2 |
| 594 | +]) |
| 595 | + |
| 596 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))" |
| 597 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 598 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 599 | + [Datapath actions: $p2 |
| 600 | +]) |
| 601 | + |
| 602 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=11,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))" |
| 603 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 604 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 605 | + [Datapath actions: $p2,$p3 |
| 606 | +]) |
| 607 | + |
| 608 | +OVS_VSWITCHD_STOP |
| 609 | +AT_CLEANUP |
| 610 | + |
| 611 | + |
| 612 | +AT_SETUP([ofproto-dpif - mirroring, output_port]) |
| 613 | +OVS_VSWITCHD_START |
| 614 | +AT_CHECK([ovs-vsctl \ |
| 615 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 616 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 617 | + add-port br0 p3 -- set Interface p3 type=dummy --\ |
| 618 | + set Bridge br0 mirrors=@m --\ |
| 619 | + --id=@p3 get Port p3 --\ |
| 620 | + --id=@m create Mirror name=mymirror \ |
| 621 | + select_all=true output_port=@p3 ], [0], [stdout]) |
| 622 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 623 | +<0> |
| 624 | +]) |
| 625 | + |
| 626 | +AT_CHECK( |
| 627 | + [ovs-vsctl \ |
| 628 | + -- get Interface p1 ofport \ |
| 629 | + -- get Interface p2 ofport \ |
| 630 | + -- get Interface p3 ofport], |
| 631 | + [0], [stdout]) |
| 632 | +set `cat stdout` |
| 633 | +p1=$1 p2=$2 p3=$3 |
| 634 | + |
| 635 | +AT_DATA([flows.txt], [dnl |
| 636 | +in_port=1 actions=mod_vlan_vid:17,output:2 |
| 637 | +in_port=2 actions=output:1 |
| 638 | +]) |
| 639 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 640 | + |
| 641 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 642 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 643 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 644 | + [Datapath actions: push_vlan(vid=17,pcp=0),$p2,pop_vlan,$p3 |
| 645 | +]) |
| 646 | + |
| 647 | +flow="in_port($p2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 648 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 649 | +AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
| 650 | + [Datapath actions: $p1,$p3 |
| 651 | +]) |
| 652 | + |
| 653 | +OVS_VSWITCHD_STOP |
| 654 | +AT_CLEANUP |
| 655 | + |
| 656 | + |
| 657 | +AT_SETUP([ofproto-dpif - mirroring, output_vlan]) |
| 658 | +OVS_VSWITCHD_START |
| 659 | +AT_CHECK([ovs-vsctl \ |
| 660 | + add-port br0 p1 -- set Interface p1 type=dummy --\ |
| 661 | + add-port br0 p2 -- set Interface p2 type=dummy --\ |
| 662 | + set Bridge br0 mirrors=@m --\ |
| 663 | + --id=@m create Mirror name=mymirror \ |
| 664 | + select_all=true output_vlan=12 ], [0], [stdout]) |
| 665 | +AT_CHECK([perl $srcdir/uuidfilt.pl stdout], [0], [dnl |
| 666 | +<0> |
| 667 | +]) |
| 668 | + |
| 669 | +AT_CHECK( |
| 670 | + [ovs-vsctl \ |
| 671 | + -- get Interface p1 ofport \ |
| 672 | + -- get Interface p2 ofport], |
| 673 | + [0], [stdout]) |
| 674 | +set `cat stdout` |
| 675 | +br0=0 p1=$1 p2=$2 |
| 676 | + |
| 677 | +AT_DATA([flows.txt], [dnl |
| 678 | +in_port=1 actions=output:2 |
| 679 | +in_port=2 actions=mod_vlan_vid:17,output:1 |
| 680 | +]) |
| 681 | +AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 682 | + |
| 683 | +flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 684 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 685 | +actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
| 686 | + |
| 687 | +expected="$p2,push_vlan(vid=12,pcp=0),$br0,$p1,$p2" |
| 688 | +AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" br0=$br0 p1=$p1 p2=$p2], [0], [stdout]) |
| 689 | +mv stdout expout |
| 690 | +AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" br0=$br0 p1=$p1 p2=$p2], [0], [expout]) |
| 691 | + |
| 692 | +flow="in_port($p2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 693 | +AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
| 694 | +actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
| 695 | + |
| 696 | +expected="push_vlan(vid=17,pcp=0),$p1,pop_vlan,push_vlan(vid=12,pcp=0),$br0,$p1,$p2" |
| 697 | +AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" br0=$br0 p1=$p1 p2=$p2], [0], [stdout]) |
| 698 | +mv stdout expout |
| 699 | +AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" br0=$br0 p1=$p1 p2=$p2], [0], [expout]) |
| 700 | + |
| 701 | +OVS_VSWITCHD_STOP |
| 702 | +AT_CLEANUP |
| 703 | + |
| 704 | +m4_define([OFPROTO_TRACE], |
| 705 | + [flow="$2" |
| 706 | + AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout]) |
| 707 | + actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
| 708 | + expected="$4" |
| 709 | + AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5], |
| 710 | + [0], [stdout]) |
| 711 | + mv stdout expout |
| 712 | + AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5], |
| 713 | + [0], [expout])]) |
| 714 | + |
| 715 | +AT_SETUP([ofproto-dpif - MAC learning]) |
| 716 | +OVS_VSWITCHD_START( |
| 717 | + [set bridge br0 fail-mode=standalone -- \ |
| 718 | + add-port br0 p1 -- set Interface p1 type=dummy -- \ |
| 719 | + add-port br0 p2 -- set Interface p2 type=dummy -- \ |
| 720 | + add-port br0 p3 -- set Interface p3 type=dummy]) |
| 721 | + |
| 722 | +AT_CHECK( |
| 723 | + [ovs-vsctl \ |
| 724 | + -- get Interface p1 ofport \ |
| 725 | + -- get Interface p2 ofport \ |
| 726 | + -- get Interface p3 ofport], |
| 727 | + [0], [stdout]) |
| 728 | +set `cat stdout` |
| 729 | +br0=0 p1=$1 p2=$2 p3=$3 |
| 730 | +arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)' |
| 731 | + |
| 732 | +# Trace an ARP packet arriving on p3, to create a MAC learning entry. |
| 733 | +OFPROTO_TRACE( |
| 734 | + [br0], |
| 735 | + [in_port($p3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp], |
| 736 | + [-generate], |
| 737 | + [$br0,$p1,$p2], |
| 738 | + [br0=$br0 p1=$p1 p2=$p2 p3=$p3]) |
| 739 | + |
| 740 | +# Check for the MAC learning entry. |
| 741 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 742 | + port VLAN MAC Age |
| 743 | + $p3 0 50:54:00:00:00:05 ? |
| 744 | +]) |
| 745 | + |
| 746 | +# Trace a packet arrival destined for the learned MAC. |
| 747 | +# (This will also learn a MAC.) |
| 748 | +OFPROTO_TRACE( |
| 749 | + [br0], |
| 750 | + [in_port($p1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp], |
| 751 | + [-generate], |
| 752 | + [$p3], |
| 753 | + [br0=$br0 p1=$p1 p2=$p2 p3=$p3]) |
| 754 | + |
| 755 | +# Check for both MAC learning entries. |
| 756 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 757 | + port VLAN MAC Age |
| 758 | + $p3 0 50:54:00:00:00:05 ? |
| 759 | + $p1 0 50:54:00:00:00:06 ? |
| 760 | +]) |
| 761 | + |
| 762 | +# Trace a packet arrival that updates the first learned MAC entry. |
| 763 | +OFPROTO_TRACE( |
| 764 | + [br0], |
| 765 | + [in_port($p2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp], |
| 766 | + [-generate], |
| 767 | + [$br0,$p1,$p3], |
| 768 | + [br0=$br0 p1=$p1 p2=$p2 p3=$p3]) |
| 769 | + |
| 770 | +# Check that the MAC learning entry was updated. |
| 771 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 772 | + port VLAN MAC Age |
| 773 | + $p1 0 50:54:00:00:00:06 ? |
| 774 | + $p2 0 50:54:00:00:00:05 ? |
| 775 | +]) |
| 776 | + |
| 777 | +# Add another bridge. |
| 778 | +AT_CHECK( |
| 779 | + [ovs-vsctl \ |
| 780 | + -- add-br br1 \ |
| 781 | + -- set bridge br1 datapath-type=dummy \ |
| 782 | + -- add-port br1 p4 -- set interface p4 type=dummy \ |
| 783 | + -- add-port br1 p5 -- set interface p5 type=dummy]) |
| 784 | +AT_CHECK( |
| 785 | + [ovs-vsctl \ |
| 786 | + -- get Interface p4 ofport \ |
| 787 | + -- get Interface p5 ofport], |
| 788 | + [0], [stdout]) |
| 789 | +set `cat stdout` |
| 790 | +br1=0 p4=$1 p5=$2 |
| 791 | + |
| 792 | +# Trace some packet arrivals in br1 to create MAC learning entries there too. |
| 793 | +OFPROTO_TRACE( |
| 794 | + [br1], |
| 795 | + [in_port($p4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp], |
| 796 | + [-generate], |
| 797 | + [$br1,$p5], |
| 798 | + [br1=$br1 p4=$p4 p5=$p5]) |
| 799 | +OFPROTO_TRACE( |
| 800 | + [br1], |
| 801 | + [in_port($p5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp], |
| 802 | + [-generate], |
| 803 | + [$br1,$p4], |
| 804 | + [br1=$br1 p4=$p4 p5=$p5]) |
| 805 | + |
| 806 | +# Check that the MAC learning entries were added. |
| 807 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 808 | + port VLAN MAC Age |
| 809 | + $p4 0 50:54:00:00:00:06 ? |
| 810 | + $p5 0 50:54:00:00:00:07 ? |
| 811 | +]) |
| 812 | + |
| 813 | +# Delete port p1 and see that its MAC learning entry disappeared, and |
| 814 | +# that the MAC learning entry for the same MAC was also deleted from br1. |
| 815 | +AT_CHECK([ovs-vsctl del-port p1]) |
| 816 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 817 | + port VLAN MAC Age |
| 818 | + $p2 0 50:54:00:00:00:05 ? |
| 819 | +]) |
| 820 | +AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]$/?/'], [0], [dnl |
| 821 | + port VLAN MAC Age |
| 822 | + $p5 0 50:54:00:00:00:07 ? |
| 823 | +]) |
| 824 | + |
| 825 | +OVS_VSWITCHD_STOP |
| 826 | +AT_CLEANUP |
| 827 | |
| 828 | === modified file 'debian/changelog' |
| 829 | --- debian/changelog 2012-07-16 11:06:23 +0000 |
| 830 | +++ debian/changelog 2012-07-26 19:09:22 +0000 |
| 831 | @@ -1,3 +1,9 @@ |
| 832 | +openvswitch (1.4.0-1ubuntu1.2) precise; urgency=low |
| 833 | + |
| 834 | + * debian/patches/fix_ftbfs_big_endian.patch: Fix FTBFS on PPC. |
| 835 | + |
| 836 | + -- Adam Gandelman <adamg@canonical.com> Thu, 26 Jul 2012 11:23:06 -0700 |
| 837 | + |
| 838 | openvswitch (1.4.0-1ubuntu1.1) precise-proposed; urgency=low |
| 839 | |
| 840 | * debian/patches/update_odputil_key_bytes.patch: Update odp-util flow |
| 841 | |
| 842 | === added file 'debian/patches/fix_ftbfs_big_endian.patch' |
| 843 | --- debian/patches/fix_ftbfs_big_endian.patch 1970-01-01 00:00:00 +0000 |
| 844 | +++ debian/patches/fix_ftbfs_big_endian.patch 2012-07-26 19:09:22 +0000 |
| 845 | @@ -0,0 +1,128 @@ |
| 846 | +From f79982ba930364f2d3935196dc13b422ba711ef2 Mon Sep 17 00:00:00 2001 |
| 847 | +From: Ben Pfaff <blp@nicira.com> |
| 848 | +Date: Thu, 26 Apr 2012 10:57:14 -0700 |
| 849 | +Subject: [PATCH] tests: Fix mirroring tests on big-endian architectures. |
| 850 | + |
| 851 | +These tests had a hidden dependency on the hash function in use, |
| 852 | +which yields different results on big-endian and little-endian |
| 853 | +architectures. This commit fixes the problem by properly |
| 854 | +parameterizing the parts that can differ. |
| 855 | + |
| 856 | +Signed-off-by: Ben Pfaff <blp@nicira.com> |
| 857 | +--- |
| 858 | + tests/ofproto-dpif.at | 60 +++++++++++++++++++++++++++++------------------- |
| 859 | + 1 files changed, 36 insertions(+), 24 deletions(-) |
| 860 | + |
| 861 | +Index: openvswitch/tests/ofproto-dpif.at |
| 862 | +=================================================================== |
| 863 | +--- openvswitch.orig/tests/ofproto-dpif.at 2012-07-26 10:55:16.435782799 -0700 |
| 864 | ++++ openvswitch/tests/ofproto-dpif.at 2012-07-26 10:55:18.051782728 -0700 |
| 865 | +@@ -401,10 +401,12 @@ |
| 866 | + set `cat stdout` |
| 867 | + p1=$1 p2=$2 p3=$3 |
| 868 | + |
| 869 | +-AT_DATA([flows.txt], [dnl |
| 870 | +-in_port=1 actions=output:2 |
| 871 | +-in_port=2 actions=output:1 |
| 872 | +-]) |
| 873 | ++cat > flows.txt <<EOF |
| 874 | ++in_port=$p1 actions=output:$p2 |
| 875 | ++in_port=$p2 actions=output:$p1 |
| 876 | ++EOF |
| 877 | ++AT |
| 878 | ++AT_CAPTURE_FILE([flows.txt]) |
| 879 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 880 | + |
| 881 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 882 | +@@ -446,10 +448,12 @@ |
| 883 | + set `cat stdout` |
| 884 | + p1=$1 p2=$2 p3=$3 |
| 885 | + |
| 886 | +-AT_DATA([flows.txt], [dnl |
| 887 | +-in_port=1 actions=output:2 |
| 888 | +-in_port=2 actions=output:1 |
| 889 | +-]) |
| 890 | ++cat > flows.txt <<EOF |
| 891 | ++in_port=$p1 actions=output:$p2 |
| 892 | ++in_port=$p2 actions=output:$p1 |
| 893 | ++EOF |
| 894 | ++AT |
| 895 | ++AT_CAPTURE_FILE([flows.txt]) |
| 896 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 897 | + |
| 898 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 899 | +@@ -487,7 +491,7 @@ |
| 900 | + set `cat stdout` |
| 901 | + p1=$1 p2=$2 |
| 902 | + |
| 903 | +-AT_CHECK([ovs-ofctl add-flow br0 action=output:1]) |
| 904 | ++AT_CHECK([ovs-ofctl add-flow br0 action=output:$p1]) |
| 905 | + |
| 906 | + # "in_port" defaults to OFPP_NONE if it's not specified. |
| 907 | + flow="eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 908 | +@@ -523,10 +527,12 @@ |
| 909 | + set `cat stdout` |
| 910 | + p1=$1 p2=$2 p3=$3 |
| 911 | + |
| 912 | +-AT_DATA([flows.txt], [dnl |
| 913 | +-in_port=1 actions=output:2 |
| 914 | +-in_port=2 actions=output:1 |
| 915 | +-]) |
| 916 | ++cat > flows.txt <<EOF |
| 917 | ++in_port=$p1 actions=output:$p2 |
| 918 | ++in_port=$p2 actions=output:$p1 |
| 919 | ++EOF |
| 920 | ++AT |
| 921 | ++AT_CAPTURE_FILE([flows.txt]) |
| 922 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 923 | + |
| 924 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 925 | +@@ -568,9 +574,11 @@ |
| 926 | + set `cat stdout` |
| 927 | + p1=$1 p2=$2 p3=$3 |
| 928 | + |
| 929 | +-AT_DATA([flows.txt], [dnl |
| 930 | +-in_port=1, actions=output:2 |
| 931 | +-]) |
| 932 | ++cat > flows.txt <<EOF |
| 933 | ++in_port=$p1 actions=output:$p2 |
| 934 | ++EOF |
| 935 | ++AT |
| 936 | ++AT_CAPTURE_FILE([flows.txt]) |
| 937 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 938 | + |
| 939 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 940 | +@@ -618,10 +626,12 @@ |
| 941 | + set `cat stdout` |
| 942 | + p1=$1 p2=$2 p3=$3 |
| 943 | + |
| 944 | +-AT_DATA([flows.txt], [dnl |
| 945 | +-in_port=1 actions=mod_vlan_vid:17,output:2 |
| 946 | +-in_port=2 actions=output:1 |
| 947 | +-]) |
| 948 | ++cat > flows.txt <<EOF |
| 949 | ++in_port=$p1 actions=mod_vlan_vid:17,output:$p2 |
| 950 | ++in_port=$p2 actions=output:$p1 |
| 951 | ++EOF |
| 952 | ++AT |
| 953 | ++AT_CAPTURE_FILE([flows.txt]) |
| 954 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 955 | + |
| 956 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 957 | +@@ -660,10 +670,12 @@ |
| 958 | + set `cat stdout` |
| 959 | + br0=0 p1=$1 p2=$2 |
| 960 | + |
| 961 | +-AT_DATA([flows.txt], [dnl |
| 962 | +-in_port=1 actions=output:2 |
| 963 | +-in_port=2 actions=mod_vlan_vid:17,output:1 |
| 964 | +-]) |
| 965 | ++cat > flows.txt <<EOF |
| 966 | ++in_port=$p1 actions=output:$p2 |
| 967 | ++in_port=$p2 actions=mod_vlan_vid:17,output:$p1 |
| 968 | ++EOF |
| 969 | ++AT |
| 970 | ++AT_CAPTURE_FILE([flows.txt]) |
| 971 | + AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 972 | + |
| 973 | + flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 974 | |
| 975 | === modified file 'debian/patches/series' |
| 976 | --- debian/patches/series 2012-07-16 11:06:23 +0000 |
| 977 | +++ debian/patches/series 2012-07-26 19:09:22 +0000 |
| 978 | @@ -1,1 +1,2 @@ |
| 979 | update_odputil_key_bytes.patch |
| 980 | +fix_ftbfs_big_endian.patch |
| 981 | |
| 982 | === modified file 'tests/ofproto-dpif.at' |
| 983 | --- tests/ofproto-dpif.at 2012-01-30 23:36:00 +0000 |
| 984 | +++ tests/ofproto-dpif.at 2012-07-26 19:09:22 +0000 |
| 985 | @@ -401,10 +401,12 @@ |
| 986 | set `cat stdout` |
| 987 | p1=$1 p2=$2 p3=$3 |
| 988 | |
| 989 | -AT_DATA([flows.txt], [dnl |
| 990 | -in_port=1 actions=output:2 |
| 991 | -in_port=2 actions=output:1 |
| 992 | -]) |
| 993 | +cat > flows.txt <<EOF |
| 994 | +in_port=$p1 actions=output:$p2 |
| 995 | +in_port=$p2 actions=output:$p1 |
| 996 | +EOF |
| 997 | +AT |
| 998 | +AT_CAPTURE_FILE([flows.txt]) |
| 999 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1000 | |
| 1001 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1002 | @@ -446,10 +448,12 @@ |
| 1003 | set `cat stdout` |
| 1004 | p1=$1 p2=$2 p3=$3 |
| 1005 | |
| 1006 | -AT_DATA([flows.txt], [dnl |
| 1007 | -in_port=1 actions=output:2 |
| 1008 | -in_port=2 actions=output:1 |
| 1009 | -]) |
| 1010 | +cat > flows.txt <<EOF |
| 1011 | +in_port=$p1 actions=output:$p2 |
| 1012 | +in_port=$p2 actions=output:$p1 |
| 1013 | +EOF |
| 1014 | +AT |
| 1015 | +AT_CAPTURE_FILE([flows.txt]) |
| 1016 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1017 | |
| 1018 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1019 | @@ -487,7 +491,7 @@ |
| 1020 | set `cat stdout` |
| 1021 | p1=$1 p2=$2 |
| 1022 | |
| 1023 | -AT_CHECK([ovs-ofctl add-flow br0 action=output:1]) |
| 1024 | +AT_CHECK([ovs-ofctl add-flow br0 action=output:$p1]) |
| 1025 | |
| 1026 | # "in_port" defaults to OFPP_NONE if it's not specified. |
| 1027 | flow="eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1028 | @@ -523,10 +527,12 @@ |
| 1029 | set `cat stdout` |
| 1030 | p1=$1 p2=$2 p3=$3 |
| 1031 | |
| 1032 | -AT_DATA([flows.txt], [dnl |
| 1033 | -in_port=1 actions=output:2 |
| 1034 | -in_port=2 actions=output:1 |
| 1035 | -]) |
| 1036 | +cat > flows.txt <<EOF |
| 1037 | +in_port=$p1 actions=output:$p2 |
| 1038 | +in_port=$p2 actions=output:$p1 |
| 1039 | +EOF |
| 1040 | +AT |
| 1041 | +AT_CAPTURE_FILE([flows.txt]) |
| 1042 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1043 | |
| 1044 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1045 | @@ -568,9 +574,11 @@ |
| 1046 | set `cat stdout` |
| 1047 | p1=$1 p2=$2 p3=$3 |
| 1048 | |
| 1049 | -AT_DATA([flows.txt], [dnl |
| 1050 | -in_port=1, actions=output:2 |
| 1051 | -]) |
| 1052 | +cat > flows.txt <<EOF |
| 1053 | +in_port=$p1 actions=output:$p2 |
| 1054 | +EOF |
| 1055 | +AT |
| 1056 | +AT_CAPTURE_FILE([flows.txt]) |
| 1057 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1058 | |
| 1059 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1060 | @@ -618,10 +626,12 @@ |
| 1061 | set `cat stdout` |
| 1062 | p1=$1 p2=$2 p3=$3 |
| 1063 | |
| 1064 | -AT_DATA([flows.txt], [dnl |
| 1065 | -in_port=1 actions=mod_vlan_vid:17,output:2 |
| 1066 | -in_port=2 actions=output:1 |
| 1067 | -]) |
| 1068 | +cat > flows.txt <<EOF |
| 1069 | +in_port=$p1 actions=mod_vlan_vid:17,output:$p2 |
| 1070 | +in_port=$p2 actions=output:$p1 |
| 1071 | +EOF |
| 1072 | +AT |
| 1073 | +AT_CAPTURE_FILE([flows.txt]) |
| 1074 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1075 | |
| 1076 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |
| 1077 | @@ -660,10 +670,12 @@ |
| 1078 | set `cat stdout` |
| 1079 | br0=0 p1=$1 p2=$2 |
| 1080 | |
| 1081 | -AT_DATA([flows.txt], [dnl |
| 1082 | -in_port=1 actions=output:2 |
| 1083 | -in_port=2 actions=mod_vlan_vid:17,output:1 |
| 1084 | -]) |
| 1085 | +cat > flows.txt <<EOF |
| 1086 | +in_port=$p1 actions=output:$p2 |
| 1087 | +in_port=$p2 actions=mod_vlan_vid:17,output:$p1 |
| 1088 | +EOF |
| 1089 | +AT |
| 1090 | +AT_CAPTURE_FILE([flows.txt]) |
| 1091 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) |
| 1092 | |
| 1093 | flow="in_port($p1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)" |

