DPDK
22.11.6
|
#include <rte_compat.h>
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_memcpy.h>
#include <rte_memory.h>
#include "rte_graph.h"
Go to the source code of this file.
Functions | |
static __rte_experimental void | rte_graph_walk (struct rte_graph *graph) |
static __rte_experimental void | rte_node_enqueue (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, void **objs, uint16_t nb_objs) |
static __rte_experimental void | rte_node_enqueue_x1 (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, void *obj) |
static __rte_experimental void | rte_node_enqueue_x2 (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, void *obj0, void *obj1) |
static __rte_experimental void | rte_node_enqueue_x4 (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, void *obj0, void *obj1, void *obj2, void *obj3) |
static __rte_experimental void | rte_node_enqueue_next (struct rte_graph *graph, struct rte_node *node, rte_edge_t *nexts, void **objs, uint16_t nb_objs) |
static __rte_experimental void ** | rte_node_next_stream_get (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, uint16_t nb_objs) |
static __rte_experimental void | rte_node_next_stream_put (struct rte_graph *graph, struct rte_node *node, rte_edge_t next, uint16_t idx) |
static __rte_experimental void | rte_node_next_stream_move (struct rte_graph *graph, struct rte_node *src, rte_edge_t next) |
This API allows a worker thread to walk over a graph and nodes to create, process, enqueue and move streams of objects to the next nodes.
Definition in file rte_graph_worker.h.
|
inlinestatic |
Perform graph walk on the circular buffer and invoke the process function of the nodes and collect the stats.
graph | Graph pointer returned from rte_graph_lookup function. |
Definition at line 133 of file rte_graph_worker.h.
|
inlinestatic |
Enqueue the objs to next node for further processing and set the next node to pending state in the circular buffer.
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index to enqueue objs. |
objs | Objs to enqueue. |
nb_objs | Number of objs to enqueue. |
Definition at line 272 of file rte_graph_worker.h.
|
inlinestatic |
Enqueue only one obj to next node for further processing and set the next node to pending state in the circular buffer.
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index to enqueue objs. |
obj | Obj to enqueue. |
Definition at line 299 of file rte_graph_worker.h.
|
inlinestatic |
Enqueue only two objs to next node for further processing and set the next node to pending state in the circular buffer. Same as rte_node_enqueue_x1 but enqueue two objs.
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index to enqueue objs. |
obj0 | Obj to enqueue. |
obj1 | Obj to enqueue. |
Definition at line 329 of file rte_graph_worker.h.
|
inlinestatic |
Enqueue only four objs to next node for further processing and set the next node to pending state in the circular buffer. Same as rte_node_enqueue_x1 but enqueue four objs.
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index to enqueue objs. |
obj0 | 1st obj to enqueue. |
obj1 | 2nd obj to enqueue. |
obj2 | 3rd obj to enqueue. |
obj3 | 4th obj to enqueue. |
Definition at line 364 of file rte_graph_worker.h.
|
inlinestatic |
Enqueue objs to multiple next nodes for further processing and set the next nodes to pending state in the circular buffer. objs[i] will be enqueued to nexts[i].
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
nexts | List of relative next node indices to enqueue objs. |
objs | List of objs to enqueue. |
nb_objs | Number of objs to enqueue. |
Definition at line 398 of file rte_graph_worker.h.
|
inlinestatic |
Get the stream of next node to enqueue the objs. Once done with the updating the objs, needs to call rte_node_next_stream_put to put the next node to pending state.
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index to get stream. |
nb_objs | Requested free size of the next stream. |
Definition at line 428 of file rte_graph_worker.h.
|
inlinestatic |
Put the next stream to pending state in the circular buffer for further processing. Should be invoked after rte_node_next_stream_get().
graph | Graph pointer returned from rte_graph_lookup(). |
node | Current node pointer. |
next | Relative next node index.. |
idx | Number of objs updated in the stream after getting the stream using rte_node_next_stream_get. |
Definition at line 459 of file rte_graph_worker.h.
|
inlinestatic |
Home run scenario, Enqueue all the objs of current node to next node in optimized way by swapping the streams of both nodes. Performs good when next node is already not in pending state. If next node is already in pending state then normal enqueue will be used.
graph | Graph pointer returned from rte_graph_lookup(). |
src | Current node pointer. |
next | Relative next node index. |
Definition at line 488 of file rte_graph_worker.h.