X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto-dpif.c;h=b52d4eeff48c8ca00f0da282d3849b76b3d09bf2;hb=31ef9f5178dee18a40ce609aad406e925411eb06;hp=4df12c8bcd8fc1cd4e195b9708b760f6dc96f9dc;hpb=448c2fa80c7ef9358179a0cdc68cf1feca782e6d;p=sliver-openvswitch.git diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 4df12c8bc..b52d4eeff 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3878,7 +3878,7 @@ subfacet_max_idle(const struct dpif_backer *backer) * pass made by update_stats(), because the former function never looks at * uninstallable subfacets. */ - enum { BUCKET_WIDTH = ROUND_UP(100, TIME_UPDATE_INTERVAL) }; + enum { BUCKET_WIDTH = 100 }; enum { N_BUCKETS = 5000 / BUCKET_WIDTH }; int buckets[N_BUCKETS] = { 0 }; int total, subtotal, bucket; @@ -4836,7 +4836,7 @@ bool rule_dpif_lookup_in_table(struct ofproto_dpif *ofproto, const struct flow *flow, struct flow_wildcards *wc, uint8_t table_id, struct rule_dpif **rule) - OVS_TRY_RDLOCK(true, (*rule)->up.evict) + OVS_TRY_RDLOCK(true, (*rule)->up.rwlock) { struct cls_rule *cls_rule; struct classifier *cls; @@ -4871,7 +4871,7 @@ rule_dpif_lookup_in_table(struct ofproto_dpif *ofproto, } *rule = rule_dpif_cast(rule_from_cls_rule(cls_rule)); - if (*rule && ovs_rwlock_tryrdlock(&(*rule)->up.evict)) { + if (*rule && ovs_rwlock_tryrdlock(&(*rule)->up.rwlock)) { /* The rule is in the process of being removed. Best we can do is * pretend it isn't there. */ *rule = NULL; @@ -4890,7 +4890,7 @@ choose_miss_rule(enum ofputil_port_config config, struct rule_dpif *miss_rule, OVS_NO_THREAD_SAFETY_ANALYSIS { *rule = config & OFPUTIL_PC_NO_PACKET_IN ? no_packet_in_rule : miss_rule; - ovs_rwlock_rdlock(&(*rule)->up.evict); + ovs_rwlock_rdlock(&(*rule)->up.rwlock); } void @@ -4898,7 +4898,7 @@ rule_dpif_release(struct rule_dpif *rule) OVS_NO_THREAD_SAFETY_ANALYSIS { if (rule) { - ovs_rwlock_unlock(&rule->up.evict); + ovs_rwlock_unlock(&rule->up.rwlock); } }