ofproto-dpif: Restore metadata and registers on recirculation.
authorJarno Rajahalme <jrajahalme@nicira.com>
Thu, 26 Mar 2015 18:18:16 +0000 (11:18 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Thu, 26 Mar 2015 18:18:16 +0000 (11:18 -0700)
commite672ff9b4d224f4d7ef12b289811b0759a333e48
treefdd43926b17f4aae4263485e88fcdfe4548f16c6
parent13dd4a9738e99684a56b10ce2f1a5ee2d2ec2f9f
ofproto-dpif: Restore metadata and registers on recirculation.

xlate_actions() now considers an optional recirculation context (via
'xin') and restores OpenFlow pipeline metadata (registers, 'metadata',
etc.) based on it.  The recirculation context may contain an action
set and stack to be restored and further actions to be executed upon
recirculation.  It also contains a table_id number to be used for rule
lookup in cases where no post-recirculation actions are used.

The translation context internal metadata is restored using a new
internal action: UNROLL_XLATE action stores the translation context
data visible to OpenFlow controllers via PACKET_IN messages.  This
includes the current table number and the current rule cookie.
UNROLL_XLATE actions are inserted only when the remaining actions may
generate PACKET_IN messages.

These changes allow the post-MPLS recirculation to properly continue
with the pipeline metadata that existed at the time of recirculation.

The internal table is still consulted for bonds.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
12 files changed:
lib/ofp-actions.c
lib/ofp-actions.h
ofproto/bond.c
ofproto/ofproto-dpif-rid.c
ofproto/ofproto-dpif-rid.h
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif-xlate.h
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
tests/mpls-xlate.at
tests/ofproto-dpif.at