From: Simon Horman Date: Thu, 10 May 2012 00:12:02 +0000 (+0900) Subject: ofproto-dpif: Make parameters const. X-Git-Tag: sliver-openvswitch-1.8.90-0~48^2~452 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4acbc98d3c61432e9138215e84ae91e32902d301;p=sliver-openvswitch.git 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 --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 094cbd00e..9c8f7f4df 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;