[ovs-dev] [Simple DB Stats 01/11] bridge: Remove unused functions.
Justin Pettit
jpettit at nicira.com
Tue Jun 22 22:01:10 UTC 2010
Looks good.
--Justin
On Jun 10, 2010, at 5:14 PM, Ben Pfaff wrote:
> ---
> vswitchd/bridge.c | 40 ----------------------------------------
> vswitchd/bridge.h | 7 ++-----
> 2 files changed, 2 insertions(+), 45 deletions(-)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index b43a9bf..db723f1 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -270,33 +270,6 @@ static struct ofhooks bridge_ofhooks;
>
> /* Public functions. */
>
> -/* Adds the name of each interface used by a bridge, including local and
> - * internal ports, to 'svec'. */
> -void
> -bridge_get_ifaces(struct svec *svec)
> -{
> - struct bridge *br, *next;
> - size_t i, j;
> -
> - LIST_FOR_EACH_SAFE (br, next, struct bridge, node, &all_bridges) {
> - for (i = 0; i < br->n_ports; i++) {
> - struct port *port = br->ports[i];
> -
> - for (j = 0; j < port->n_ifaces; j++) {
> - struct iface *iface = port->ifaces[j];
> - if (iface->dp_ifidx < 0) {
> - VLOG_ERR("%s interface not in datapath %s, ignoring",
> - iface->name, dpif_name(br->dpif));
> - } else {
> - if (iface->dp_ifidx != ODPP_LOCAL) {
> - svec_add(svec, iface->name);
> - }
> - }
> - }
> - }
> - }
> -}
> -
> void
> bridge_init(const struct ovsrec_open_vswitch *cfg)
> {
> @@ -1259,19 +1232,6 @@ bridge_lookup(const char *name)
> return NULL;
> }
>
> -bool
> -bridge_exists(const char *name)
> -{
> - return bridge_lookup(name) ? true : false;
> -}
> -
> -uint64_t
> -bridge_get_datapathid(const char *name)
> -{
> - struct bridge *br = bridge_lookup(name);
> - return br ? ofproto_get_datapath_id(br->ofproto) : 0;
> -}
> -
> /* Handle requests for a listing of all flows known by the OpenFlow
> * stack, including those normally hidden. */
> static void
> diff --git a/vswitchd/bridge.h b/vswitchd/bridge.h
> index 3d3770d..44ce9a1 100644
> --- a/vswitchd/bridge.h
> +++ b/vswitchd/bridge.h
> @@ -16,8 +16,8 @@
> #ifndef VSWITCHD_BRIDGE_H
> #define VSWITCHD_BRIDGE_H 1
>
> -#include <stddef.h>
> -#include "list.h"
> +#include <stdbool.h>
> +#include <stdint.h>
>
> struct ovsrec_open_vswitch;
> struct svec;
> @@ -26,8 +26,5 @@ void bridge_init(const struct ovsrec_open_vswitch *);
> void bridge_reconfigure(const struct ovsrec_open_vswitch *);
> int bridge_run(void);
> void bridge_wait(void);
> -bool bridge_exists(const char *);
> -uint64_t bridge_get_datapathid(const char *name);
> -void bridge_get_ifaces(struct svec *svec);
>
> #endif /* bridge.h */
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list