Bug-590: Packet loss on first time ping test 54/6354/1
authorFlavio Fernandes <ffernand@redhat.com>
Thu, 24 Apr 2014 11:06:37 +0000 (07:06 -0400)
committerFlavio Fernandes <ffernand@redhat.com>
Thu, 24 Apr 2014 11:06:37 +0000 (07:06 -0400)
commit4ddd587b31a9aeec7d3d5ae0047852a64fbb70c2
tree0c90fcc0165e442e05d848d840cffb85d4531c12
parent7b8c4f5a339df43483744a337fc10dfaa252a6f4
Bug-590: Packet loss on first time ping test

In this commit, we are addressing a race that could cause the exception (ie first ip packet) to
be lost. What is observed with this bug is that the non-arp packet -- in this case the icmp packet --
is being 'exceptioned' to the SimpleForwarding code path because the node has not yet been programmed
with flows that would allow it to forward the packet to its destination w/out involving the controller.

The race in this case is caused by the exceptioned packet being received before the rulesDB member
in simpleForwarding module is updated. That member -- rulesDB -- is updated via the
hostTracker::notifyHTClient() callback shortly after. In this particular race, the hostTracker is already
updated with the proper information, and rulesDB is 'stale'. Thus, the proposed fix is to make the forwarding
less strict (ie. ignore rulesDB). Note that both routing and hostTracker are all simpleForwarding needs to
know how to forward the packet.

Change-Id: Icfb909ca89abff6031212b4fcd0f5d1bd1a27d6b
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java