/*
- * Copyright (c) 2009, 2010 InMon Corp.
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
+ * Copyright (c) 2009 InMon Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
struct ofproto_sflow_port *osp;
- HMAP_FOR_EACH_IN_BUCKET (osp, struct ofproto_sflow_port, hmap_node,
+ HMAP_FOR_EACH_IN_BUCKET (osp, hmap_node,
hash_int(odp_port, 0), &os->ports) {
if (osp->odp_port == odp_port) {
return osp;
struct ofproto_sflow_port *osp, *next;
ofproto_sflow_clear(os);
- HMAP_FOR_EACH_SAFE (osp, next, struct ofproto_sflow_port, hmap_node,
- &os->ports) {
+ HMAP_FOR_EACH_SAFE (osp, next, hmap_node, &os->ports) {
ofproto_sflow_del_port__(os, osp);
}
hmap_destroy(&os->ports);
MAX(1, UINT32_MAX / options->sampling_rate));
/* Add samplers and pollers for the currently known ports. */
- HMAP_FOR_EACH (osp, struct ofproto_sflow_port, hmap_node, &os->ports) {
+ HMAP_FOR_EACH (osp, hmap_node, &os->ports) {
ofproto_sflow_add_poller(os, osp, osp->odp_port);
ofproto_sflow_add_sampler(os, osp);
}
n_outputs++;
break;
- case ODPAT_OUTPUT_GROUP:
- n_outputs += (a->output_group.group == DP_GROUP_FLOOD ? os->n_flood
- : a->output_group.group == DP_GROUP_ALL ? os->n_all
- : 0);
- break;
-
case ODPAT_SET_VLAN_VID:
switchElem.flowType.sw.dst_vlan = ntohs(a->vlan_vid.vlan_vid);
break;
sfl_sampler_writeFlowSample(sampler, &fs);
}
-void
-ofproto_sflow_set_group_sizes(struct ofproto_sflow *os,
- size_t n_flood, size_t n_all)
-{
- os->n_flood = n_flood;
- os->n_all = n_all;
-}
-
void
ofproto_sflow_run(struct ofproto_sflow *os)
{