From 4acbc98d3c61432e9138215e84ae91e32902d301 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Thu, 10 May 2012 09:12:02 +0900 Subject: [PATCH] ofproto-dpif: Make parameters const. The ofproto parameters to lookup_input_bundle(), get_ofp_port() and get_odp_port() may be const. Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 094cbd00..9c8f7f4d 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -181,7 +181,7 @@ static void bundle_destroy(struct ofbundle *); static void bundle_del_port(struct ofport_dpif *); static void bundle_run(struct ofbundle *); static void bundle_wait(struct ofbundle *); -static struct ofbundle *lookup_input_bundle(struct ofproto_dpif *, +static struct ofbundle *lookup_input_bundle(const struct ofproto_dpif *, uint16_t in_port, bool warn, struct ofport_dpif **in_ofportp); @@ -631,9 +631,9 @@ ofproto_dpif_cast(const struct ofproto *ofproto) return CONTAINER_OF(ofproto, struct ofproto_dpif, up); } -static struct ofport_dpif *get_ofp_port(struct ofproto_dpif *, +static struct ofport_dpif *get_ofp_port(const struct ofproto_dpif *, uint16_t ofp_port); -static struct ofport_dpif *get_odp_port(struct ofproto_dpif *, +static struct ofport_dpif *get_odp_port(const struct ofproto_dpif *, uint32_t odp_port); static void ofproto_trace(struct ofproto_dpif *, const struct flow *, const struct ofpbuf *, ovs_be16 initial_tci, @@ -2368,14 +2368,14 @@ set_mac_idle_time(struct ofproto *ofproto_, unsigned int idle_time) /* Ports. */ static struct ofport_dpif * -get_ofp_port(struct ofproto_dpif *ofproto, uint16_t ofp_port) +get_ofp_port(const struct ofproto_dpif *ofproto, uint16_t ofp_port) { struct ofport *ofport = ofproto_get_port(&ofproto->up, ofp_port); return ofport ? ofport_dpif_cast(ofport) : NULL; } static struct ofport_dpif * -get_odp_port(struct ofproto_dpif *ofproto, uint32_t odp_port) +get_odp_port(const struct ofproto_dpif *ofproto, uint32_t odp_port) { return get_ofp_port(ofproto, odp_port_to_ofp_port(odp_port)); } @@ -6061,8 +6061,8 @@ update_learning_table(struct ofproto_dpif *ofproto, } static struct ofbundle * -lookup_input_bundle(struct ofproto_dpif *ofproto, uint16_t in_port, bool warn, - struct ofport_dpif **in_ofportp) +lookup_input_bundle(const struct ofproto_dpif *ofproto, uint16_t in_port, + bool warn, struct ofport_dpif **in_ofportp) { struct ofport_dpif *ofport; -- 2.30.2