Simon, I thought this test exposed a bug that is fixed with this patch series. However, when I apply this patch alone against current master, it passed fine. (I tried many times). So I must misunderstand the intention of the test, or why current master failed to address packet out. Would you please shed some light on this?
On Tue, Apr 22, 2014 at 1:54 AM, Simon Horman <ho...@verge.net.au> wrote: > This tests exercises execution of actions in ovs-vswitchd > in the case where a packet is processed due to a packet out message > with an in_port that doesn't exist in the datapath and translation > results in recirc actions due to bonding. > > Signed-off-by: Simon Horman <ho...@verge.net.au> > --- > tests/ofproto-dpif.at | 80 > +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 80 insertions(+) > > diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at > index a6bfa1a..72f1a24 100644 > --- a/tests/ofproto-dpif.at > +++ b/tests/ofproto-dpif.at > @@ -197,6 +197,86 @@ AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt > 7]) > OVS_VSWITCHD_STOP() > AT_CLEANUP > > +AT_SETUP([ofproto-dpif, balance-tcp bonding, packet-out]) > +# Create br0 with interfaces bond0(p1, p2, p3) and bond1(p4,p5,p6), > +# br1 with interfaces bond10(p11, p12, p13) and bond11(p14,p15,p16) > and > +# br2 with interfaces bond20(p21, p22, p23) and bond21(p24,p25,p26) > +# bond0 <-> bond10 > +# bond1 <-> bond20 > +# Send some traffic, make sure the traffic are spread based on L4 headers. > +OVS_VSWITCHD_START( > + [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \ > + other-config:lacp-time=fast other-config:bond-rebalance-interval=0 > --\ > + set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock > ofport_request=1 -- \ > + set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock > ofport_request=2 -- \ > + set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock > ofport_request=3 -- \ > + add-bond br0 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \ > + other-config:lacp-time=fast other-config:bond-rebalance-interval=0 > --\ > + set interface p4 type=dummy options:pstream=punix:$OVS_RUNDIR/p4.sock > ofport_request=4 -- \ > + set interface p5 type=dummy options:pstream=punix:$OVS_RUNDIR/p5.sock > ofport_request=5 -- \ > + set interface p6 type=dummy options:pstream=punix:$OVS_RUNDIR/p6.sock > ofport_request=6 -- \ > + add-br br1 -- \ > + set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \ > + set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \ > + fail-mode=secure -- \ > + add-bond br1 bond10 p11 p12 p13 bond_mode=balance-tcp lacp=active \ > + other-config:lacp-time=fast other-config:bond-rebalance-interval=0 > --\ > + set interface p11 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock > ofport_request=1 -- \ > + set interface p12 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock > ofport_request=3 -- \ > + set interface p13 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock > ofport_request=2 -- \ > + add-bond br1 bond11 p14 p15 p16 bond_mode=balance-tcp lacp=active \ > + other-config:lacp-time=fast other-config:bond-rebalance-interval=0 > --\ > + set interface p14 type=dummy options:stream=unix:$OVS_RUNDIR/p7.sock > ofport_request=4 -- \ > + set interface p15 type=dummy options:stream=unix:$OVS_RUNDIR/p8.sock > ofport_request=5 -- \ > + set interface p16 type=dummy options:stream=unix:$OVS_RUNDIR/p9.sock > ofport_request=6 -- \ > + add-br br2 -- \ > + set bridge br2 other-config:hwaddr=aa:66:aa:66:00:02 -- \ > + set bridge br2 datapath-type=dummy other-config:datapath-id=1235 \ > + fail-mode=secure -- \ > + add-bond br2 bond20 p21 p22 p23 bond_mode=balance-tcp lacp=active \ > + other-config:lacp-time=fast other-config:bond-rebalance-interval=0 > --\ > + set interface p21 type=dummy options:stream=unix:$OVS_RUNDIR/p4.sock > ofport_request=1 -- \ > + set interface p22 type=dummy options:stream=unix:$OVS_RUNDIR/p5.sock > ofport_request=2 -- \ > + set interface p23 type=dummy options:stream=unix:$OVS_RUNDIR/p6.sock > ofport_request=3 -- ]) > +AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK > +]) > +AT_CHECK([ovs-ofctl add-flow br1 action=normal]) > +AT_CHECK([ovs-ofctl add-flow br2 action=normal]) > +AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled > +], []) > +sleep 1; > +ovs-appctl time/stop > +ovs-appctl time/warp 100 > +ovs-appctl lacp/show > lacp.txt > +ovs-appctl bond/show > bond.txt > + > +dnl The input is a TCP/IP frame which tcpdump -vve shows as: > +dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype IPv4 (0x0800), length > 58: (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) > +dnl 192.168.0.1.80 > 192.168.0.2.$port: Flags [none], cksum 0x7744 > (correct), seq 42:46, win 10000, length 4 > +( > +for i in `seq 0 255` ; > + do > + port=$(printf "%02x" $i) > + ovs-ofctl -O OpenFlow13 packet-out br0 NONE normal "50 54 00 00 00 07 60 > 66 66 66 00 01 08 00 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 > 02 00 50 00 $port 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45" > +done > +) > + > +ovs-appctl time/warp 100 > +ovs-appctl time/warp 100 > +ovs-appctl time/warp 100 > +AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt]) > +AT_CHECK([ovs-appctl dpif/dump-flows br2 |grep tcp > br2_flows.txt]) > +# Make sure there is resonable distribution to all three ports. > +# We don't want to make this check precise, in case hash function changes. > +AT_CHECK([test `grep in_port.11 br1_flows.txt |wc -l` -gt 7]) > +AT_CHECK([test `grep in_port.12 br1_flows.txt |wc -l` -gt 7]) > +AT_CHECK([test `grep in_port.13 br1_flows.txt |wc -l` -gt 7]) > +AT_CHECK([test `grep in_port.21 br2_flows.txt |wc -l` -gt 7]) > +AT_CHECK([test `grep in_port.22 br2_flows.txt |wc -l` -gt 7]) > +AT_CHECK([test `grep in_port.23 br2_flows.txt |wc -l` -gt 7]) > +OVS_VSWITCHD_STOP() > +AT_CLEANUP > + > AT_SETUP([ofproto-dpif - resubmit]) > OVS_VSWITCHD_START > ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15], > -- > 1.8.5.2 > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev