bfd: Change the update of forwarding flag.
authorAlex Wang <alexw@nicira.com>
Tue, 10 Dec 2013 01:34:53 +0000 (17:34 -0800)
committerEthan Jackson <ethan@nicira.com>
Tue, 10 Dec 2013 02:33:48 +0000 (18:33 -0800)
commita1aeea86475db086ce95679962fb6d03d0a645f3
tree383061c47ebfec31d5375898bfd75f7c04de18b2
parent309d9dacd3c254a8d2d92d0589aeada247f54089
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 <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/bfd.c
lib/bfd.h
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
tests/bfd.at