]>
Commit | Line | Data |
---|---|---|
df2c07f4 | 1 | AT_SETUP([OVS datapath parsing and formatting - valid forms]) |
3bffc610 BP |
2 | AT_DATA([odp-base.txt], [dnl |
3 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15) | |
4 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x1234) | |
7257b535 BP |
5 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=128,frag=no) |
6 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=128,frag=first) | |
7 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=5,tos=128,frag=later) | |
8 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=6,tos=0,frag=no),tcp(src=80,dst=8080) | |
9 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=17,tos=0,frag=no),udp(src=81,dst=6632) | |
10 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0800),ipv4(src=35.8.2.41,dst=172.16.0.20,proto=1,tos=0,frag=no),icmp(type=1,code=2) | |
11 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=10,tos=112,frag=no) | |
12 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=10,tos=112,frag=first) | |
13 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=10,tos=112,frag=later) | |
14 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=6,tos=0,frag=no),tcp(src=80,dst=8080) | |
15 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=17,tos=0,frag=no),udp(src=6630,dst=22) | |
16 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=58,tos=0,frag=no),icmpv6(type=1,code=2) | |
17 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=58,tos=0,frag=no),icmpv6(type=135,code=0),nd(target=::3) | |
18 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=58,tos=0,frag=no),icmpv6(type=135,code=0),nd(target=::3,sll=00:05:06:07:08:09) | |
19 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=58,tos=0,frag=no),icmpv6(type=136,code=0),nd(target=::3,tll=00:0a:0b:0c:0d:0e) | |
20 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x86dd),ipv6(src=::1,dst=::2,proto=58,tos=0,frag=no),icmpv6(type=136,code=0),nd(target=::3,sll=00:05:06:07:08:09,tll=00:0a:0b:0c:0d:0e) | |
3bffc610 BP |
21 | in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18) |
22 | ]) | |
23 | ||
24 | (echo '# Valid forms without tun_id or VLAN header.' | |
25 | cat odp-base.txt | |
26 | ||
27 | echo | |
28 | echo '# Valid forms with tun_id header.' | |
29 | sed 's/^/tun_id(0x7f10354),/' odp-base.txt | |
30 | ||
31 | echo | |
32 | echo '# Valid forms with VLAN header.' | |
33 | sed 's/eth([[^)]]*)/&,vlan(vid=99,pcp=7)/' odp-base.txt | |
34 | ||
35 | echo | |
36 | echo '# Valid forms with tun_id and VLAN headers.' | |
37 | sed 's/^/tun_id(0xfedcba9876543210),/ | |
7257b535 BP |
38 | s/eth([[^)]]*)/&,vlan(vid=99,pcp=7)/' odp-base.txt |
39 | ||
40 | echo | |
41 | echo '# Valid forms with IP first fragment.' | |
42 | sed -n 's/,frag=no),/,frag=first),/p' odp-base.txt | |
43 | ||
44 | echo | |
45 | echo '# Valid forms with IP later fragment.' | |
46 | sed -n 's/,frag=no),.*/,frag=later)/p' odp-base.txt) > odp.txt | |
3bffc610 BP |
47 | AT_CAPTURE_FILE([odp.txt]) |
48 | AT_CHECK_UNQUOTED([test-odp < odp.txt], [0], [`cat odp.txt` | |
49 | ]) | |
50 | AT_CLEANUP | |
51 | ||
52 | dnl We could add a test for invalid forms, but that's less important. |