Use new method to describe table entries in OpenFlow wire protocol.
[openvswitch] / switch / table-hash.c
index 3e3cb76826ed6fed5829c25f7e1b1cc1073d55de..46060a2b250d03ebc954627870fd95db38b03f4f 100644 (file)
@@ -198,7 +198,8 @@ static void table_hash_stats(struct sw_table *swt,
 {
     struct sw_table_hash *th = (struct sw_table_hash *) swt;
     stats->name = "hash";
-    stats->n_flows = th->n_flows;
+    stats->wildcards = 0;        /* No wildcards are supported. */
+    stats->n_flows   = th->n_flows;
     stats->max_flows = th->bucket_mask + 1;
     stats->n_matched = swt->n_matched;
 }
@@ -212,6 +213,7 @@ struct sw_table *table_hash_create(unsigned int polynomial,
     th = malloc(sizeof *th);
     if (th == NULL)
         return NULL;
+    memset(th, '\0', sizeof *th);
 
     assert(!(n_buckets & (n_buckets - 1)));
     th->buckets = calloc(n_buckets, sizeof *th->buckets);
@@ -322,7 +324,8 @@ static void table_hash2_stats(struct sw_table *swt,
     for (i = 0; i < 2; i++)
         table_hash_stats(t2->subtable[i], &substats[i]);
     stats->name = "hash2";
-    stats->n_flows = substats[0].n_flows + substats[1].n_flows;
+    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_matched = swt->n_matched;
 }
@@ -337,6 +340,7 @@ struct sw_table *table_hash2_create(unsigned int poly0, unsigned int buckets0,
     t2 = malloc(sizeof *t2);
     if (t2 == NULL)
         return NULL;
+    memset(t2, '\0', sizeof *t2);
 
     t2->subtable[0] = table_hash_create(poly0, buckets0);
     if (t2->subtable[0] == NULL)