[ovs-dev] [PATCH 2/3] ofproto-dpif: Make execute_actions() function non-static.

Alex Wang alexw at nicira.com
Fri Oct 11 21:58:35 UTC 2013


This commit changes the execute_actions() function to non-static
function.

Signed-off-by: Alex Wang <alexw at nicira.com>
---
 ofproto/ofproto-dpif.c |   23 ++++++++++++++---------
 ofproto/ofproto-dpif.h |    3 +++
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index b41bf2d..288cd3f 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -3806,13 +3806,13 @@ facet_free(struct facet *facet)
  * All of the information in 'flow' is extracted from 'packet',
  * except for flow->tunnel and flow->in_port, which are assigned
  * the correct values for the incoming packet. */
-static int
-execute_actions(struct ofproto *ofproto_, const struct flow *flow,
-                struct rule_dpif *rule,
-                const struct ofpact *ofpacts, size_t ofpacts_len,
-                struct ofpbuf *packet)
+int
+ofproto_dpif_execute_actions(struct ofproto_dpif *ofproto,
+                             const struct flow *flow,
+                             struct rule_dpif *rule,
+                             const struct ofpact *ofpacts, size_t ofpacts_len,
+                             struct ofpbuf *packet)
 {
-    struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
     struct odputil_keybuf keybuf;
     struct dpif_flow_stats stats;
     struct xlate_out xout;
@@ -4764,7 +4764,9 @@ static void
 rule_dpif_execute(struct rule_dpif *rule, const struct flow *flow,
                   struct ofpbuf *packet)
 {
-    execute_actions(rule->up.ofproto, flow, rule, NULL, 0, packet);
+    struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto);
+
+    ofproto_dpif_execute_actions(ofproto, flow, rule, NULL, 0, packet);
 }
 
 static enum ofperr
@@ -4864,11 +4866,14 @@ set_frag_handling(struct ofproto *ofproto_,
 }
 
 static enum ofperr
-packet_out(struct ofproto *ofproto, struct ofpbuf *packet,
+packet_out(struct ofproto *ofproto_, struct ofpbuf *packet,
            const struct flow *flow,
            const struct ofpact *ofpacts, size_t ofpacts_len)
 {
-    execute_actions(ofproto, flow, NULL, ofpacts, ofpacts_len, packet);
+    struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
+
+    ofproto_dpif_execute_actions(ofproto, flow, NULL, ofpacts,
+                                 ofpacts_len, packet);
     return 0;
 }
 
diff --git a/ofproto/ofproto-dpif.h b/ofproto/ofproto-dpif.h
index 0863efd..51b1979 100644
--- a/ofproto/ofproto-dpif.h
+++ b/ofproto/ofproto-dpif.h
@@ -93,6 +93,9 @@ ofp_port_t vsp_realdev_to_vlandev(const struct ofproto_dpif *,
                                   ovs_be16 vlan_tci);
 bool vsp_adjust_flow(const struct ofproto_dpif *, struct flow *);
 
+int ofproto_dpif_execute_actions(struct ofproto_dpif *, const struct flow *,
+                                 struct rule_dpif *, const struct ofpact *,
+                                 size_t ofpacts_len, struct ofpbuf *);
 void ofproto_dpif_send_packet_in(struct ofproto_dpif *,
                                  struct ofputil_packet_in *pin);
 int ofproto_dpif_send_packet(const struct ofport_dpif *, struct ofpbuf *);
-- 
1.7.9.5




More information about the dev mailing list