Message ID | 20230828121622.2275756-1-i.maximets@ovn.org |
---|---|
State | Accepted |
Commit | d3bdc7c913050b79a1c88f01d7f9e774033cf5fa |
Headers | show |
Series | [ovs-dev] tests: Fix time dependency in overlapping flows modification test. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
man. 28. aug. 2023, 14:16 skrev Ilya Maximets <i.maximets@ovn.org>: > On slow systems or at high testsuite concurrency sending 256 packets > can take more than 10 seconds. This is causing expiration of one of > the flows and a subsequent test failure. > > Use time warping instead to avoid the time dependency. > > Fixes: 21410ff800cc ("dpif-netdev: Fix dpif_netdev_flow_put.") > Reported-at: > https://mail.openvswitch.org/pipermail/ovs-discuss/2023-August/052623.html > Reported-by: Sangeetha Elumalai <sangeethaeng2017@gmail.com> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> > --- > tests/pmd.at | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Debian also saw this failure in their riscv64 build [0] and the build passes with this patch [1]. Reviewed-By: Frode Nordahl <frode.nordahl@canonical.com> 0: https://buildd.debian.org/status/fetch.php?pkg=openvswitch&arch=riscv64&ver=3.2.0-1&stamp=1693068090&raw=0 1: https://buildd.debian.org/status/fetch.php?pkg=openvswitch&arch=riscv64&ver=3.2.0-2&stamp=1693251046&raw=0 -- Frode Nordahl diff --git a/tests/pmd.at b/tests/pmd.at > index 7c333a901..7bdaca9e7 100644 > --- a/tests/pmd.at > +++ b/tests/pmd.at > @@ -1355,18 +1355,22 @@ AT_CHECK([echo 'table=0,in_port=p1,ip,nw_dst= > 10.1.0.0/16 actions=ct(commit)' | d > ovs-ofctl --bundle replace-flows br0 -]) > AT_CHECK([ovs-appctl revalidator/wait]) > > +dnl Prevent flows from expiring. > +AT_CHECK([ovs-appctl time/stop]) > + > AT_CHECK([ovs-appctl netdev-dummy/receive p1 > 'ipv4(src=10.0.0.1,dst=10.1.0.2,proto=6),tcp(src=1,dst=2)']) > OVS_WAIT_UNTIL_EQUAL([ovs-appctl dpctl/dump-flows | sed 's/.*core: > [[0-9]]*//' | strip_xout_keep_actions], [ > recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst= > 10.1.0.2/255.255.0.0,frag=no), packets:0, bytes:0, used:never, > actions:ct(commit) > recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst= > 10.1.2.2/255.255.255.0,frag=no), packets:0, bytes:0, used:0.0s, > actions:ct(commit)]) > > -dnl Hold the prefix 10.1.2.2/24 by another 10s. > -AT_CHECK([ovs-appctl netdev-dummy/receive p1 > 'ipv4(src=10.0.0.1,dst=10.1.2.2,proto=6),tcp(src=1,dst=2)']) > dnl Send more 10.1.0.2 to make 10.1.0.0/16 tuple prepend 10.1.2.0/24 > tuple in the pvector of subtables. > for i in $(seq 0 256); do > AT_CHECK([ovs-appctl netdev-dummy/receive p1 > 'ipv4(src=10.0.0.1,dst=10.1.0.2,proto=6),tcp(src=1,dst=2)']) > done > > +dnl Warp time enough to trigger subtable optimization. > +AT_CHECK([ovs-appctl time/warp 500 2000], [0], [ignore]) > + > AT_CHECK([echo 'table=0,in_port=p1,ip,nw_dst=10.1.0.0/16 actions=p2' | > dnl > ovs-ofctl --bundle replace-flows br0 -]) > > -- > 2.40.1 > >
On 8/28/23 21:44, Frode Nordahl wrote: > > > man. 28. aug. 2023, 14:16 skrev Ilya Maximets <i.maximets@ovn.org <mailto:i.maximets@ovn.org>>: > > On slow systems or at high testsuite concurrency sending 256 packets > can take more than 10 seconds. This is causing expiration of one of > the flows and a subsequent test failure. > > Use time warping instead to avoid the time dependency. > > Fixes: 21410ff800cc ("dpif-netdev: Fix dpif_netdev_flow_put.") > Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2023-August/052623.html <https://mail.openvswitch.org/pipermail/ovs-discuss/2023-August/052623.html> > Reported-by: Sangeetha Elumalai <sangeethaeng2017@gmail.com <mailto:sangeethaeng2017@gmail.com>> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org <mailto:i.maximets@ovn.org>> > --- > tests/pmd.at <http://pmd.at> | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > > Debian also saw this failure in their riscv64 build [0] and the build passes with this patch [1]. > > Reviewed-By: Frode Nordahl <frode.nordahl@canonical.com <mailto:frode.nordahl@canonical.com>> Thanks! Applied and backported down to 2.17. Best regards, Ilya Maximets.
diff --git a/tests/pmd.at b/tests/pmd.at index 7c333a901..7bdaca9e7 100644 --- a/tests/pmd.at +++ b/tests/pmd.at @@ -1355,18 +1355,22 @@ AT_CHECK([echo 'table=0,in_port=p1,ip,nw_dst=10.1.0.0/16 actions=ct(commit)' | d ovs-ofctl --bundle replace-flows br0 -]) AT_CHECK([ovs-appctl revalidator/wait]) +dnl Prevent flows from expiring. +AT_CHECK([ovs-appctl time/stop]) + AT_CHECK([ovs-appctl netdev-dummy/receive p1 'ipv4(src=10.0.0.1,dst=10.1.0.2,proto=6),tcp(src=1,dst=2)']) OVS_WAIT_UNTIL_EQUAL([ovs-appctl dpctl/dump-flows | sed 's/.*core: [[0-9]]*//' | strip_xout_keep_actions], [ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=10.1.0.2/255.255.0.0,frag=no), packets:0, bytes:0, used:never, actions:ct(commit) recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=10.1.2.2/255.255.255.0,frag=no), packets:0, bytes:0, used:0.0s, actions:ct(commit)]) -dnl Hold the prefix 10.1.2.2/24 by another 10s. -AT_CHECK([ovs-appctl netdev-dummy/receive p1 'ipv4(src=10.0.0.1,dst=10.1.2.2,proto=6),tcp(src=1,dst=2)']) dnl Send more 10.1.0.2 to make 10.1.0.0/16 tuple prepend 10.1.2.0/24 tuple in the pvector of subtables. for i in $(seq 0 256); do AT_CHECK([ovs-appctl netdev-dummy/receive p1 'ipv4(src=10.0.0.1,dst=10.1.0.2,proto=6),tcp(src=1,dst=2)']) done +dnl Warp time enough to trigger subtable optimization. +AT_CHECK([ovs-appctl time/warp 500 2000], [0], [ignore]) + AT_CHECK([echo 'table=0,in_port=p1,ip,nw_dst=10.1.0.0/16 actions=p2' | dnl ovs-ofctl --bundle replace-flows br0 -])
On slow systems or at high testsuite concurrency sending 256 packets can take more than 10 seconds. This is causing expiration of one of the flows and a subsequent test failure. Use time warping instead to avoid the time dependency. Fixes: 21410ff800cc ("dpif-netdev: Fix dpif_netdev_flow_put.") Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2023-August/052623.html Reported-by: Sangeetha Elumalai <sangeethaeng2017@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- tests/pmd.at | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)