ofproto-dpif: Move "learn" actions into individual threads.
authorBen Pfaff <blp@nicira.com>
Fri, 13 Sep 2013 03:45:31 +0000 (20:45 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 13 Sep 2013 04:37:01 +0000 (21:37 -0700)
commit91296725aaf720e2c868c42a94a29d5f3e91bdf5
tree6bea9e344df18a48d09bd4c5dc91a59ff4937d1c
parentf67981fea36da889424c34558ac70d58cea150b1
ofproto-dpif: Move "learn" actions into individual threads.

Before OVS introduced threading, any given ``learn'' action took effect in
the flow table before the next incoming flow was set up.  This meant that
if a packet came in, used ``learn'' to set up a flow to handle replies, and
then a reply came in, the reply would always hit the flow set up by the
``learn'' action.  Until now, with the threading implementation, though,
the effects of ``learn'' actions happen asynchronously via a queue, which
means that the reply can arrive before the flow to handle it is set up.
This introduced an unacceptable regression in important use cases.

This commit fixes the problem by switching back to executing learn actions
before forwarding the packet that triggered it.

I imagine that there is considerable opportunity for optimization here.

Bug #19147.
Bug #19244.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto.c