X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-provider.h;h=d116451bd50dd27962106f019a080d31c605ae28;hb=72310b041cfa7d8e2ee5fb585348223ac7c22497;hp=77ca498cd28ea236782ae28f8597a76b1f5fef67;hpb=b90d6ee54a3dea81da58e6e10640fcd165dfb659;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 77ca498cd..d116451bd 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -398,9 +398,6 @@ struct rule { /* Must hold 'mutex' for both read/write, 'ofproto_mutex' not needed. */ long long int modified OVS_GUARDED; /* Time of last modification. */ - - /* XXX: Currently updated by provider without protection. */ - long long int used OVS_GUARDED; /* Last use; time created if never used. */ }; void ofproto_rule_ref(struct rule *); @@ -467,14 +464,15 @@ void rule_collection_destroy(struct rule_collection *); * ofproto-dpif implementation. */ extern unsigned ofproto_flow_limit; +/* Maximum idle time (in ms) for flows to be cached in the datapath. + * Revalidators may expire flows more quickly than the configured value based + * on system load and other factors. This variable is subject to change. */ +extern unsigned ofproto_max_idle; + /* Number of upcall handler and revalidator threads. Only affects the * 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) { @@ -944,8 +942,9 @@ struct ofproto_class { void (*port_reconfigured)(struct ofport *ofport, enum ofputil_port_config old_config); - /* Looks up a port named 'devname' in 'ofproto'. On success, initializes - * '*port' appropriately. + /* Looks up a port named 'devname' in 'ofproto'. On success, returns 0 and + * initializes '*port' appropriately. Otherwise, returns a positive errno + * value. * * The caller owns the data in 'port' and must free it with * ofproto_port_destroy() when it is no longer needed. */ @@ -1287,7 +1286,7 @@ struct ofproto_class { * in '*byte_count'. UINT64_MAX indicates that the packet count or byte * count is unknown. */ void (*rule_get_stats)(struct rule *rule, uint64_t *packet_count, - uint64_t *byte_count) + uint64_t *byte_count, long long int *used) /* OVS_EXCLUDED(ofproto_mutex) */; /* Applies the actions in 'rule' to 'packet'. (This implements sending