#include "ofproto-dpif-governor.h"
#include "ofproto-dpif-sflow.h"
#include "poll-loop.h"
+#include "simap.h"
#include "timer.h"
#include "unaligned.h"
#include "unixctl.h"
cls_rule_init_catchall(&fm.cr, 0);
cls_rule_set_reg(&fm.cr, 0, id);
+ fm.new_cookie = htonll(0);
fm.cookie = htonll(0);
fm.cookie_mask = htonll(0);
fm.table_id = TBL_INTERNAL;
}
}
+static void
+get_memory_usage(const struct ofproto *ofproto_, struct simap *usage)
+{
+ const struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
+
+ simap_increase(usage, "facets", hmap_count(&ofproto->facets));
+ simap_increase(usage, "subfacets", hmap_count(&ofproto->subfacets));
+}
+
static void
flush(struct ofproto *ofproto_)
{
assert(max_batch <= FLOW_MISS_MAX_BATCH);
- n_processed = 0;
n_misses = 0;
for (n_processed = 0; n_processed < max_batch; n_processed++) {
struct dpif_upcall *upcall = &misses[n_misses];
run,
run_fast,
wait,
+ get_memory_usage,
flush,
get_features,
get_tables,