From a1aeea86475db086ce95679962fb6d03d0a645f3 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Mon, 9 Dec 2013 17:34:53 -0800 Subject: bfd: Change the update of forwarding flag. Currently, we update the forwarding flag in bfd_set_state() and in bfd_forwarding_if_rx_update() if bfd_forwarding_if_rx is enabled. However, these are not the exact places where the forwarding flag needs to be updated. The exact places are in the bfd_process_packet() where bfd status are changed based on received control packet, and in the flow_push_stats() and compose_output_action__() where the rx_packet counter is updated. This commit changes the update of forwarding flag to the places mentioned above. Signed-off-by: Alex Wang Signed-off-by: Ethan Jackson Acked-by: Ethan Jackson --- tests/bfd.at | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/bfd.at b/tests/bfd.at index 83b424990..ccb62b54e 100644 --- a/tests/bfd.at +++ b/tests/bfd.at @@ -716,7 +716,7 @@ BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"] # turn bfd on p1 off, should increment the bfd:flap_count on p0. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic]) BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["2"]) AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"]) @@ -724,7 +724,7 @@ AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwardi # turn bfd on p1 on again, should increment the bfd:flap_count on p0. # p1 should still have flap_count = "1", since it is reset. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"]) BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"]) @@ -736,7 +736,7 @@ OK # turn bfd on p1 off, should not increment the bfd:flap_count on p0, since forwarding_override is on. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done BFD_CHECK([p0], [true], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic]) BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"]) AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwarding.*$/\1/p"]) @@ -744,7 +744,7 @@ AT_CHECK([ovs-vsctl list interface p1 | sed -n "s/^.*flap_count=\(.*\), forwardi # turn bfd on p1 on again, should not increment the bfd:flap_count on p0, since forwarding override is on. # p1 should still have flap_count = "1", since it is reset. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["3"]) BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"]) @@ -755,9 +755,9 @@ OK # turn bfd on p1 off and on, should increment the bfd:flap_count on p0. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=false]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["5"]) BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"]) @@ -804,7 +804,7 @@ BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["8"] # turn on the bfd on p1. AT_CHECK([ovs-vsctl set interface p1 bfd:enable=true]) -for i in `seq 0 19`; do ovs-appctl time/warp 100; done +for i in `seq 0 49`; do ovs-appctl time/warp 100; done # even though there is no data traffic, since p1 bfd is on again, should increment the flap_count. BFD_VSCTL_LIST_IFACE([p0], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["9"]) BFD_VSCTL_LIST_IFACE([p1], ["s/^.*flap_count=\(.*\), forwarding.*$/\1/p"], ["1"]) -- cgit v1.2.1