Lines Matching defs:node

57 	rte_graph_off_t nodes_start; /**< Offset at which node memory starts. */
90 * Data structure to hold node data.
95 rte_graph_off_t next; /**< Index to next node. */
98 rte_edge_t nb_edges; /**< Number of edges from this node. */
101 char parent[RTE_NODE_NAMESIZE]; /**< Parent node name. */
102 char name[RTE_NODE_NAMESIZE]; /**< Name of the node. */
132 rte_graph_off_t off; /**< Offset of node in the graph reel. */
133 uint64_t total_cycles; /**< Cycles spent in this node. */
134 uint64_t total_calls; /**< Calls done to this node. */
135 uint64_t total_objs; /**< Objects processed by this node. */
160 * @param node
161 * Pointer to the node object.
163 void __rte_node_stream_alloc(struct rte_graph *graph, struct rte_node *node);
174 * @param node
175 * Pointer to the node object.
180 struct rte_node *node, uint16_t req_size);
187 * Enqueue a given node to the tail of the graph reel.
191 * @param node
192 * Pointer to node object to be enqueued.
195 __rte_node_process(struct rte_graph *graph, struct rte_node *node)
201 RTE_ASSERT(node->fence == RTE_GRAPH_FENCE);
202 objs = node->objs;
207 rc = node->process(graph, node, objs, node->idx);
208 node->total_cycles += rte_rdtsc() - start;
209 node->total_calls++;
210 node->total_objs += rc;
212 node->process(graph, node, objs, node->idx);
214 node->idx = 0;
220 * Enqueue a given node to the tail of the graph reel.
224 * @param node
225 * Pointer to node object to be enqueued.
228 __rte_node_enqueue_tail_update(struct rte_graph *graph, struct rte_node *node)
233 graph->cir_start[tail++] = node->off;
242 * Updates the node to tail of graph reel and resizes the number of objects
247 * @param node
248 * Pointer to the node object.
255 __rte_node_enqueue_prologue(struct rte_graph *graph, struct rte_node *node,
259 /* Add to the pending stream list if the node is new */
261 __rte_node_enqueue_tail_update(graph, node);
263 if (unlikely(node->size < (idx + space)))
264 __rte_node_stream_alloc_size(graph, node, node->size + space);
270 * Get the node pointer from current node edge id.
272 * @param node
273 * Current node pointer.
275 * Edge id of the required node.
278 * Pointer to the node denoted by the edge id.
281 __rte_node_next_node_get(struct rte_node *node, rte_edge_t next)
283 RTE_ASSERT(next < node->nb_edges);
284 RTE_ASSERT(node->fence == RTE_GRAPH_FENCE);
285 node = node->nodes[next];
286 RTE_ASSERT(node->fence == RTE_GRAPH_FENCE);
288 return node;
292 * Enqueue the objs to next node for further processing and set
293 * the next node to pending state in the circular buffer.
297 * @param node
298 * Current node pointer.
300 * Relative next node index to enqueue objs.
307 rte_node_enqueue(struct rte_graph *graph, struct rte_node *node,
310 node = __rte_node_next_node_get(node, next);
311 const uint16_t idx = node->idx;
313 __rte_node_enqueue_prologue(graph, node, idx, nb_objs);
315 rte_memcpy(&node->objs[idx], objs, nb_objs * sizeof(void *));
316 node->idx = idx + nb_objs;
320 * Enqueue only one obj to next node for further processing and
321 * set the next node to pending state in the circular buffer.
325 * @param node
326 * Current node pointer.
328 * Relative next node index to enqueue objs.
333 rte_node_enqueue_x1(struct rte_graph *graph, struct rte_node *node,
336 node = __rte_node_next_node_get(node, next);
337 uint16_t idx = node->idx;
339 __rte_node_enqueue_prologue(graph, node, idx, 1);
341 node->objs[idx++] = obj;
342 node->idx = idx;
346 * Enqueue only two objs to next node for further processing and
347 * set the next node to pending state in the circular buffer.
352 * @param node
353 * Current node pointer.
355 * Relative next node index to enqueue objs.
362 rte_node_enqueue_x2(struct rte_graph *graph, struct rte_node *node,
365 node = __rte_node_next_node_get(node, next);
366 uint16_t idx = node->idx;
368 __rte_node_enqueue_prologue(graph, node, idx, 2);
370 node->objs[idx++] = obj0;
371 node->objs[idx++] = obj1;
372 node->idx = idx;
376 * Enqueue only four objs to next node for further processing and
377 * set the next node to pending state in the circular buffer.
382 * @param node
383 * Current node pointer.
385 * Relative next node index to enqueue objs.
396 rte_node_enqueue_x4(struct rte_graph *graph, struct rte_node *node,
400 node = __rte_node_next_node_get(node, next);
401 uint16_t idx = node->idx;
403 __rte_node_enqueue_prologue(graph, node, idx, 4);
405 node->objs[idx++] = obj0;
406 node->objs[idx++] = obj1;
407 node->objs[idx++] = obj2;
408 node->objs[idx++] = obj3;
409 node->idx = idx;
419 * @param node
420 * Current node pointer.
422 * List of relative next node indices to enqueue objs.
429 rte_node_enqueue_next(struct rte_graph *graph, struct rte_node *node,
435 rte_node_enqueue_x1(graph, node, nexts[i], objs[i]);
439 * Get the stream of next node to enqueue the objs.
441 * rte_node_next_stream_put to put the next node to pending state.
445 * @param node
446 * Current node pointer.
448 * Relative next node index to get stream.
458 rte_node_next_stream_get(struct rte_graph *graph, struct rte_node *node,
461 node = __rte_node_next_node_get(node, next);
462 const uint16_t idx = node->idx;
463 uint16_t free_space = node->size - idx;
466 __rte_node_stream_alloc_size(graph, node, node->size + nb_objs);
468 return &node->objs[idx];
477 * @param node
478 * Current node pointer.
480 * Relative next node index..
488 rte_node_next_stream_put(struct rte_graph *graph, struct rte_node *node,
494 node = __rte_node_next_node_get(node, next);
495 if (node->idx == 0)
496 __rte_node_enqueue_tail_update(graph, node);
498 node->idx += idx;
502 * Home run scenario, Enqueue all the objs of current node to next
503 * node in optimized way by swapping the streams of both nodes.
504 * Performs good when next node is already not in pending state.
505 * If next node is already in pending state then normal enqueue
511 * Current node pointer.
513 * Relative next node index.
531 } else { /* Move the objects from src node to dst node */
595 * Increment the count of an xstat for a given node.
597 * @param node
598 * Pointer to the node.
606 rte_node_xstat_increment(struct rte_node *node, uint16_t xstat_id, uint64_t value)
609 uint64_t *xstat = (uint64_t *)RTE_PTR_ADD(node, node->xstat_off);