From 59d0f2c8a0a16ef5ebc35e815bd82605b70fa7e2 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 14 Nov 2011 13:12:56 -0800 Subject: [PATCH] ofproto: Add "const" to ->rule_execute's "flow" parameter. --- ofproto/ofproto-dpif.c | 9 +++++---- ofproto/ofproto-provider.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 650cb1fc..9324de40 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -302,8 +302,8 @@ static void facet_account(struct ofproto_dpif *, struct facet *); static bool facet_is_controller_flow(struct facet *); -static void flow_push_stats(const struct rule_dpif *, - struct flow *, uint64_t packets, uint64_t bytes, +static void flow_push_stats(const struct rule_dpif *, const struct flow *, + uint64_t packets, uint64_t bytes, long long int used); static uint32_t rule_calculate_tag(const struct flow *, @@ -3343,7 +3343,7 @@ push_resubmit(struct action_xlate_ctx *ctx, struct rule_dpif *rule) * 'rule''s actions. */ static void flow_push_stats(const struct rule_dpif *rule, - struct flow *flow, uint64_t packets, uint64_t bytes, + const struct flow *flow, uint64_t packets, uint64_t bytes, long long int used) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto); @@ -3501,7 +3501,8 @@ rule_get_stats(struct rule *rule_, uint64_t *packets, uint64_t *bytes) } static int -rule_execute(struct rule *rule_, struct flow *flow, struct ofpbuf *packet) +rule_execute(struct rule *rule_, const struct flow *flow, + struct ofpbuf *packet) { struct rule_dpif *rule = rule_dpif_cast(rule_); struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule->up.ofproto); diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index d303632a..2a7324ac 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -783,7 +783,7 @@ struct ofproto_class { * * Returns 0 if successful, otherwise an OpenFlow error code (as returned * by ofp_mkerr()). */ - int (*rule_execute)(struct rule *rule, struct flow *flow, + int (*rule_execute)(struct rule *rule, const struct flow *flow, struct ofpbuf *packet); /* When ->rule_modify_actions() is called, the caller has already replaced -- 2.30.2