From 419460f4e1465102bb9699e1e470b4a1349999b1 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Fri, 11 Oct 2013 14:58:35 -0700 Subject: [PATCH] ofproto-dpif: Make execute_actions() function non-static. This commit changes the execute_actions() function to non-static function. Signed-off-by: Alex Wang Signed-off-by: Ben Pfaff --- 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 aa99ca3c4..69625cf6e 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3803,13 +3803,13 @@ facet_free(struct facet *facet) /* Executes, within 'ofproto', the actions in 'rule' or 'ofpacts' on 'packet'. * 'flow' must reflect the data in '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; @@ -4761,7 +4761,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 @@ -4861,11 +4863,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 0863efda2..51b197922 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 *); -- 2.43.0