Added lookup count to ofp_table_stats.
[openvswitch] / switch / table-hash.c
index 0960082b3cc2cfb8642247925cb75349412df1e9..d342eeb7e3543357bef6b000ed3d2493c62e4f6f 100644 (file)
@@ -233,6 +233,7 @@ static void table_hash_stats(struct sw_table *swt,
     stats->wildcards = 0;        /* No wildcards are supported. */
     stats->n_flows   = th->n_flows;
     stats->max_flows = th->bucket_mask + 1;
+    stats->n_lookup  = swt->n_lookup;
     stats->n_matched = swt->n_matched;
 }
 
@@ -371,6 +372,7 @@ static void table_hash2_stats(struct sw_table *swt,
     stats->wildcards = 0;        /* No wildcards are supported. */
     stats->n_flows   = substats[0].n_flows + substats[1].n_flows;
     stats->max_flows = substats[0].max_flows + substats[1].max_flows;
+    stats->n_lookup  = swt->n_lookup;
     stats->n_matched = swt->n_matched;
 }