Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On 1/31/23 10:42, Eelco Chaudron wrote: > > > On 26 Jan 2023, at 22:47, Ilya Maximets wrote: > >> On 1/24/23 14:01, Eelco Chaudron wrote: >>> With some datapaths, read TC, it takes a bit longer to update the >>> OpenFlow statistics. Rather than adding an additional delay, try >>> to read the counters multiple times until we get the desired value. >>> >>> Signed-off-by: Eelco Chaudron >>> Acked-by: Roi Dayan >>> --- >>> tests/system-offloads.at |2 -- >>> tests/system-traffic.at | 15 ++- >>> 2 files changed, 6 insertions(+), 11 deletions(-) >>> >>> diff --git a/tests/system-offloads.at b/tests/system-offloads.at >>> index f4adac7b3..18e542aea 100644 >>> --- a/tests/system-offloads.at >>> +++ b/tests/system-offloads.at >>> @@ -60,8 +60,6 @@ m4_define([CHECK_CONNTRACK_TIMEOUT], >>> # issue. >>> m4_define([OVS_TEST_SKIP_LIST], >>> [ovs_test_skip_list=" >>> -datapath - truncate and output to gre tunnel by simulated packets >>> -datapath - truncate and output to gre tunnel >>> conntrack - multiple namespaces, internal ports >>> conntrack - ct metadata, multiple zones >>> conntrack - ICMP related >>> diff --git a/tests/system-traffic.at b/tests/system-traffic.at >>> index d162674c9..60cda6a4a 100644 >>> --- a/tests/system-traffic.at >>> +++ b/tests/system-traffic.at >>> @@ -1708,9 +1708,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >>> | sed -n 's/.*\(n\_bytes=[ >>> n_bytes=242 >>> ]) >>> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >>> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >>> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >>> -n_bytes=138 >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >>> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >>> >>> dnl check tunnel pop path, from at_ns0 to at_ns1 >>> dnl This 200-byte packet is simulated on behalf of ns_gre0 >>> @@ -1745,9 +1744,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >>> | sed -n 's/.*\(n\_bytes=[ >>> n_bytes=242 >>> ]) >>> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >>> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >>> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >>> -n_bytes=138 >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >>> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >>> >>> dnl check tunnel pop path, from at_ns0 to at_ns1 >>> dnl This 200-byte packet is simulated on behalf of ns_gre0 >>> @@ -1755,9 +1753,8 @@ ovs-ofctl -O OpenFlow13 packet-out br-underlay >>> "in_port=1 packet=02908ca8a149faa >>> >>> dnl After truncation = 100 byte at loopback device p2(4) >>> OVS_REVALIDATOR_PURGE() >>> -AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], >>> [dnl >>> - n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip >>> | grep "n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop"], >>> + [ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip]) >> >> OVS_WAIT_UNTIL_EQUAL() might be better suited for this. >> It will print out the diff if the result it not equal. > > Move all three instances to OVS_WAIT_UNTIL_EQUAL() > > Any idea when > https://patchwork.ozlabs.org/project/openvswitch/patch/167361458369.1145547.15786262052264455216.stgit@ebuild/ > will be applied, as it makes this test fail sometimes? I posted some comments for this one. It also needs a slight re-base. > > //Eelco > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On 26 Jan 2023, at 22:47, Ilya Maximets wrote: > On 1/24/23 14:01, Eelco Chaudron wrote: >> With some datapaths, read TC, it takes a bit longer to update the >> OpenFlow statistics. Rather than adding an additional delay, try >> to read the counters multiple times until we get the desired value. >> >> Signed-off-by: Eelco Chaudron >> Acked-by: Roi Dayan >> --- >> tests/system-offloads.at |2 -- >> tests/system-traffic.at | 15 ++- >> 2 files changed, 6 insertions(+), 11 deletions(-) >> >> diff --git a/tests/system-offloads.at b/tests/system-offloads.at >> index f4adac7b3..18e542aea 100644 >> --- a/tests/system-offloads.at >> +++ b/tests/system-offloads.at >> @@ -60,8 +60,6 @@ m4_define([CHECK_CONNTRACK_TIMEOUT], >> # issue. >> m4_define([OVS_TEST_SKIP_LIST], >> [ovs_test_skip_list=" >> -datapath - truncate and output to gre tunnel by simulated packets >> -datapath - truncate and output to gre tunnel >> conntrack - multiple namespaces, internal ports >> conntrack - ct metadata, multiple zones >> conntrack - ICMP related >> diff --git a/tests/system-traffic.at b/tests/system-traffic.at >> index d162674c9..60cda6a4a 100644 >> --- a/tests/system-traffic.at >> +++ b/tests/system-traffic.at >> @@ -1708,9 +1708,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >> | sed -n 's/.*\(n\_bytes=[ >> n_bytes=242 >> ]) >> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >> -n_bytes=138 >> -]) >> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >> >> dnl check tunnel pop path, from at_ns0 to at_ns1 >> dnl This 200-byte packet is simulated on behalf of ns_gre0 >> @@ -1745,9 +1744,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >> | sed -n 's/.*\(n\_bytes=[ >> n_bytes=242 >> ]) >> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >> -n_bytes=138 >> -]) >> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >> >> dnl check tunnel pop path, from at_ns0 to at_ns1 >> dnl This 200-byte packet is simulated on behalf of ns_gre0 >> @@ -1755,9 +1753,8 @@ ovs-ofctl -O OpenFlow13 packet-out br-underlay >> "in_port=1 packet=02908ca8a149faa >> >> dnl After truncation = 100 byte at loopback device p2(4) >> OVS_REVALIDATOR_PURGE() >> -AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], >> [dnl >> - n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop >> -]) >> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip | >> grep "n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop"], >> + [ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip]) > > OVS_WAIT_UNTIL_EQUAL() might be better suited for this. > It will print out the diff if the result it not equal. Move all three instances to OVS_WAIT_UNTIL_EQUAL() Any idea when https://patchwork.ozlabs.org/project/openvswitch/patch/167361458369.1145547.15786262052264455216.stgit@ebuild/ will be applied, as it makes this test fail sometimes? //Eelco ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On 1/24/23 14:01, Eelco Chaudron wrote: > With some datapaths, read TC, it takes a bit longer to update the > OpenFlow statistics. Rather than adding an additional delay, try > to read the counters multiple times until we get the desired value. > > Signed-off-by: Eelco Chaudron > Acked-by: Roi Dayan > --- > tests/system-offloads.at |2 -- > tests/system-traffic.at | 15 ++- > 2 files changed, 6 insertions(+), 11 deletions(-) > > diff --git a/tests/system-offloads.at b/tests/system-offloads.at > index f4adac7b3..18e542aea 100644 > --- a/tests/system-offloads.at > +++ b/tests/system-offloads.at > @@ -60,8 +60,6 @@ m4_define([CHECK_CONNTRACK_TIMEOUT], > # issue. > m4_define([OVS_TEST_SKIP_LIST], > [ovs_test_skip_list=" > -datapath - truncate and output to gre tunnel by simulated packets > -datapath - truncate and output to gre tunnel > conntrack - multiple namespaces, internal ports > conntrack - ct metadata, multiple zones > conntrack - ICMP related > diff --git a/tests/system-traffic.at b/tests/system-traffic.at > index d162674c9..60cda6a4a 100644 > --- a/tests/system-traffic.at > +++ b/tests/system-traffic.at > @@ -1708,9 +1708,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | > sed -n 's/.*\(n\_bytes=[ > n_bytes=242 > ]) > dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B > -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n > 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl > -n_bytes=138 > -]) > +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | > sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], > + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | > sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) > > dnl check tunnel pop path, from at_ns0 to at_ns1 > dnl This 200-byte packet is simulated on behalf of ns_gre0 > @@ -1745,9 +1744,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | > sed -n 's/.*\(n\_bytes=[ > n_bytes=242 > ]) > dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B > -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n > 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl > -n_bytes=138 > -]) > +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | > sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], > + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | > sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) > > dnl check tunnel pop path, from at_ns0 to at_ns1 > dnl This 200-byte packet is simulated on behalf of ns_gre0 > @@ -1755,9 +1753,8 @@ ovs-ofctl -O OpenFlow13 packet-out br-underlay > "in_port=1 packet=02908ca8a149faa > > dnl After truncation = 100 byte at loopback device p2(4) > OVS_REVALIDATOR_PURGE() > -AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], > [dnl > - n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop > -]) > +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip | > grep "n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop"], > + [ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip]) OVS_WAIT_UNTIL_EQUAL() might be better suited for this. It will print out the diff if the result it not equal. Best regards, Ilya Maximets. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On Thu, Jan 26, 2023 at 06:21:34PM +0100, Eelco Chaudron wrote: > > > On 26 Jan 2023, at 17:58, Simon Horman wrote: > > > On Tue, Jan 24, 2023 at 02:01:19PM +0100, Eelco Chaudron wrote: > >> With some datapaths, read TC, it takes a bit longer to update the > >> OpenFlow statistics. Rather than adding an additional delay, try > >> to read the counters multiple times until we get the desired value. > >> > >> Signed-off-by: Eelco Chaudron > >> Acked-by: Roi Dayan > > > > When, possibly unwisely, running this test on my laptop, > > with a somewhat old kernel the tests fail with absurd byte counts. > > I haven't had time to dig into why. > > I noticed this happens sometimes, and I excluded this test from the total set > in the last patch :) > > However, I also fixed some counter issues recently which fixed it in my setup: > > https://patchwork.ozlabs.org/project/openvswitch/patch/167361458369.1145547.15786262052264455216.stgit@ebuild/ > > Can you try this? Yes. I made a quick attempt just now and it does change things. n_bytes now seems to be 0 for both cases (closer to but still not 138). Perhaps that is explained by a timing issue. I'll see if I can poke a little more. But likely not today. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On 26 Jan 2023, at 17:58, Simon Horman wrote: > On Tue, Jan 24, 2023 at 02:01:19PM +0100, Eelco Chaudron wrote: >> With some datapaths, read TC, it takes a bit longer to update the >> OpenFlow statistics. Rather than adding an additional delay, try >> to read the counters multiple times until we get the desired value. >> >> Signed-off-by: Eelco Chaudron >> Acked-by: Roi Dayan > > When, possibly unwisely, running this test on my laptop, > with a somewhat old kernel the tests fail with absurd byte counts. > I haven't had time to dig into why. I noticed this happens sometimes, and I excluded this test from the total set in the last patch :) However, I also fixed some counter issues recently which fixed it in my setup: https://patchwork.ozlabs.org/project/openvswitch/patch/167361458369.1145547.15786262052264455216.stgit@ebuild/ Can you try this? //Eelco > $ uname -spv > Linux #1 SMP Debian 5.10.158-2 (2022-12-13) unknown > > The first test appears to fail with n_bytes=18446744073709159596 > And the second, with n_bytes=18446744073703563162 > > Log follows: > > make all-am > make[1]: Map '/home/horms/projects/openvswitch/ovs' wordt binnengegaan > make[1]: Map '/home/horms/projects/openvswitch/ovs' wordt verlaten > set /bin/bash './tests/system-offloads-testsuite' -C tests > AUTOTEST_PATH='utilities:vswitchd:ovsdb:vtep:tests:ipsec::'; \ > "$@" -k "datapath - truncate and output" -v -j1 || (test X'' = Xyes && "$@" > --recheck) > Illegal "police" > ## -- ## > ## openvswitch 3.1.90 test suite. ## > ## -- ## > > datapath-sanity > > 50. system-traffic.at:1639: testing datapath - truncate and output to gre > tunnel by simulated packets ... > ./system-traffic.at:1642: modprobe openvswitch > Module vport_lisp not loaded. > Module vport_stt not loaded. > ./system-traffic.at:1642: ovsdb-tool create conf.db > $abs_top_srcdir/vswitchd/vswitch.ovsschema > ./system-traffic.at:1642: ovsdb-server --detach --no-chdir --pidfile > --log-file --remote=punix:$OVS_RUNDIR/db.sock > stderr: > 2023-01-26T16:43:57Z|1|vlog|INFO|opened log file > /home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/ovsdb-server.log > ./system-traffic.at:1642: sed < stderr ' > /vlog|INFO|opened log file/d > /ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d' > ./system-traffic.at:1642: ovs-vsctl --no-wait init -- set Open_vSwitch . > other_config:hw-offload=true > > ./system-traffic.at:1642: ovs-vswitchd --detach --no-chdir --pidfile > --log-file -vvconn -vofproto_dpif -vunixctl > stderr: > 2023-01-26T16:43:57Z|1|vlog|INFO|opened log file > /home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/ovs-vswitchd.log > 2023-01-26T16:43:57Z|2|ovs_numa|INFO|Discovered 8 CPU cores on NUMA node 0 > 2023-01-26T16:43:57Z|3|ovs_numa|INFO|Discovered 1 NUMA nodes and 8 CPU > cores > 2023-01-26T16:43:57Z|4|reconnect|INFO|unix:/home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/db.sock: > connecting... > 2023-01-26T16:43:57Z|5|reconnect|INFO|unix:/home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/db.sock: > connected > 2023-01-26T16:43:57Z|6|netdev_offload|INFO|netdev: Flow API Enabled > 2023-01-26T16:43:57Z|7|tc|INFO|tc: Using policy 'none' > ./system-traffic.at:1642: sed < stderr ' > /ovs_numa|INFO|Discovered /d > /odp_execute_impl|INFO|Action implementation /d > /vlog|INFO|opened log file/d > /vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d > /reconnect|INFO|/d > /dpif_netlink|INFO|Generic Netlink family .ovs_datapath. does not exist/d > /ofproto|INFO|using datapath ID/d > /netdev_linux|INFO|.*device has unknown hardware address family/d > /ofproto|INFO|datapath ID changed to fedcba9876543210/d > /dpdk|INFO|DPDK Disabled - Use other_config:dpdk-init to enable/d > /netlink_socket|INFO|netlink: could not enable listening to all nsid/d > /netdev_offload|INFO|netdev: Flow API Enabled/d > /probe tc:/d > /setting extended ack support failed/d > /tc: Using policy/d' > ./system-traffic.at:1642: ovs-vsctl -- add-br br0 -- set Bridge br0 > protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14,OpenFlow15 > fail-mode=secure -- > Cannot remove namespace file "/run/netns/at_ns0": No such file or directory > ./system-traffic.at:1645: ip netns add at_ns0 || return 77 > net.netfilter.nf_conntrack_helper = 0 > Cannot remove namespace file "/run/netns/at_ns1": No such file or directory > ./system-traffic.at:1646: ip netns add at_ns1 || return 77 > net.netfilter.nf_conntrack_helper = 0 > ./system-traffic.at:1647: ovs-ofctl add-flow br0 "actions=normal" > ./system-traffic.at:1648: ovs-ofctl add-flow br-underlay "actions=normal" > ./system-traffic.at:1651: ip link add p0 type veth peer name ovs-p0 || return > 77 > ./system-traffic.at:1651: ip link set p0 netns at_ns0 > ./system-traffic.at:1651: ip link set dev ovs-p0 up > ./system-traffic.at:1651: ovs-vsctl add-port br-under
Re: [ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
On Tue, Jan 24, 2023 at 02:01:19PM +0100, Eelco Chaudron wrote: > With some datapaths, read TC, it takes a bit longer to update the > OpenFlow statistics. Rather than adding an additional delay, try > to read the counters multiple times until we get the desired value. > > Signed-off-by: Eelco Chaudron > Acked-by: Roi Dayan When, possibly unwisely, running this test on my laptop, with a somewhat old kernel the tests fail with absurd byte counts. I haven't had time to dig into why. $ uname -spv Linux #1 SMP Debian 5.10.158-2 (2022-12-13) unknown The first test appears to fail with n_bytes=18446744073709159596 And the second, with n_bytes=18446744073703563162 Log follows: make all-am make[1]: Map '/home/horms/projects/openvswitch/ovs' wordt binnengegaan make[1]: Map '/home/horms/projects/openvswitch/ovs' wordt verlaten set /bin/bash './tests/system-offloads-testsuite' -C tests AUTOTEST_PATH='utilities:vswitchd:ovsdb:vtep:tests:ipsec::'; \ "$@" -k "datapath - truncate and output" -v -j1 || (test X'' = Xyes && "$@" --recheck) Illegal "police" ## -- ## ## openvswitch 3.1.90 test suite. ## ## -- ## datapath-sanity 50. system-traffic.at:1639: testing datapath - truncate and output to gre tunnel by simulated packets ... ./system-traffic.at:1642: modprobe openvswitch Module vport_lisp not loaded. Module vport_stt not loaded. ./system-traffic.at:1642: ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema ./system-traffic.at:1642: ovsdb-server --detach --no-chdir --pidfile --log-file --remote=punix:$OVS_RUNDIR/db.sock stderr: 2023-01-26T16:43:57Z|1|vlog|INFO|opened log file /home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/ovsdb-server.log ./system-traffic.at:1642: sed < stderr ' /vlog|INFO|opened log file/d /ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d' ./system-traffic.at:1642: ovs-vsctl --no-wait init -- set Open_vSwitch . other_config:hw-offload=true ./system-traffic.at:1642: ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl stderr: 2023-01-26T16:43:57Z|1|vlog|INFO|opened log file /home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/ovs-vswitchd.log 2023-01-26T16:43:57Z|2|ovs_numa|INFO|Discovered 8 CPU cores on NUMA node 0 2023-01-26T16:43:57Z|3|ovs_numa|INFO|Discovered 1 NUMA nodes and 8 CPU cores 2023-01-26T16:43:57Z|4|reconnect|INFO|unix:/home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/db.sock: connecting... 2023-01-26T16:43:57Z|5|reconnect|INFO|unix:/home/horms/projects/openvswitch/ovs/tests/system-offloads-testsuite.dir/050/db.sock: connected 2023-01-26T16:43:57Z|6|netdev_offload|INFO|netdev: Flow API Enabled 2023-01-26T16:43:57Z|7|tc|INFO|tc: Using policy 'none' ./system-traffic.at:1642: sed < stderr ' /ovs_numa|INFO|Discovered /d /odp_execute_impl|INFO|Action implementation /d /vlog|INFO|opened log file/d /vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d /reconnect|INFO|/d /dpif_netlink|INFO|Generic Netlink family .ovs_datapath. does not exist/d /ofproto|INFO|using datapath ID/d /netdev_linux|INFO|.*device has unknown hardware address family/d /ofproto|INFO|datapath ID changed to fedcba9876543210/d /dpdk|INFO|DPDK Disabled - Use other_config:dpdk-init to enable/d /netlink_socket|INFO|netlink: could not enable listening to all nsid/d /netdev_offload|INFO|netdev: Flow API Enabled/d /probe tc:/d /setting extended ack support failed/d /tc: Using policy/d' ./system-traffic.at:1642: ovs-vsctl -- add-br br0 -- set Bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14,OpenFlow15 fail-mode=secure -- Cannot remove namespace file "/run/netns/at_ns0": No such file or directory ./system-traffic.at:1645: ip netns add at_ns0 || return 77 net.netfilter.nf_conntrack_helper = 0 Cannot remove namespace file "/run/netns/at_ns1": No such file or directory ./system-traffic.at:1646: ip netns add at_ns1 || return 77 net.netfilter.nf_conntrack_helper = 0 ./system-traffic.at:1647: ovs-ofctl add-flow br0 "actions=normal" ./system-traffic.at:1648: ovs-ofctl add-flow br-underlay "actions=normal" ./system-traffic.at:1651: ip link add p0 type veth peer name ovs-p0 || return 77 ./system-traffic.at:1651: ip link set p0 netns at_ns0 ./system-traffic.at:1651: ip link set dev ovs-p0 up ./system-traffic.at:1651: ovs-vsctl add-port br-underlay ovs-p0 -- \ set interface ovs-p0 external-ids:iface-id="p0" ./system-traffic.at:1651: ip netns exec at_ns0 sh << NS_EXEC_HEREDOC ip addr add "172.31.1.1/24" dev p0 NS_EXEC_HEREDOC ./system-traffic.at:1651: ip netns exec at_ns0 sh << NS_EXEC_HEREDOC ip link set dev p0 up NS_EXEC_HEREDOC ./system-traffic.at:1651: ip netns exec at_ns0 sh << NS_EXEC_HEREDOC ip link set dev p0 address fa:ad:fa:25:05:60 NS_EXEC_HEREDOC ./system-traffic.at:1652: ip addr add dev br-underlay "172.31.1.100/24" ./system-traffic.at:1653: ip link set d
[ovs-dev] [PATCH v8 14/15] tests: Fix reading of OpenFlow byte counters in GRE test cases.
With some datapaths, read TC, it takes a bit longer to update the OpenFlow statistics. Rather than adding an additional delay, try to read the counters multiple times until we get the desired value. Signed-off-by: Eelco Chaudron Acked-by: Roi Dayan --- tests/system-offloads.at |2 -- tests/system-traffic.at | 15 ++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/system-offloads.at b/tests/system-offloads.at index f4adac7b3..18e542aea 100644 --- a/tests/system-offloads.at +++ b/tests/system-offloads.at @@ -60,8 +60,6 @@ m4_define([CHECK_CONNTRACK_TIMEOUT], # issue. m4_define([OVS_TEST_SKIP_LIST], [ovs_test_skip_list=" -datapath - truncate and output to gre tunnel by simulated packets -datapath - truncate and output to gre tunnel conntrack - multiple namespaces, internal ports conntrack - ct metadata, multiple zones conntrack - ICMP related diff --git a/tests/system-traffic.at b/tests/system-traffic.at index d162674c9..60cda6a4a 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -1708,9 +1708,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[ n_bytes=242 ]) dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl -n_bytes=138 -]) +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) dnl check tunnel pop path, from at_ns0 to at_ns1 dnl This 200-byte packet is simulated on behalf of ns_gre0 @@ -1745,9 +1744,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" | sed -n 's/.*\(n\_bytes=[ n_bytes=242 ]) dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl -n_bytes=138 -]) +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) dnl check tunnel pop path, from at_ns0 to at_ns1 dnl This 200-byte packet is simulated on behalf of ns_gre0 @@ -1755,9 +1753,8 @@ ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 packet=02908ca8a149faa dnl After truncation = 100 byte at loopback device p2(4) OVS_REVALIDATOR_PURGE() -AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], [dnl - n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop -]) +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip | grep "n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop"], + [ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip]) OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev