2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 05:18:13 +00:00

dpif-sflow: Remove unused parameter from dpif_sflow_create().

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
This commit is contained in:
Justin Pettit 2012-11-01 16:16:16 -07:00
parent c7a262159e
commit 4213f19da9
3 changed files with 3 additions and 5 deletions

View File

@ -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;

View File

@ -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 *);

View File

@ -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);
}