aboutsummaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-11-14 13:12:56 -0800
committerBen Pfaff <blp@nicira.com>2011-11-23 13:19:53 -0800
commit59d0f2c8a0a16ef5ebc35e815bd82605b70fa7e2 (patch)
tree6af8eda5f0bfd8b61deb6a2797c19c7684f2ff62 /ofproto
parent5490f250fd1b899dd3f190513c599b1c5c507286 (diff)
ofproto: Add "const" to ->rule_execute's "flow" parameter.
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif.c9
-rw-r--r--ofproto/ofproto-provider.h2
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