From: Ethan Jackson Date: Mon, 13 May 2013 22:31:31 +0000 (-0700) Subject: ofproto-dpif: Rename action_xlate_ctx. X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~193 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f03a84b99f9993f40a21cbe9a52f4f2f1b4fabb1;p=sliver-openvswitch.git ofproto-dpif: Rename action_xlate_ctx. This patch changes the name of action_xlate_ctx to xlate_ctx. Aside from being a bit snappier, it fits more cleanly with structures added in future patches. Signed-off-by: Ethan Jackson --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 55a6cff68..0bde8c4d6 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -208,8 +208,8 @@ static int set_stp_port(struct ofport *, static bool ofbundle_includes_vlan(const struct ofbundle *, uint16_t vlan); -struct action_xlate_ctx { -/* action_xlate_ctx_init() initializes these members. */ +struct xlate_ctx { + /* xlate_ctx_init() initializes these members. */ /* The ofproto. */ struct ofproto_dpif *ofproto; @@ -262,19 +262,19 @@ struct action_xlate_ctx { * resubmit or OFPP_TABLE action didn't find a matching rule. * * This is normally null so the client has to set it manually after - * calling action_xlate_ctx_init(). */ - void (*resubmit_hook)(struct action_xlate_ctx *, struct rule_dpif *rule); + * calling xlate_ctx_init(). */ + void (*resubmit_hook)(struct xlate_ctx *, struct rule_dpif *rule); /* If nonnull, flow translation calls this function to report some * significant decision, e.g. to explain why OFPP_NORMAL translation * dropped a packet. */ - void (*report_hook)(struct action_xlate_ctx *, const char *s); + void (*report_hook)(struct xlate_ctx *, const char *s); /* If nonnull, flow translation credits the specified statistics to each * rule reached through a resubmit or OFPP_TABLE action. * * This is normally null so the client has to set it manually after - * calling action_xlate_ctx_init(). */ + * calling xlate_ctx_init(). */ const struct dpif_flow_stats *resubmit_stats; /* xlate_actions() initializes and uses these members. The client might want @@ -317,18 +317,17 @@ struct initial_vals { ovs_be16 vlan_tci; }; -static void action_xlate_ctx_init(struct action_xlate_ctx *, - struct ofproto_dpif *, const struct flow *, - const struct initial_vals *initial_vals, - struct rule_dpif *, - uint8_t tcp_flags, const struct ofpbuf *); -static void xlate_actions(struct action_xlate_ctx *, - const struct ofpact *ofpacts, size_t ofpacts_len, - struct ofpbuf *odp_actions); -static void xlate_actions_for_side_effects(struct action_xlate_ctx *, +static void xlate_ctx_init(struct xlate_ctx *, struct ofproto_dpif *, + const struct flow *, + const struct initial_vals *initial_vals, + struct rule_dpif *, uint8_t tcp_flags, + const struct ofpbuf *); +static void xlate_actions(struct xlate_ctx *, const struct ofpact *ofpacts, + size_t ofpacts_len, struct ofpbuf *odp_actions); +static void xlate_actions_for_side_effects(struct xlate_ctx *, const struct ofpact *ofpacts, size_t ofpacts_len); -static void xlate_table_action(struct action_xlate_ctx *, uint16_t in_port, +static void xlate_table_action(struct xlate_ctx *, uint16_t in_port, uint8_t table_id, bool may_packet_in); static size_t put_userspace_action(const struct ofproto_dpif *, @@ -343,7 +342,7 @@ static void compose_slow_path(const struct ofproto_dpif *, const struct flow *, const struct nlattr **actionsp, size_t *actions_lenp); -static void xlate_report(struct action_xlate_ctx *ctx, const char *s); +static void xlate_report(struct xlate_ctx *ctx, const char *s); /* A subfacet (see "struct subfacet" below) has three possible installation * states: @@ -817,7 +816,7 @@ static size_t compose_sflow_action(const struct ofproto_dpif *, static void compose_ipfix_action(const struct ofproto_dpif *, struct ofpbuf *odp_actions, const struct flow *); -static void add_mirror_actions(struct action_xlate_ctx *ctx, +static void add_mirror_actions(struct xlate_ctx *ctx, const struct flow *flow); /* Global variables. */ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); @@ -3654,7 +3653,7 @@ handle_flow_miss_without_facet(struct flow_miss *miss, { struct rule_dpif *rule = rule_dpif_lookup(miss->ofproto, &miss->flow); long long int now = time_msec(); - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; struct ofpbuf *packet; LIST_FOR_EACH (packet, list_node, &miss->packets) { @@ -3671,9 +3670,8 @@ handle_flow_miss_without_facet(struct flow_miss *miss, dpif_flow_stats_extract(&miss->flow, packet, now, &stats); rule_credit_stats(rule, &stats); - action_xlate_ctx_init(&ctx, miss->ofproto, &miss->flow, - &miss->initial_vals, rule, stats.tcp_flags, - packet); + xlate_ctx_init(&ctx, miss->ofproto, &miss->flow, &miss->initial_vals, + rule, stats.tcp_flags, packet); ctx.resubmit_stats = &stats; xlate_actions(&ctx, rule->up.ofpacts, rule->up.ofpacts_len, &odp_actions); @@ -3722,11 +3720,10 @@ handle_flow_miss_with_facet(struct flow_miss *miss, struct facet *facet, handle_flow_miss_common(facet->rule, packet, &miss->flow); if (want_path != SF_FAST_PATH) { - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, - &facet->initial_vals, facet->rule, 0, - packet); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, + facet->rule, 0, packet); xlate_actions_for_side_effects(&ctx, facet->rule->up.ofpacts, facet->rule->up.ofpacts_len); } @@ -4616,7 +4613,7 @@ static struct facet * facet_create(const struct flow_miss *miss, uint32_t hash) { struct ofproto_dpif *ofproto = miss->ofproto; - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; struct facet *facet; facet = xzalloc(sizeof *facet); @@ -4634,8 +4631,8 @@ facet_create(const struct flow_miss *miss, uint32_t hash) ofpbuf_use_stub(&facet->odp_actions, &facet->odp_actions_stub, sizeof facet->odp_actions_stub); - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, - facet->rule, 0, NULL); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, + facet->rule, 0, NULL); ctx.may_learn = true; xlate_actions(&ctx, facet->rule->up.ofpacts, facet->rule->up.ofpacts_len, &facet->odp_actions); @@ -4723,7 +4720,7 @@ facet_learn(struct facet *facet) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(facet->rule->up.ofproto); long long int now = time_msec(); - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; if (!facet->has_fin_timeout && now < facet->learn_rl) { return; @@ -4738,8 +4735,8 @@ facet_learn(struct facet *facet) return; } - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, - facet->rule, facet->tcp_flags, NULL); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, + facet->rule, facet->tcp_flags, NULL); ctx.may_learn = true; xlate_actions_for_side_effects(&ctx, facet->rule->up.ofpacts, facet->rule->up.ofpacts_len); @@ -4908,7 +4905,7 @@ facet_check_consistency(struct facet *facet) uint64_t odp_actions_stub[1024 / 8]; struct ofpbuf odp_actions; - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; struct rule_dpif *rule; bool ok; @@ -4934,8 +4931,8 @@ facet_check_consistency(struct facet *facet) /* Check the datapath actions for consistency. */ ofpbuf_use_stub(&odp_actions, odp_actions_stub, sizeof odp_actions_stub); - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, - rule, 0, NULL); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, rule, 0, + NULL); xlate_actions(&ctx, rule->up.ofpacts, rule->up.ofpacts_len, &odp_actions); ok = ofpbuf_equal(&facet->odp_actions, &odp_actions) @@ -4986,9 +4983,9 @@ facet_revalidate(struct facet *facet) uint64_t odp_actions_stub[1024 / 8]; struct ofpbuf odp_actions; - struct action_xlate_ctx ctx; struct rule_dpif *new_rule; struct subfacet *subfacet; + struct xlate_ctx ctx; COVERAGE_INC(facet_revalidate); @@ -5019,8 +5016,8 @@ facet_revalidate(struct facet *facet) * emit a NetFlow expiration and, if so, we need to have the old state * around to properly compose it. */ ofpbuf_use_stub(&odp_actions, odp_actions_stub, sizeof odp_actions_stub); - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, - new_rule, 0, NULL); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, new_rule, + 0, NULL); xlate_actions(&ctx, new_rule->up.ofpacts, new_rule->up.ofpacts_len, &odp_actions); @@ -5166,12 +5163,12 @@ flow_push_stats(struct facet *facet, const struct dpif_flow_stats *stats) { struct rule_dpif *rule = facet->rule; struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto); - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; ofproto_rule_update_used(&rule->up, stats->used); - action_xlate_ctx_init(&ctx, ofproto, &facet->flow, - &facet->initial_vals, rule, 0, NULL); + xlate_ctx_init(&ctx, ofproto, &facet->flow, &facet->initial_vals, rule, 0, + NULL); ctx.resubmit_stats = stats; xlate_actions_for_side_effects(&ctx, rule->up.ofpacts, rule->up.ofpacts_len); @@ -5601,7 +5598,7 @@ rule_dpif_execute(struct rule_dpif *rule, const struct flow *flow, struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto); struct initial_vals initial_vals; struct dpif_flow_stats stats; - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; uint64_t odp_actions_stub[1024 / 8]; struct ofpbuf odp_actions; @@ -5610,7 +5607,7 @@ rule_dpif_execute(struct rule_dpif *rule, const struct flow *flow, initial_vals.vlan_tci = flow->vlan_tci; ofpbuf_use_stub(&odp_actions, odp_actions_stub, sizeof odp_actions_stub); - action_xlate_ctx_init(&ctx, ofproto, flow, &initial_vals, + xlate_ctx_init(&ctx, ofproto, flow, &initial_vals, rule, stats.tcp_flags, packet); ctx.resubmit_stats = &stats; xlate_actions(&ctx, rule->up.ofpacts, rule->up.ofpacts_len, &odp_actions); @@ -5650,7 +5647,7 @@ send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) struct dpif_flow_stats stats; struct odputil_keybuf keybuf; struct ofpact_output output; - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; struct flow flow; int error; @@ -5667,7 +5664,7 @@ send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) output.port = ofport->up.ofp_port; output.max_len = 0; - action_xlate_ctx_init(&ctx, ofproto, &flow, NULL, NULL, 0, packet); + xlate_ctx_init(&ctx, ofproto, &flow, NULL, NULL, 0, packet); ctx.resubmit_stats = &stats; xlate_actions(&ctx, &output.ofpact, sizeof output, &odp_actions); @@ -5690,10 +5687,10 @@ send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet) /* OpenFlow to datapath action translation. */ -static bool may_receive(const struct ofport_dpif *, struct action_xlate_ctx *); +static bool may_receive(const struct ofport_dpif *, struct xlate_ctx *); static void do_xlate_actions(const struct ofpact *, size_t ofpacts_len, - struct action_xlate_ctx *); -static void xlate_normal(struct action_xlate_ctx *); + struct xlate_ctx *); +static void xlate_normal(struct xlate_ctx *); /* Composes an ODP action for a "slow path" action for 'flow' within 'ofproto'. * The action will state 'slow' as the reason that the action is in the slow @@ -5869,7 +5866,7 @@ compose_ipfix_action(const struct ofproto_dpif *ofproto, * actions. At this point we do not have all information required to * build it. So try to build sample action as complete as possible. */ static void -add_sflow_action(struct action_xlate_ctx *ctx) +add_sflow_action(struct xlate_ctx *ctx) { ctx->user_cookie_offset = compose_sflow_action(ctx->ofproto, ctx->odp_actions, @@ -5881,7 +5878,7 @@ add_sflow_action(struct action_xlate_ctx *ctx) /* SAMPLE action for IPFIX must be 1st or 2nd action in any given list * of actions, eventually after the SAMPLE action for sFlow. */ static void -add_ipfix_action(struct action_xlate_ctx *ctx) +add_ipfix_action(struct xlate_ctx *ctx) { compose_ipfix_action(ctx->ofproto, ctx->odp_actions, &ctx->flow); } @@ -5890,7 +5887,7 @@ add_ipfix_action(struct action_xlate_ctx *ctx) * We need to fix SAMPLE actions OVS_SAMPLE_ATTR_ACTIONS attribute, i.e. nested * USERSPACE action's user-cookie which is required for sflow. */ static void -fix_sflow_action(struct action_xlate_ctx *ctx) +fix_sflow_action(struct xlate_ctx *ctx) { const struct flow *base = &ctx->base_flow; union user_action_cookie *cookie; @@ -5908,7 +5905,7 @@ fix_sflow_action(struct action_xlate_ctx *ctx) } static void -compose_output_action__(struct action_xlate_ctx *ctx, uint16_t ofp_port, +compose_output_action__(struct xlate_ctx *ctx, uint16_t ofp_port, bool check_stp) { const struct ofport_dpif *ofport = get_ofp_port(ctx->ofproto, ofp_port); @@ -6043,13 +6040,13 @@ compose_output_action__(struct action_xlate_ctx *ctx, uint16_t ofp_port, } static void -compose_output_action(struct action_xlate_ctx *ctx, uint16_t ofp_port) +compose_output_action(struct xlate_ctx *ctx, uint16_t ofp_port) { compose_output_action__(ctx, ofp_port, true); } static void -tag_the_flow(struct action_xlate_ctx *ctx, struct rule_dpif *rule) +tag_the_flow(struct xlate_ctx *ctx, struct rule_dpif *rule) { struct ofproto_dpif *ofproto = ctx->ofproto; uint8_t table_id = ctx->table_id; @@ -6068,7 +6065,7 @@ tag_the_flow(struct action_xlate_ctx *ctx, struct rule_dpif *rule) /* Common rule processing in one place to avoid duplicating code. */ static struct rule_dpif * -ctx_rule_hooks(struct action_xlate_ctx *ctx, struct rule_dpif *rule, +ctx_rule_hooks(struct xlate_ctx *ctx, struct rule_dpif *rule, bool may_packet_in) { if (ctx->resubmit_hook) { @@ -6091,7 +6088,7 @@ ctx_rule_hooks(struct action_xlate_ctx *ctx, struct rule_dpif *rule, } static void -xlate_table_action(struct action_xlate_ctx *ctx, +xlate_table_action(struct xlate_ctx *ctx, uint16_t in_port, uint8_t table_id, bool may_packet_in) { if (ctx->recurse < MAX_RESUBMIT_RECURSION) { @@ -6134,7 +6131,7 @@ xlate_table_action(struct action_xlate_ctx *ctx, } static void -xlate_ofpact_resubmit(struct action_xlate_ctx *ctx, +xlate_ofpact_resubmit(struct xlate_ctx *ctx, const struct ofpact_resubmit *resubmit) { uint16_t in_port; @@ -6154,7 +6151,7 @@ xlate_ofpact_resubmit(struct action_xlate_ctx *ctx, } static void -flood_packets(struct action_xlate_ctx *ctx, bool all) +flood_packets(struct xlate_ctx *ctx, bool all) { struct ofport_dpif *ofport; @@ -6176,7 +6173,7 @@ flood_packets(struct action_xlate_ctx *ctx, bool all) } static void -execute_controller_action(struct action_xlate_ctx *ctx, int len, +execute_controller_action(struct xlate_ctx *ctx, int len, enum ofp_packet_in_reason reason, uint16_t controller_id) { @@ -6248,7 +6245,7 @@ execute_controller_action(struct action_xlate_ctx *ctx, int len, } static void -execute_mpls_push_action(struct action_xlate_ctx *ctx, ovs_be16 eth_type) +execute_mpls_push_action(struct xlate_ctx *ctx, ovs_be16 eth_type) { ovs_assert(eth_type_mpls(eth_type)); @@ -6273,7 +6270,7 @@ execute_mpls_push_action(struct action_xlate_ctx *ctx, ovs_be16 eth_type) } static void -execute_mpls_pop_action(struct action_xlate_ctx *ctx, ovs_be16 eth_type) +execute_mpls_pop_action(struct xlate_ctx *ctx, ovs_be16 eth_type) { ovs_assert(eth_type_mpls(ctx->flow.dl_type)); ovs_assert(!eth_type_mpls(eth_type)); @@ -6288,7 +6285,7 @@ execute_mpls_pop_action(struct action_xlate_ctx *ctx, ovs_be16 eth_type) } static bool -compose_dec_ttl(struct action_xlate_ctx *ctx, struct ofpact_cnt_ids *ids) +compose_dec_ttl(struct xlate_ctx *ctx, struct ofpact_cnt_ids *ids) { if (ctx->flow.dl_type != htons(ETH_TYPE_IP) && ctx->flow.dl_type != htons(ETH_TYPE_IPV6)) { @@ -6312,7 +6309,7 @@ compose_dec_ttl(struct action_xlate_ctx *ctx, struct ofpact_cnt_ids *ids) } static bool -execute_set_mpls_ttl_action(struct action_xlate_ctx *ctx, uint8_t ttl) +execute_set_mpls_ttl_action(struct xlate_ctx *ctx, uint8_t ttl) { if (!eth_type_mpls(ctx->flow.dl_type)) { return true; @@ -6323,7 +6320,7 @@ execute_set_mpls_ttl_action(struct action_xlate_ctx *ctx, uint8_t ttl) } static bool -execute_dec_mpls_ttl_action(struct action_xlate_ctx *ctx) +execute_dec_mpls_ttl_action(struct xlate_ctx *ctx) { uint8_t ttl = mpls_lse_to_ttl(ctx->flow.mpls_lse); @@ -6344,7 +6341,7 @@ execute_dec_mpls_ttl_action(struct action_xlate_ctx *ctx) } static void -xlate_output_action(struct action_xlate_ctx *ctx, +xlate_output_action(struct xlate_ctx *ctx, uint16_t port, uint16_t max_len, bool may_packet_in) { uint16_t prev_nf_output_iface = ctx->nf_output_iface; @@ -6393,7 +6390,7 @@ xlate_output_action(struct action_xlate_ctx *ctx, } static void -xlate_output_reg_action(struct action_xlate_ctx *ctx, +xlate_output_reg_action(struct xlate_ctx *ctx, const struct ofpact_output_reg *or) { uint64_t port = mf_get_subfield(&or->src, &ctx->flow); @@ -6403,7 +6400,7 @@ xlate_output_reg_action(struct action_xlate_ctx *ctx, } static void -xlate_enqueue_action(struct action_xlate_ctx *ctx, +xlate_enqueue_action(struct xlate_ctx *ctx, const struct ofpact_enqueue *enqueue) { uint16_t ofp_port = enqueue->port; @@ -6442,7 +6439,7 @@ xlate_enqueue_action(struct action_xlate_ctx *ctx, } static void -xlate_set_queue_action(struct action_xlate_ctx *ctx, uint32_t queue_id) +xlate_set_queue_action(struct xlate_ctx *ctx, uint32_t queue_id) { uint32_t skb_priority; @@ -6478,7 +6475,7 @@ slave_enabled_cb(uint16_t ofp_port, void *ofproto_) } static void -xlate_bundle_action(struct action_xlate_ctx *ctx, +xlate_bundle_action(struct xlate_ctx *ctx, const struct ofpact_bundle *bundle) { uint16_t port; @@ -6492,7 +6489,7 @@ xlate_bundle_action(struct action_xlate_ctx *ctx, } static void -xlate_learn_action(struct action_xlate_ctx *ctx, +xlate_learn_action(struct xlate_ctx *ctx, const struct ofpact_learn *learn) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1); @@ -6524,7 +6521,7 @@ reduce_timeout(uint16_t max, uint16_t *timeout) } static void -xlate_fin_timeout(struct action_xlate_ctx *ctx, +xlate_fin_timeout(struct xlate_ctx *ctx, const struct ofpact_fin_timeout *oft) { if (ctx->tcp_flags & (TCP_FIN | TCP_RST) && ctx->rule) { @@ -6536,7 +6533,7 @@ xlate_fin_timeout(struct action_xlate_ctx *ctx, } static void -xlate_sample_action(struct action_xlate_ctx *ctx, +xlate_sample_action(struct xlate_ctx *ctx, const struct ofpact_sample *os) { union user_action_cookie cookie; @@ -6553,7 +6550,7 @@ xlate_sample_action(struct action_xlate_ctx *ctx, } static bool -may_receive(const struct ofport_dpif *port, struct action_xlate_ctx *ctx) +may_receive(const struct ofport_dpif *port, struct xlate_ctx *ctx) { if (port->up.pp.config & (eth_addr_equals(ctx->flow.dl_dst, eth_addr_stp) ? OFPUTIL_PC_NO_RECV_STP @@ -6574,7 +6571,7 @@ may_receive(const struct ofport_dpif *port, struct action_xlate_ctx *ctx) } static bool -tunnel_ecn_ok(struct action_xlate_ctx *ctx) +tunnel_ecn_ok(struct xlate_ctx *ctx) { if (is_ip_any(&ctx->base_flow) && (ctx->flow.tunnel.ip_tos & IP_ECN_MASK) == IP_ECN_CE) { @@ -6593,7 +6590,7 @@ tunnel_ecn_ok(struct action_xlate_ctx *ctx) static void do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len, - struct action_xlate_ctx *ctx) + struct xlate_ctx *ctx) { bool was_evictable = true; const struct ofpact *a; @@ -6846,11 +6843,11 @@ out: } static void -action_xlate_ctx_init(struct action_xlate_ctx *ctx, - struct ofproto_dpif *ofproto, const struct flow *flow, - const struct initial_vals *initial_vals, - struct rule_dpif *rule, - uint8_t tcp_flags, const struct ofpbuf *packet) +xlate_ctx_init(struct xlate_ctx *ctx, struct ofproto_dpif *ofproto, + const struct flow *flow, + const struct initial_vals *initial_vals, + struct rule_dpif *rule, uint8_t tcp_flags, + const struct ofpbuf *packet) { /* Flow initialization rules: * - 'base_flow' must match the kernel's view of the packet at the @@ -6894,7 +6891,7 @@ action_xlate_ctx_init(struct action_xlate_ctx *ctx, /* Translates the 'ofpacts_len' bytes of "struct ofpacts" starting at 'ofpacts' * into datapath actions in 'odp_actions', using 'ctx'. */ static void -xlate_actions(struct action_xlate_ctx *ctx, +xlate_actions(struct xlate_ctx *ctx, const struct ofpact *ofpacts, size_t ofpacts_len, struct ofpbuf *odp_actions) { @@ -7018,7 +7015,7 @@ xlate_actions(struct action_xlate_ctx *ctx, /* Translates the 'ofpacts_len' bytes of "struct ofpact"s starting at 'ofpacts' * into datapath actions, using 'ctx', and discards the datapath actions. */ static void -xlate_actions_for_side_effects(struct action_xlate_ctx *ctx, +xlate_actions_for_side_effects(struct xlate_ctx *ctx, const struct ofpact *ofpacts, size_t ofpacts_len) { @@ -7031,7 +7028,7 @@ xlate_actions_for_side_effects(struct action_xlate_ctx *ctx, } static void -xlate_report(struct action_xlate_ctx *ctx, const char *s) +xlate_report(struct xlate_ctx *ctx, const char *s) { if (ctx->report_hook) { ctx->report_hook(ctx, s); @@ -7152,7 +7149,7 @@ output_vlan_to_vid(const struct ofbundle *out_bundle, uint16_t vlan) } static void -output_normal(struct action_xlate_ctx *ctx, const struct ofbundle *out_bundle, +output_normal(struct xlate_ctx *ctx, const struct ofbundle *out_bundle, uint16_t vlan) { struct ofport_dpif *port; @@ -7220,7 +7217,7 @@ vlan_is_mirrored(const struct ofmirror *m, int vlan) } static void -add_mirror_actions(struct action_xlate_ctx *ctx, const struct flow *orig_flow) +add_mirror_actions(struct xlate_ctx *ctx, const struct flow *orig_flow) { struct ofproto_dpif *ofproto = ctx->ofproto; mirror_mask_t mirrors; @@ -7448,7 +7445,7 @@ lookup_input_bundle(const struct ofproto_dpif *ofproto, uint16_t in_port, * so in one special case. */ static bool -is_admissible(struct action_xlate_ctx *ctx, struct ofport_dpif *in_port, +is_admissible(struct xlate_ctx *ctx, struct ofport_dpif *in_port, uint16_t vlan) { struct ofproto_dpif *ofproto = ctx->ofproto; @@ -7491,7 +7488,7 @@ is_admissible(struct action_xlate_ctx *ctx, struct ofport_dpif *in_port, } static void -xlate_normal(struct action_xlate_ctx *ctx) +xlate_normal(struct xlate_ctx *ctx) { struct ofport_dpif *in_port; struct ofbundle *in_bundle; @@ -7715,7 +7712,7 @@ packet_out(struct ofproto *ofproto_, struct ofpbuf *packet, struct ofpbuf key; - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; uint64_t odp_actions_stub[1024 / 8]; struct ofpbuf odp_actions; @@ -7726,8 +7723,8 @@ packet_out(struct ofproto *ofproto_, struct ofpbuf *packet, dpif_flow_stats_extract(flow, packet, time_msec(), &stats); initial_vals.vlan_tci = flow->vlan_tci; - action_xlate_ctx_init(&ctx, ofproto, flow, &initial_vals, NULL, - packet_get_tcp_flags(packet, flow), packet); + xlate_ctx_init(&ctx, ofproto, flow, &initial_vals, NULL, + packet_get_tcp_flags(packet, flow), packet); ctx.resubmit_stats = &stats; ofpbuf_use_stub(&odp_actions, @@ -7867,7 +7864,7 @@ ofproto_unixctl_fdb_show(struct unixctl_conn *conn, int argc OVS_UNUSED, } struct trace_ctx { - struct action_xlate_ctx ctx; + struct xlate_ctx ctx; struct flow flow; struct ds *result; }; @@ -7935,7 +7932,7 @@ trace_format_odp(struct ds *result, int level, const char *title, } static void -trace_resubmit(struct action_xlate_ctx *ctx, struct rule_dpif *rule) +trace_resubmit(struct xlate_ctx *ctx, struct rule_dpif *rule) { struct trace_ctx *trace = CONTAINER_OF(ctx, struct trace_ctx, ctx); struct ds *result = trace->result; @@ -7948,7 +7945,7 @@ trace_resubmit(struct action_xlate_ctx *ctx, struct rule_dpif *rule) } static void -trace_report(struct action_xlate_ctx *ctx, const char *s) +trace_report(struct xlate_ctx *ctx, const char *s) { struct trace_ctx *trace = CONTAINER_OF(ctx, struct trace_ctx, ctx); struct ds *result = trace->result; @@ -8110,8 +8107,8 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, trace.flow = *flow; ofpbuf_use_stub(&odp_actions, odp_actions_stub, sizeof odp_actions_stub); - action_xlate_ctx_init(&trace.ctx, ofproto, flow, initial_vals, - rule, tcp_flags, packet); + xlate_ctx_init(&trace.ctx, ofproto, flow, initial_vals, rule, + tcp_flags, packet); trace.ctx.resubmit_hook = trace_resubmit; trace.ctx.report_hook = trace_report; xlate_actions(&trace.ctx, rule->up.ofpacts, rule->up.ofpacts_len,