Lines Matching defs:stats
185 struct rte_graph_cluster_stats *stats;
205 stats = realloc(NULL, sz);
206 if (stats) {
207 memset(stats, 0, sz);
208 stats->fn = fn;
209 stats->cluster_node_size = cluster_node_size;
210 stats->max_nodes = 0;
211 stats->socket_id = socket_id;
212 stats->cookie = prm->cookie;
213 stats->sz = sz;
216 return stats;
223 struct rte_graph_cluster_stats *stats = *stats_in;
230 cluster = stats->clusters;
233 for (count = 0; count < stats->max_nodes; count++) {
246 cluster = RTE_PTR_ADD(cluster, stats->cluster_node_size);
250 stats = realloc(stats, stats->sz + stats->cluster_node_size);
251 if (stats == NULL)
256 cluster = RTE_PTR_ADD(stats, stats->sz),
257 memset(cluster, 0, stats->cluster_node_size);
270 RTE_CACHE_LINE_SIZE, stats->socket_id);
277 RTE_CACHE_LINE_SIZE, stats->socket_id);
297 stats->sz += stats->cluster_node_size;
298 stats->max_nodes++;
299 *stats_in = stats;
303 free(stats);
309 stats_mem_fini(struct rte_graph_cluster_stats *stats)
311 free(stats);
381 struct rte_graph_cluster_stats *stats, *rc = NULL;
408 /* Alloc the stats memory */
409 stats = stats_mem_init(&cluster, prm);
410 if (stats == NULL)
411 SET_ERR_JMP(ENOMEM, bad_pattern, "Failed alloc stats memory");
418 if (stats_mem_populate(&stats, graph_fp, graph_node))
422 stats->dispatch = true;
426 rc = rte_malloc_socket(NULL, stats->sz, 0, stats->socket_id);
428 rte_memcpy(rc, stats, stats->sz);
433 stats_mem_fini(stats);