ofproto-dpif: Push statistics in rule_get_stats().
[sliver-openvswitch.git] / ofproto / ofproto-dpif.c
index 18c5b7d..b8db91d 100644 (file)
@@ -5425,9 +5425,14 @@ rule_destruct(struct rule *rule_)
 static void
 rule_get_stats(struct rule *rule_, uint64_t *packets, uint64_t *bytes)
 {
+    struct ofproto_dpif *ofproto = ofproto_dpif_cast(rule_->ofproto);
     struct rule_dpif *rule = rule_dpif_cast(rule_);
     struct facet *facet;
 
+    HMAP_FOR_EACH (facet, hmap_node, &ofproto->facets) {
+        facet_push_stats(facet);
+    }
+
     /* Start from historical data for 'rule' itself that are no longer tracked
      * in facets.  This counts, for example, facets that have expired. */
     *packets = rule->packet_count;