Lines Matching defs:node
95 graph_node_add(struct graph *graph, struct node *node)
102 if (strncmp(node->name, graph_node->node->name,
106 /* Allocate new graph node object */
107 sz = sizeof(*graph_node) + node->nb_edges * sizeof(struct node *);
112 node->name);
114 /* Initialize the graph node */
115 graph_node->node = node;
117 /* Add to graph node list */
127 node_to_graph_node(struct graph *graph, struct node *node)
132 if (graph_node->node == node)
135 SET_ERR_JMP(ENODEV, fail, "Found isolated node %s", node->name);
144 struct node *adjacency;
149 for (i = 0; i < graph_node->node->nb_edges; i++) {
150 next = graph_node->node->next_nodes[i];
168 struct node *adjacency;
173 for (i = 0; i < graph_node->node->nb_edges; i++) {
174 next = graph_node->node->next_nodes[i];
196 struct node *node;
199 STAILQ_FOREACH(node, node_head, next) {
200 if (fnmatch(pattern, node->name, 0) == 0) {
201 if (graph_node_add(graph, node))
207 SET_ERR_JMP(EFAULT, fail, "Pattern %s node not found", pattern);
234 if (graph_node->node->init) {
235 name = graph_node->node->name;
236 rc = graph_node->node->init(
256 if (graph_node->node->fini)
257 graph_node->node->fini(
260 graph_node->node->name));
266 struct rte_node *node;
267 struct node *node_db;
272 rte_graph_foreach_node(count, off, graph, node) {
273 if (node->parent_id == RTE_NODE_ID_INVALID) /* Static node */
274 name = node->name;
275 else /* Cloned node */
276 name = node->parent;
283 node->process = graph_pcap_dispatch;
284 node->original_process = node_db->process;
286 node->process = node_db->process;
312 if ((graph_node->node->flags & RTE_NODE_SOURCE_F) &&
313 (graph_node->node->lcore_id == RTE_MAX_LCORE ||
314 graph->lcore_id == graph_node->node->lcore_id))
341 /* check the availability of source node */
415 /* Expand node pattern and add the nodes to the graph */
430 /* Make sure at least a source node present in the graph */
435 /* Make sure no node is pointing to source node */
439 /* Don't allow node has loop to self */
531 /* Don't allow to clone a node from a cloned graph */
540 /* Naming ceremony of the new graph. name is node->name + "-" + name */
552 if (graph_node_add(graph, graph_node->node))
646 struct rte_node *node;
656 node) {
657 if (node->id == nid)
658 return node;
669 struct rte_node *node;
677 node) {
678 if (!strncmp(node->name, node_name,
680 return node;
689 __rte_node_stream_alloc(struct rte_graph *graph, struct rte_node *node)
691 uint16_t size = node->size;
696 node->objs = rte_realloc_socket(node->objs, size * sizeof(void *),
698 RTE_VERIFY(node->objs);
699 node->size = size;
700 node->realloc_count++;
704 __rte_node_stream_alloc_size(struct rte_graph *graph, struct rte_node *node,
707 uint16_t size = node->size;
712 node->objs = rte_realloc_socket(node->objs, size * sizeof(void *),
714 RTE_VERIFY(node->objs);
715 node->size = size;
716 node->realloc_count++;
737 node_name = graph_node->node->name;
742 if (graph_node->node->flags & RTE_NODE_SOURCE_F) {
747 } else if (graph_node->node->nb_edges == 0) {
755 for (i = 0; i < graph_node->node->nb_edges; i++) {
757 if (graph_node->adjacency_list[i]->node->nb_edges == 0)
760 graph_node->adjacency_list[i]->node->name,