From: Justin Pettit Date: Sun, 7 Feb 2010 08:10:02 +0000 (-0800) Subject: vswitch: Set control_ip in sFlow configuration X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d49d354b7a05aefa796f7c0a9813bc04eccfaf9f;p=openvswitch vswitch: Set control_ip in sFlow configuration --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 88f8db11..766475bd 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -199,6 +199,9 @@ static void bridge_destroy(struct bridge *); static struct bridge *bridge_lookup(const char *name); static unixctl_cb_func bridge_unixctl_dump_flows; static int bridge_run_one(struct bridge *); +static const struct ovsrec_controller *bridge_get_controller( + const struct ovsrec_open_vswitch *ovs_cfg, + const struct bridge *br); static void bridge_reconfigure_one(const struct ovsrec_open_vswitch *, struct bridge *); static void bridge_reconfigure_controller(const struct ovsrec_open_vswitch *, @@ -755,7 +758,8 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) /* Set sFlow configuration on this bridge. */ if (br->cfg->sflow) { - struct ovsrec_sflow *sflow_cfg = br->cfg->sflow; + const struct ovsrec_sflow *sflow_cfg = br->cfg->sflow; + const struct ovsrec_controller *ctrl; struct ofproto_sflow_options oso; memset(&oso, 0, sizeof oso); @@ -781,10 +785,8 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg) oso.sub_id = sflow_bridge_number++; oso.agent_device = sflow_cfg->agent; -#if 0 /* xxx foo */ ctrl = bridge_get_controller(ovs_cfg, br); oso.control_ip = ctrl ? ctrl->local_ip : NULL; -#endif ofproto_set_sflow(br->ofproto, &oso); svec_destroy(&oso.targets);