X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-provider.h;h=9fb5effdea0666e393e3e741080f01a900c5ab86;hb=1745cd08c93adaa11268526309addefd51604394;hp=2d647fe3ccc0581a771e36dbe5552c06aad6f7db;hpb=1eae3d335aad4119c6c50fbac9bf810a86886924;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h index 2d647fe3c..9fb5effde 100644 --- a/ofproto/ofproto-provider.h +++ b/ofproto/ofproto-provider.h @@ -136,8 +136,9 @@ struct rule { long long int created; /* Creation time. */ long long int modified; /* Time of last modification. */ - uint16_t idle_timeout; /* In seconds from time of last use. */ - uint16_t hard_timeout; /* In seconds from last modification. */ + long long int used; /* Last use; time created if never used. */ + uint16_t hard_timeout; /* In seconds from ->modified. */ + uint16_t idle_timeout; /* In seconds from ->used. */ uint8_t table_id; /* Index in ofproto's 'tables' array. */ bool send_flow_removed; /* Send a flow removed message? */ @@ -151,6 +152,7 @@ rule_from_cls_rule(const struct cls_rule *cls_rule) return cls_rule ? CONTAINER_OF(cls_rule, struct rule, cr) : NULL; } +void ofproto_rule_update_used(struct rule *, long long int used); void ofproto_rule_expire(struct rule *, uint8_t reason); void ofproto_rule_destroy(struct rule *);