#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"
static uint32_t vsp_realdev_to_vlandev(const struct ofproto_dpif *,
uint32_t realdev, ovs_be16 vlan_tci);
-static uint16_t vsp_vlandev_to_realdev(const struct ofproto_dpif *,
- uint16_t vlandev, int *vid);
static bool vsp_adjust_flow(const struct ofproto_dpif *, struct flow *);
static void vsp_remove(struct ofport_dpif *);
static void vsp_add(struct ofport_dpif *, uint16_t realdev_ofp_port, int vid);
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,