Thanks for fixing this!

I've tested it with different flow tables and it doesn't appear to have
any performance penalty at all

Acked-by: Daniele Di Proietto <diproiet...@vmware.com>


On 21/05/2015 01:06, "Ethan Jackson" <et...@nicira.com> wrote:

>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 <et...@nicira.com>
>---
> lib/dpif-netdev.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
>index fb01a02..bbd0fa4 100644
>--- a/lib/dpif-netdev.c
>+++ b/lib/dpif-netdev.c
>@@ -3066,7 +3066,6 @@ packet_batch_execute(struct packet_batch *batch,
>     struct dp_netdev_actions *actions;
>     struct dp_netdev_flow *flow = batch->flow;
> 
>-    flow->batch = NULL;
>     dp_netdev_flow_used(flow, batch->packet_count, batch->byte_count,
>                         batch->tcp_flags, now);
> 
>@@ -3299,6 +3298,10 @@ dp_netdev_input(struct dp_netdev_pmd_thread *pmd,
>     }
> 
>     for (i = 0; i < n_batches; i++) {
>+        batches[i].flow->batch = NULL;
>+    }
>+
>+    for (i = 0; i < n_batches; i++) {
>         packet_batch_execute(&batches[i], pmd, now);
>     }
> }
>-- 
>1.9.1
>
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=AwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Sm
>B5nZacmXNq0gKCC1s_Cw5yUNjxgD4v5kJqZ2uWLlE&m=E3RLj44GnRs6xkLp8q1Qms7WlJuAtm
>21EdFxeippZ9Y&s=tr994LeNhZZCRX7ozJApneTZSF3nsV44xw2tM2Uf6Hc&e= 

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to