dpif-netdev: Clear flow batches before execute.
authorEthan Jackson <ethan@nicira.com>
Wed, 20 May 2015 23:55:17 +0000 (16:55 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 21 May 2015 20:49:46 +0000 (13:49 -0700)
commit603f2ce04d000892cc4db841cff7b3b3fc95bb6c
treed2bd3b4a3034607ff573a025e22f5031acc99d7e
parent9154f798ef0011ea9d1d7fb1dc91b51b60da82d3
dpif-netdev: Clear flow batches before execute.

When executing actions, it's possible a recirculation will occur
causing dp_netdev_input() to be called multiple times.  If the batch
pointers embedded in dp_netdev_flow aren't cleared, it's possible
packets after the recirculation will be reinserted into a batch
associated with the original lookup.  This could be very bad.

This patch fixes the problem by zeroing out flow batch pointers before
calling packet_batch_execute().  This probably has a slightly negative
performance impact, though I haven't tried it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
lib/dpif-netdev.c