datapath: Revert "datapath: Constify netlink structs."
[cascardo/ovs.git] / datapath / flow_table.c
index 311e5ee..c76f2a1 100644 (file)
@@ -92,6 +92,8 @@ struct sw_flow *ovs_flow_alloc(void)
 
        flow->sf_acts = NULL;
        flow->mask = NULL;
+       flow->id.ufid_len = 0;
+       flow->id.unmasked_key = NULL;
        flow->stats_last_writer = NUMA_NO_NODE;
 
        /* Initialize the default stat node. */
@@ -531,8 +533,8 @@ static bool flow_cmp_masked_key(const struct sw_flow *flow,
        return cmp_key(&flow->key, key, range->start, range->end);
 }
 
-bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
-                              const struct sw_flow_match *match)
+static bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
+                                     const struct sw_flow_match *match)
 {
        struct sw_flow_key *key = match->key;
        int key_start = flow_key_start(key);
@@ -986,7 +988,7 @@ int ovs_flow_init(void)
        BUILD_BUG_ON(sizeof(struct sw_flow_key) % sizeof(long));
 
        flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow)
-                                      + (num_possible_nodes()
+                                      + (nr_node_ids
                                          * sizeof(struct flow_stats *)),
                                       0, 0, NULL);
        if (flow_cache == NULL)