2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 09:58:01 +00:00

ofproto-dpif-xlate: Rename apply_nested_clone_actions()

Rename apply_nested_clone_actions() To patch_port_output().
The original function name does not make much sense.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
This commit is contained in:
Andy Zhou 2017-08-23 19:29:30 -07:00
parent 96c3a6e5b5
commit 48f704f476

View File

@ -432,7 +432,7 @@ static void xlate_action_set(struct xlate_ctx *ctx);
static void xlate_commit_actions(struct xlate_ctx *ctx); static void xlate_commit_actions(struct xlate_ctx *ctx);
static void static void
apply_nested_clone_actions(struct xlate_ctx *ctx, const struct xport *in_dev, patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev,
struct xport *out_dev); struct xport *out_dev);
static void static void
@ -3317,7 +3317,7 @@ validate_and_combine_post_tnl_actions(struct xlate_ctx *ctx,
entry->tunnel_hdr.hdr_size = tnl_push_data.header_len; entry->tunnel_hdr.hdr_size = tnl_push_data.header_len;
entry->tunnel_hdr.operation = ADD; entry->tunnel_hdr.operation = ADD;
apply_nested_clone_actions(ctx, xport, out_dev); patch_port_output(ctx, xport, out_dev);
nested_act_flag = is_tunnel_actions_clone_ready(ctx); nested_act_flag = is_tunnel_actions_clone_ready(ctx);
if (nested_act_flag) { if (nested_act_flag) {
@ -3509,20 +3509,21 @@ xlate_flow_is_protected(const struct xlate_ctx *ctx, const struct flow *flow, co
xport_in->xbundle->protected && xport_out->xbundle->protected); xport_in->xbundle->protected && xport_out->xbundle->protected);
} }
/* Function to combine actions from following device/port with the current /* Function handles when a packet is sent from one bridge to another bridge.
* device actions in openflow pipeline. Mainly used for the translation of
* patch/tunnel port output actions. It pushes the openflow state into a stack
* first, clear out to execute the packet through the device and finally pop
* the openflow state back from the stack. This is equivalent to cloning
* a packet in translation for the duration of execution.
* *
* On output to a patch port, the output action will be replaced with set of * The bridges are internally connected, either with patch ports or with
* nested actions on the peer patch port. * tunnel ports.
* Similarly on output to a tunnel port, the post nested actions on *
* tunnel are chained up with the tunnel-push action. * The output action to another bridge causes translation to continue within
* the next bridge. This process can be recursive; the next bridge can
* output yet to another bridge.
*
* The translated actions from the second bridge onwards are enclosed within
* the clone action, so that any modification to the packet will not be visible
* to the remaining actions of the originating bridge.
*/ */
static void static void
apply_nested_clone_actions(struct xlate_ctx *ctx, const struct xport *in_dev, patch_port_output(struct xlate_ctx *ctx, const struct xport *in_dev,
struct xport *out_dev) struct xport *out_dev)
{ {
struct flow *flow = &ctx->xin->flow; struct flow *flow = &ctx->xin->flow;
@ -3760,7 +3761,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
} }
if (xport->peer) { if (xport->peer) {
apply_nested_clone_actions(ctx, xport, xport->peer); patch_port_output(ctx, xport, xport->peer);
return; return;
} }