* ofproto-dpif implementation. */
extern size_t n_handlers, n_revalidators;
-/* Determines which model to use for handling misses in the ofproto-dpif
- * implementation */
-extern enum ofproto_flow_miss_model flow_miss_model;
-
static inline struct rule *
rule_from_cls_rule(const struct cls_rule *cls_rule)
{
struct ovs_mutex ofproto_mutex = OVS_MUTEX_INITIALIZER;
unsigned ofproto_flow_limit = OFPROTO_FLOW_LIMIT_DEFAULT;
-enum ofproto_flow_miss_model flow_miss_model = OFPROTO_HANDLE_MISS_AUTO;
size_t n_handlers, n_revalidators;
ofproto_flow_limit = limit;
}
-/* Sets the path for handling flow misses. */
-void
-ofproto_set_flow_miss_model(unsigned model)
-{
- flow_miss_model = model;
-}
-
/* If forward_bpdu is true, the NORMAL action will forward frames with
* reserved (e.g. STP) destination Ethernet addresses. if forward_bpdu is false,
* the NORMAL action will drop these frames. */
#define OFPROTO_FLOW_LIMIT_DEFAULT 200000
-/* How flow misses should be handled in ofproto-dpif */
-enum ofproto_flow_miss_model {
- OFPROTO_HANDLE_MISS_AUTO, /* Based on flow eviction threshold. */
- OFPROTO_HANDLE_MISS_WITH_FACETS, /* Always create facets. */
- OFPROTO_HANDLE_MISS_WITHOUT_FACETS /* Always handle without facets.*/
-};
-
const char *ofproto_port_open_type(const char *datapath_type,
const char *port_type);
int ofproto_port_add(struct ofproto *, struct netdev *, ofp_port_t *ofp_portp);
const struct sockaddr_in *, size_t n);
void ofproto_set_in_band_queue(struct ofproto *, int queue_id);
void ofproto_set_flow_limit(unsigned limit);
-void ofproto_set_flow_miss_model(unsigned model);
void ofproto_set_forward_bpdu(struct ofproto *, bool forward_bpdu);
void ofproto_set_mac_table_config(struct ofproto *, unsigned idle_time,
size_t max_entries);
static void bridge_add_ports(struct bridge *,
const struct shash *wanted_ports);
-static void bridge_configure_flow_miss_model(const char *opt);
static void bridge_configure_datapath_id(struct bridge *);
static void bridge_configure_netflow(struct bridge *);
static void bridge_configure_forward_bpdu(struct bridge *);
smap_get_int(&ovs_cfg->other_config, "n-handler-threads", 0),
smap_get_int(&ovs_cfg->other_config, "n-revalidator-threads", 0));
- bridge_configure_flow_miss_model(smap_get(&ovs_cfg->other_config,
- "force-miss-model"));
-
/* Destroy "struct bridge"s, "struct port"s, and "struct iface"s according
* to 'ovs_cfg', with only very minimal configuration otherwise.
*
free(s.lacp_slaves);
}
-static void
-bridge_configure_flow_miss_model(const char *opt)
-{
- enum ofproto_flow_miss_model model = OFPROTO_HANDLE_MISS_AUTO;
-
- if (opt) {
- if (!strcmp(opt, "with-facets")) {
- model = OFPROTO_HANDLE_MISS_WITH_FACETS;
- } else if (!strcmp(opt, "without-facets")) {
- model = OFPROTO_HANDLE_MISS_WITHOUT_FACETS;
- }
- }
-
- ofproto_set_flow_miss_model(model);
-}
-
/* Pick local port hardware address and datapath ID for 'br'. */
static void
bridge_configure_datapath_id(struct bridge *br)
</p>
</column>
- <column name="other_config" key="force-miss-model">
- <p>
- Specifies userspace behaviour for handling flow misses. This takes
- precedence over flow-eviction-threshold.
- </p>
- <p>
- <dl>
- <dt><code>auto</code></dt>
- <dd>Handle automatically based on the flow-eviction-threshold and
- the flow setup governer (default, recommended).</dd>
- <dt><code>with-facets</code></dt>
- <dd>Always create facets. Expensive kernel flow creation and
- statistics tracking is always performed, even on flows with only
- a small number of packets.</dd>
- <dt><code>without-facets</code></dt>
- <dd>Always handle without facets. Forces flow misses to be handled
- in userspace. May cause an increase in CPU usage and packet loss
- on high throughput.</dd>
- </dl>
- </p>
- </column>
-
<column name="other_config" key="n-handler-threads"
type='{"type": "integer", "minInteger": 1}'>
<p>