[ovs-dev] [PATCH 03/11] ofproto-dpif: Harmonize naming of internal functions.

Jarno Rajahalme jarno.rajahalme at nsn.com
Fri May 31 11:35:13 UTC 2013


It would be good to be able to harminize the use of "xlate", "execute",
"compose", etc.  "xlate" clearly relates to the use of the various translation
context structures, but the distinction between "execute" and "compose" is
not that clear, so these names could be going either way.  Choose to go with
"compose", keeping with the older tradition.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
---
 ofproto/ofproto-dpif.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 37a7e3a..f78d60b 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -6233,7 +6233,7 @@ execute_controller_action(struct xlate_ctx *ctx, int len,
 }
 
 static void
-execute_mpls_push_action(struct flow *flow, ovs_be16 eth_type)
+compose_mpls_push_action(struct flow *flow, ovs_be16 eth_type)
 {
     ovs_assert(eth_type_mpls(eth_type));
 
@@ -6258,7 +6258,7 @@ execute_mpls_push_action(struct flow *flow, ovs_be16 eth_type)
 }
 
 static void
-execute_mpls_pop_action(struct flow *flow, ovs_be16 eth_type)
+compose_mpls_pop_action(struct flow *flow, ovs_be16 eth_type)
 {
     ovs_assert(eth_type_mpls(flow->dl_type));
     ovs_assert(!eth_type_mpls(eth_type));
@@ -6290,7 +6290,7 @@ compose_dec_ttl(struct flow *flow)
 }
 
 static bool
-execute_set_mpls_ttl_action(struct flow *flow, uint8_t ttl)
+compose_set_mpls_ttl_action(struct flow *flow, uint8_t ttl)
 {
     if (!eth_type_mpls(flow->dl_type)) {
         return true;
@@ -6301,7 +6301,7 @@ execute_set_mpls_ttl_action(struct flow *flow, uint8_t ttl)
 }
 
 static bool
-execute_dec_mpls_ttl_action(struct flow *flow)
+compose_dec_mpls_ttl_action(struct flow *flow)
 {
     uint8_t ttl = mpls_lse_to_ttl(flow->mpls_lse);
 
@@ -6712,24 +6712,24 @@ do_xlate_actions(const struct ofpact *ofpacts, size_t ofpacts_len,
             break;
 
         case OFPACT_PUSH_MPLS:
-            execute_mpls_push_action(&ctx->xin->flow,
+            compose_mpls_push_action(&ctx->xin->flow,
                                      ofpact_get_PUSH_MPLS(a)->ethertype);
             break;
 
         case OFPACT_POP_MPLS:
-            execute_mpls_pop_action(&ctx->xin->flow,
+            compose_mpls_pop_action(&ctx->xin->flow,
                                     ofpact_get_POP_MPLS(a)->ethertype);
             break;
 
         case OFPACT_SET_MPLS_TTL:
-            if (execute_set_mpls_ttl_action(&ctx->xin->flow,
+            if (compose_set_mpls_ttl_action(&ctx->xin->flow,
                                             ofpact_get_SET_MPLS_TTL(a)->ttl)) {
                 goto out;
             }
             break;
 
         case OFPACT_DEC_MPLS_TTL:
-            if (execute_dec_mpls_ttl_action(&ctx->xin->flow)) {
+            if (compose_dec_mpls_ttl_action(&ctx->xin->flow)) {
                 execute_controller_action(ctx, UINT16_MAX, OFPR_INVALID_TTL,
                                           0);
                 goto out;
-- 
1.7.10.4




More information about the dev mailing list