ofproto: Avoid abandoning an ofopgroup without committing it.
authorBen Pfaff <blp@nicira.com>
Fri, 25 Oct 2013 20:31:50 +0000 (13:31 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 25 Oct 2013 20:31:50 +0000 (13:31 -0700)
commit862d8eed48618b5bfd65e61613ff267a66caa980
tree1446eb82c1ff0937018acb4b2b82a5a800fe871d
parent6647cb8ce75dfcb2bfd2b2c858eb789bd349687a
ofproto: Avoid abandoning an ofopgroup without committing it.

Commit e3b5693319c (Fix table checking for goto table instruction.) moved
action checking into modify_flows__(), for good reason, but as a side
effect made modify_flows__() abandon and never commit the ofopgroup that it
started, if action checking failed.  This commit fixes the problem.

The following commands, run under "make sandbox", illustrate the problem.
Without this change, the final command hangs because the barrier request
that ovs-ofctl sends never gets a response (because barriers wait for all
ofopgroups to complete, which never happens).  With this commit, the
commands complete quickly:

ovs-vsctl add-br br0
ovs-vsctl set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13
ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:2
ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:1

Reported-by: Jarno Rajahalme <jrajahalme@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto.c
tests/ofproto.at