From d49d354b7a05aefa796f7c0a9813bc04eccfaf9f Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Sun, 7 Feb 2010 00:10:02 -0800 Subject: [PATCH 1/1] vswitch: Set control_ip in sFlow configuration --- vswitchd/bridge.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 88f8db112..766475bdf 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); -- 2.43.0