datapath: allocate nr_node_ids flow_stats instead of num_possible_nodes
[cascardo/ovs.git] / datapath / flow_table.c
index 409f9dd..c76f2a1 100644 (file)
@@ -988,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)