Suggested-by: Ben Pfaff <b...@nicira.com>
Signed-off-by: Justin Pettit <jpet...@nicira.com>
---
 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 aacb3e8..d43cb39 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 c7dc872..02a0f17 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 90cbb41..9f5bb96 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);
             }
-- 
1.7.5.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to