From 4213f19da9926e8a6b4569010f152f399d0ad8cc Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 1 Nov 2012 16:16:16 -0700 Subject: [PATCH] dpif-sflow: Remove unused parameter from dpif_sflow_create(). Suggested-by: Ben Pfaff Signed-off-by: Justin Pettit --- ofproto/ofproto-dpif-sflow.c | 4 +--- ofproto/ofproto-dpif-sflow.h | 2 +- ofproto/ofproto-dpif.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ofproto/ofproto-dpif-sflow.c b/ofproto/ofproto-dpif-sflow.c index aacb3e81..d43cb39e 100644 --- a/ofproto/ofproto-dpif-sflow.c +++ b/ofproto/ofproto-dpif-sflow.c @@ -53,7 +53,6 @@ struct dpif_sflow { struct collectors *collectors; SFLAgent *sflow_agent; struct ofproto_sflow_options *options; - struct dpif *dpif; time_t next_tick; size_t n_flood, n_all; struct hmap ports; /* Contains "struct dpif_sflow_port"s. */ @@ -294,12 +293,11 @@ dpif_sflow_is_enabled(const struct dpif_sflow *ds) } struct dpif_sflow * -dpif_sflow_create(struct dpif *dpif) +dpif_sflow_create(void) { struct dpif_sflow *ds; ds = xcalloc(1, sizeof *ds); - ds->dpif = dpif; ds->next_tick = time_now() + 1; hmap_init(&ds->ports); ds->probability = 0; diff --git a/ofproto/ofproto-dpif-sflow.h b/ofproto/ofproto-dpif-sflow.h index c7dc872c..02a0f179 100644 --- a/ofproto/ofproto-dpif-sflow.h +++ b/ofproto/ofproto-dpif-sflow.h @@ -28,7 +28,7 @@ struct flow; struct ofproto_sflow_options; struct ofport; -struct dpif_sflow *dpif_sflow_create(struct dpif *); +struct dpif_sflow *dpif_sflow_create(void); uint32_t dpif_sflow_get_probability(const struct dpif_sflow *); void dpif_sflow_destroy(struct dpif_sflow *); diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 90cbb412..9f5bb965 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1311,7 +1311,7 @@ set_sflow(struct ofproto *ofproto_, if (!ds) { struct ofport_dpif *ofport; - ds = ofproto->sflow = dpif_sflow_create(ofproto->dpif); + ds = ofproto->sflow = dpif_sflow_create(); HMAP_FOR_EACH (ofport, up.hmap_node, &ofproto->up.ports) { dpif_sflow_add_port(ds, &ofport->up, ofport->odp_port); } -- 2.30.2