.TH "rte_pipeline.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_pipeline.h
.SH SYNOPSIS
.br
.PP
\fR#include <stdint\&.h>\fP
.br
\fR#include <rte_port\&.h>\fP
.br
\fR#include <rte_table\&.h>\fP
.br
\fR#include <rte_common\&.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_pipeline_params\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_port_in_stats\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_port_out_stats\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_table_stats\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_table_entry\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_table_params\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_port_in_params\fP"
.br
.ti -1c
.RI "struct \fBrte_pipeline_port_out_params\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_PIPELINE_TABLE_MAX\fP   64"
.br
.ti -1c
.RI "#define \fBRTE_PIPELINE_PORT_IN_MAX\fP   64"
.br
.ti -1c
.RI "#define \fBRTE_PIPELINE_PORT_OUT_MAX\fP   64"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "\fBtypedef\fP int(* \fBrte_pipeline_table_action_handler_hit\fP) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, struct \fBrte_pipeline_table_entry\fP **entries, void *arg)"
.br
.ti -1c
.RI "\fBtypedef\fP int(* \fBrte_pipeline_table_action_handler_miss\fP) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, struct \fBrte_pipeline_table_entry\fP *entry, void *arg)"
.br
.ti -1c
.RI "\fBtypedef\fP int(* \fBrte_pipeline_port_in_action_handler\fP) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint32_t n, void *arg)"
.br
.ti -1c
.RI "\fBtypedef\fP int(* \fBrte_pipeline_port_out_action_handler\fP) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, void *arg)"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBrte_pipeline_action\fP { \fBRTE_PIPELINE_ACTION_DROP\fP = 0, \fBRTE_PIPELINE_ACTION_PORT\fP, \fBRTE_PIPELINE_ACTION_PORT_META\fP, \fBRTE_PIPELINE_ACTION_TABLE\fP, \fBRTE_PIPELINE_ACTIONS\fP }"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "struct rte_pipeline * \fBrte_pipeline_create\fP (struct \fBrte_pipeline_params\fP *params)"
.br
.ti -1c
.RI "int \fBrte_pipeline_free\fP (struct rte_pipeline *p)"
.br
.ti -1c
.RI "int \fBrte_pipeline_check\fP (struct rte_pipeline *p)"
.br
.ti -1c
.RI "int \fBrte_pipeline_run\fP (struct rte_pipeline *p)"
.br
.ti -1c
.RI "int \fBrte_pipeline_flush\fP (struct rte_pipeline *p)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_create\fP (struct rte_pipeline *p, struct \fBrte_pipeline_table_params\fP *params, uint32_t *table_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_default_entry_add\fP (struct rte_pipeline *p, uint32_t table_id, struct \fBrte_pipeline_table_entry\fP *default_entry, struct \fBrte_pipeline_table_entry\fP **default_entry_ptr)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_default_entry_delete\fP (struct rte_pipeline *p, uint32_t table_id, struct \fBrte_pipeline_table_entry\fP *entry)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_entry_add\fP (struct rte_pipeline *p, uint32_t table_id, void *key, struct \fBrte_pipeline_table_entry\fP *entry, int *key_found, struct \fBrte_pipeline_table_entry\fP **entry_ptr)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_entry_delete\fP (struct rte_pipeline *p, uint32_t table_id, void *key, int *key_found, struct \fBrte_pipeline_table_entry\fP *entry)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_entry_add_bulk\fP (struct rte_pipeline *p, uint32_t table_id, void **keys, struct \fBrte_pipeline_table_entry\fP **entries, uint32_t n_keys, int *key_found, struct \fBrte_pipeline_table_entry\fP **entries_ptr)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_entry_delete_bulk\fP (struct rte_pipeline *p, uint32_t table_id, void **keys, uint32_t n_keys, int *key_found, struct \fBrte_pipeline_table_entry\fP **entries)"
.br
.ti -1c
.RI "int \fBrte_pipeline_table_stats_read\fP (struct rte_pipeline *p, uint32_t table_id, struct \fBrte_pipeline_table_stats\fP *stats, int clear)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_in_create\fP (struct rte_pipeline *p, struct \fBrte_pipeline_port_in_params\fP *params, uint32_t *port_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_in_connect_to_table\fP (struct rte_pipeline *p, uint32_t port_id, uint32_t table_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_in_enable\fP (struct rte_pipeline *p, uint32_t port_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_in_disable\fP (struct rte_pipeline *p, uint32_t port_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_in_stats_read\fP (struct rte_pipeline *p, uint32_t port_id, struct \fBrte_pipeline_port_in_stats\fP *stats, int clear)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_out_create\fP (struct rte_pipeline *p, struct \fBrte_pipeline_port_out_params\fP *params, uint32_t *port_id)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_out_stats_read\fP (struct rte_pipeline *p, uint32_t port_id, struct \fBrte_pipeline_port_out_stats\fP *stats, int clear)"
.br
.ti -1c
.RI "int \fBrte_pipeline_port_out_packet_insert\fP (struct rte_pipeline *p, uint32_t port_id, struct \fBrte_mbuf\fP *pkt)"
.br
.ti -1c
.RI "int \fBrte_pipeline_ah_packet_hijack\fP (struct rte_pipeline *p, uint64_t pkts_mask)"
.br
.ti -1c
.RI "int \fBrte_pipeline_ah_packet_drop\fP (struct rte_pipeline *p, uint64_t pkts_mask)"
.br
.in -1c
.SH "Detailed Description"
.PP 
RTE Pipeline

.PP
This tool is part of the DPDK Packet Framework tool suite and provides a standard methodology (logically similar to OpenFlow) for rapid development of complex packet processing pipelines out of ports, tables and actions\&.

.PP
\fBBasic operation\&.\fP A pipeline is constructed by connecting its input ports to its output ports through a chain of lookup tables\&. As result of lookup operation into the current table, one of the table entries (or the default table entry, in case of lookup miss) is identified to provide the actions to be executed on the current packet and the associated action meta-data\&. The behavior of user actions is defined through the configurable table action handler, while the reserved actions define the next hop for the current packet (either another table, an output port or packet drop) and are handled transparently by the framework\&.

.PP
\fBInitialization and run-time flows\&.\fP Once all the pipeline elements (input ports, tables, output ports) have been created, input ports connected to tables, table action handlers configured, tables populated with the initial set of entries (actions and action meta-data) and input ports enabled, the pipeline runs automatically, pushing packets from input ports to tables and output ports\&. At each table, the identified user actions are being executed, resulting in action meta-data (stored in the table entry) and packet meta-data (stored with the packet descriptor) being updated\&. The pipeline tables can have further updates and input ports can be disabled or enabled later on as required\&.

.PP
\fBMulti-core scaling\&.\fP Typically, each CPU core will run its own pipeline instance\&. Complex application-level pipelines can be implemented by interconnecting multiple CPU core-level pipelines in tree-like topologies, as the same port devices (e\&.g\&. SW rings) can serve as output ports for the pipeline running on CPU core A, as well as input ports for the pipeline running on CPU core B\&. This approach enables the application development using the pipeline (CPU cores connected serially), cluster/run-to-completion (CPU cores connected in parallel) or mixed (pipeline of CPU core clusters) programming models\&.

.PP
\fBThread safety\&.\fP It is possible to have multiple pipelines running on the same CPU core, but it is not allowed (for thread safety reasons) to have multiple CPU cores running the same pipeline instance\&. 
.PP
Definition in file \fBrte_pipeline\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define RTE_PIPELINE_TABLE_MAX   64"
Maximum number of tables allowed for any given pipeline instance\&. The value of this parameter cannot be changed\&. 
.PP
Definition at line \fB200\fP of file \fBrte_pipeline\&.h\fP\&.
.SS "#define RTE_PIPELINE_PORT_IN_MAX   64"
Maximum number of input ports allowed for any given pipeline instance\&. The value of this parameter cannot be changed\&. 
.PP
Definition at line \fB531\fP of file \fBrte_pipeline\&.h\fP\&.
.SS "#define RTE_PIPELINE_PORT_OUT_MAX   64"
Maximum number of output ports allowed for any given pipeline instance\&. The value of this parameter cannot be changed\&. 
.PP
Definition at line \fB662\fP of file \fBrte_pipeline\&.h\fP\&.
.SH "Typedef Documentation"
.PP 
.SS "\fBtypedef\fP int(* rte_pipeline_table_action_handler_hit) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, struct \fBrte_pipeline_table_entry\fP **entries, void *arg)"
Pipeline table action handler on lookup hit

.PP
The action handler can decide to drop packets by resetting the associated packet bit in the pkts_mask parameter\&. In this case, the action handler is required not to free the packet buffer, which will be freed eventually by the pipeline\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts\fP Burst of input packets specified as array of up to 64 pointers to struct \fBrte_mbuf\fP 
.br
\fIpkts_mask\fP 64-bit bitmask specifying which packets in the input burst are valid\&. When pkts_mask bit n is set, then element n of pkts array is pointing to a valid packet and element n of entries array is pointing to a valid table entry associated with the packet, with the association typically done by the table lookup operation\&. Otherwise, element n of pkts array and element n of entries array will not be accessed\&. 
.br
\fIentries\fP Set of table entries specified as array of up to 64 pointers to struct \fBrte_pipeline_table_entry\fP 
.br
\fIarg\fP Opaque parameter registered by the user at the pipeline table creation time 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.PP
Definition at line \fB255\fP of file \fBrte_pipeline\&.h\fP\&.
.SS "\fBtypedef\fP int(* rte_pipeline_table_action_handler_miss) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, struct \fBrte_pipeline_table_entry\fP *entry, void *arg)"
Pipeline table action handler on lookup miss

.PP
The action handler can decide to drop packets by resetting the associated packet bit in the pkts_mask parameter\&. In this case, the action handler is required not to free the packet buffer, which will be freed eventually by the pipeline\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts\fP Burst of input packets specified as array of up to 64 pointers to struct \fBrte_mbuf\fP 
.br
\fIpkts_mask\fP 64-bit bitmask specifying which packets in the input burst are valid\&. When pkts_mask bit n is set, then element n of pkts array is pointing to a valid packet\&. Otherwise, element n of pkts array will not be accessed\&. 
.br
\fIentry\fP Single table entry associated with all the valid packets from the input burst, specified as pointer to struct \fBrte_pipeline_table_entry\fP\&. This entry is the pipeline table default entry that is associated by the table lookup operation with the input packets that have resulted in lookup miss\&. 
.br
\fIarg\fP Opaque parameter registered by the user at the pipeline table creation time 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.PP
Definition at line \fB291\fP of file \fBrte_pipeline\&.h\fP\&.
.SS "\fBtypedef\fP int(* rte_pipeline_port_in_action_handler) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint32_t n, void *arg)"
Pipeline input port action handler

.PP
The action handler can decide to drop packets by resetting the associated packet bit in the pkts_mask parameter\&. In this case, the action handler is required not to free the packet buffer, which will be freed eventually by the pipeline\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts\fP Burst of input packets specified as array of up to 64 pointers to struct \fBrte_mbuf\fP 
.br
\fIn\fP Number of packets in the input burst\&. This parameter specifies that elements 0 to (n-1) of pkts array are valid\&. 
.br
\fIarg\fP Opaque parameter registered by the user at the pipeline table creation time 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.PP
Definition at line \fB555\fP of file \fBrte_pipeline\&.h\fP\&.
.SS "\fBtypedef\fP int(* rte_pipeline_port_out_action_handler) (struct rte_pipeline *p, struct \fBrte_mbuf\fP **pkts, uint64_t pkts_mask, void *arg)"
Pipeline output port action handler

.PP
The action handler can decide to drop packets by resetting the associated packet bit in the pkts_mask parameter\&. In this case, the action handler is required not to free the packet buffer, which will be freed eventually by the pipeline\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts\fP Burst of input packets specified as array of up to 64 pointers to struct \fBrte_mbuf\fP 
.br
\fIpkts_mask\fP 64-bit bitmask specifying which packets in the input burst are valid\&. When pkts_mask bit n is set, then element n of pkts array is pointing to a valid packet\&. Otherwise, element n of pkts array will not be accessed\&. 
.br
\fIarg\fP Opaque parameter registered by the user at the pipeline table creation time 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.PP
Definition at line \fB687\fP of file \fBrte_pipeline\&.h\fP\&.
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBrte_pipeline_action\fP"
Reserved actions 
.PP
\fBEnumerator\fP
.in +1c
.TP
\f(BIRTE_PIPELINE_ACTION_DROP \fP
Drop the packet 
.TP
\f(BIRTE_PIPELINE_ACTION_PORT \fP
Send packet to output port 
.TP
\f(BIRTE_PIPELINE_ACTION_PORT_META \fP
Send packet to output port read from packet meta-data 
.TP
\f(BIRTE_PIPELINE_ACTION_TABLE \fP
Send packet to table 
.TP
\f(BIRTE_PIPELINE_ACTIONS \fP
Number of reserved actions 
.PP
Definition at line \fB178\fP of file \fBrte_pipeline\&.h\fP\&.
.SH "Function Documentation"
.PP 
.SS "struct rte_pipeline * rte_pipeline_create (struct \fBrte_pipeline_params\fP * params)"
Pipeline create

.PP
\fBParameters\fP
.RS 4
\fIparams\fP Parameters for pipeline creation 
.RE
.PP
\fBReturns\fP
.RS 4
Handle to pipeline instance on success or NULL otherwise 
.RE
.PP

.SS "int rte_pipeline_free (struct rte_pipeline * p)"
Pipeline free

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_check (struct rte_pipeline * p)"
Pipeline consistency check

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_run (struct rte_pipeline * p)"
Pipeline run

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.RE
.PP
\fBReturns\fP
.RS 4
Number of packets read and processed 
.RE
.PP

.SS "int rte_pipeline_flush (struct rte_pipeline * p)"
Pipeline flush

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_create (struct rte_pipeline * p, struct \fBrte_pipeline_table_params\fP * params, uint32_t * table_id)"
Pipeline table create

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIparams\fP Parameters for pipeline table creation 
.br
\fItable_id\fP Table ID\&. Valid only within the scope of table IDs of the current pipeline\&. Only returned after a successful invocation\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_default_entry_add (struct rte_pipeline * p, uint32_t table_id, struct \fBrte_pipeline_table_entry\fP * default_entry, struct \fBrte_pipeline_table_entry\fP ** default_entry_ptr)"
Pipeline table default entry add

.PP
The contents of the table default entry is updated with the provided actions and meta-data\&. When the default entry is not configured (by using this function), the built-in default entry has the action "Drop" and meta-data set to all-zeros\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIdefault_entry\fP New contents for the table default entry 
.br
\fIdefault_entry_ptr\fP On successful invocation, pointer to the default table entry which can be used for further read-write accesses to this table entry\&. This pointer is valid until the default entry is deleted or re-added\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_default_entry_delete (struct rte_pipeline * p, uint32_t table_id, struct \fBrte_pipeline_table_entry\fP * entry)"
Pipeline table default entry delete

.PP
The new contents of the table default entry is set to reserved action "Dropthe packet" with meta-data cleared (i\&.e\&. set to all-zeros)\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIentry\fP On successful invocation, when entry points to a valid buffer, the previous contents of the table default entry (as it was just before the delete operation) is copied to this buffer 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_entry_add (struct rte_pipeline * p, uint32_t table_id, void * key, struct \fBrte_pipeline_table_entry\fP * entry, int * key_found, struct \fBrte_pipeline_table_entry\fP ** entry_ptr)"
Pipeline table entry add

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIkey\fP Table entry key 
.br
\fIentry\fP New contents for the table entry identified by key 
.br
\fIkey_found\fP On successful invocation, set to TRUE (value different than 0) if key was already present in the table before the add operation and to FALSE (value 0) if not 
.br
\fIentry_ptr\fP On successful invocation, pointer to the table entry associated with key\&. This can be used for further read-write accesses to this table entry and is valid until the key is deleted from the table or re-added (usually for associating different actions and/or action meta-data to the current key) 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_entry_delete (struct rte_pipeline * p, uint32_t table_id, void * key, int * key_found, struct \fBrte_pipeline_table_entry\fP * entry)"
Pipeline table entry delete

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIkey\fP Table entry key 
.br
\fIkey_found\fP On successful invocation, set to TRUE (value different than 0) if key was found in the table before the delete operation and to FALSE (value 0) if not 
.br
\fIentry\fP On successful invocation, when key is found in the table and entry points to a valid buffer, the table entry contents (as it was before the delete was performed) is copied to this buffer 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_entry_add_bulk (struct rte_pipeline * p, uint32_t table_id, void ** keys, struct \fBrte_pipeline_table_entry\fP ** entries, uint32_t n_keys, int * key_found, struct \fBrte_pipeline_table_entry\fP ** entries_ptr)"
Pipeline table entry add bulk

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIkeys\fP Array containing table entry keys 
.br
\fIentries\fP Array containing new contents for every table entry identified by key 
.br
\fIn_keys\fP Number of keys to add 
.br
\fIkey_found\fP On successful invocation, key_found for every item in the array is set to TRUE (value different than 0) if key was already present in the table before the add operation and to FALSE (value 0) if not 
.br
\fIentries_ptr\fP On successful invocation, array *entries_ptr stores pointer to every table entry associated with key\&. This can be used for further read-write accesses to this table entry and is valid until the key is deleted from the table or re-added (usually for associating different actions and/or action meta-data to the current key) 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_entry_delete_bulk (struct rte_pipeline * p, uint32_t table_id, void ** keys, uint32_t n_keys, int * key_found, struct \fBrte_pipeline_table_entry\fP ** entries)"
Pipeline table entry delete bulk

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.br
\fIkeys\fP Array containing table entry keys 
.br
\fIn_keys\fP Number of keys to delete 
.br
\fIkey_found\fP On successful invocation, key_found for every item in the array is set to TRUE (value different than 0) if key was found in the table before the delete operation and to FALSE (value 0) if not 
.br
\fIentries\fP If entries pointer is NULL, this pointer is ignored for every entry found\&. Else, after successful invocation, if specific key is found in the table and entry points to a valid buffer, the table entry contents (as it was before the delete was performed) is copied to this buffer\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_table_stats_read (struct rte_pipeline * p, uint32_t table_id, struct \fBrte_pipeline_table_stats\fP * stats, int clear)"
Read pipeline table stats\&.

.PP
This function reads table statistics identified by \fItable_id\fP of given pipeline \fIp\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance\&. 
.br
\fItable_id\fP Port ID what stats will be returned\&. 
.br
\fIstats\fP Statistics buffer\&. 
.br
\fIclear\fP If not 0 clear stats after reading\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_in_create (struct rte_pipeline * p, struct \fBrte_pipeline_port_in_params\fP * params, uint32_t * port_id)"
Pipeline input port create

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIparams\fP Parameters for pipeline input port creation 
.br
\fIport_id\fP Input port ID\&. Valid only within the scope of input port IDs of the current pipeline\&. Only returned after a successful invocation\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_in_connect_to_table (struct rte_pipeline * p, uint32_t port_id, uint32_t table_id)"
Pipeline input port connect to table

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIport_id\fP Port ID (returned by previous invocation of pipeline input port create) 
.br
\fItable_id\fP Table ID (returned by previous invocation of pipeline table create) 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_in_enable (struct rte_pipeline * p, uint32_t port_id)"
Pipeline input port enable

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIport_id\fP Port ID (returned by previous invocation of pipeline input port create) 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_in_disable (struct rte_pipeline * p, uint32_t port_id)"
Pipeline input port disable

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIport_id\fP Port ID (returned by previous invocation of pipeline input port create) 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_in_stats_read (struct rte_pipeline * p, uint32_t port_id, struct \fBrte_pipeline_port_in_stats\fP * stats, int clear)"
Read pipeline port in stats\&.

.PP
This function reads port in statistics identified by \fIport_id\fP of given pipeline \fIp\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance\&. 
.br
\fIport_id\fP Port ID what stats will be returned\&. 
.br
\fIstats\fP Statistics buffer\&. 
.br
\fIclear\fP If not 0 clear stats after reading\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_out_create (struct rte_pipeline * p, struct \fBrte_pipeline_port_out_params\fP * params, uint32_t * port_id)"
Pipeline output port create

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIparams\fP Parameters for pipeline output port creation 
.br
\fIport_id\fP Output port ID\&. Valid only within the scope of output port IDs of the current pipeline\&. Only returned after a successful invocation\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_out_stats_read (struct rte_pipeline * p, uint32_t port_id, struct \fBrte_pipeline_port_out_stats\fP * stats, int clear)"
Read pipeline port out stats\&.

.PP
This function reads port out statistics identified by \fIport_id\fP of given pipeline \fIp\fP\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance\&. 
.br
\fIport_id\fP Port ID what stats will be returned\&. 
.br
\fIstats\fP Statistics buffer\&. 
.br
\fIclear\fP If not 0 clear stats after reading\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_port_out_packet_insert (struct rte_pipeline * p, uint32_t port_id, struct \fBrte_mbuf\fP * pkt)"
Action handler packet insert to output port

.PP
This function can be called by any input/output port or table action handler to send a packet out through one of the pipeline output ports\&. This packet is generated by the action handler, i\&.e\&. this packet is not part of the burst of packets read from one of the pipeline input ports and currently processed by the pipeline (this packet is not an element of the pkts array input parameter of the action handler)\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIport_id\fP Output port ID (returned by previous invocation of pipeline output port create) to send the packet specified by pkt 
.br
\fIpkt\fP New packet generated by the action handler 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_ah_packet_hijack (struct rte_pipeline * p, uint64_t pkts_mask)"
Action handler packet hijack

.PP
This function can be called by any input/output port or table action handler to hijack selected packets from the burst of packets read from one of the pipeline input ports and currently processed by the pipeline\&. The hijacked packets are removed from any further pipeline processing, with the action handler now having the full ownership for these packets\&.

.PP
The action handler can further send the hijacked packets out through any pipeline output port by calling the rte_pipeline_ah_port_out_packet_insert() function\&. The action handler can also drop these packets by calling the \fBrte_pktmbuf_free()\fP function, although a better alternative is provided by the action handler using the \fBrte_pipeline_ah_packet_drop()\fP function\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts_mask\fP 64-bit bitmask specifying which of the packets handed over for processing to the action handler is to be hijacked by the action handler\&. When pkts_mask bit n is set, then element n of the pkts array (input argument to the action handler) is hijacked\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SS "int rte_pipeline_ah_packet_drop (struct rte_pipeline * p, uint64_t pkts_mask)"
Action handler packet drop

.PP
This function is called by the pipeline action handlers (port in/out, table) to drop the packets selected using packet mask\&.

.PP
This function can be called by any input/output port or table action handler to drop selected packets from the burst of packets read from one of the pipeline input ports and currently processed by the pipeline\&. The dropped packets are removed from any further pipeline processing and the packet buffers are eventually freed to their buffer pool\&.

.PP
This function updates the drop statistics counters correctly, therefore the recommended approach for dropping packets by the action handlers is to call this function as opposed to the action handler hijacking the packets first and then dropping them invisibly to the pipeline (by using the \fBrte_pktmbuf_free()\fP function)\&.

.PP
\fBParameters\fP
.RS 4
\fIp\fP Handle to pipeline instance 
.br
\fIpkts_mask\fP 64-bit bitmask specifying which of the packets handed over for processing to the action handler is to be dropped by the action handler\&. When pkts_mask bit n is set, then element n of the pkts array (input argument to the action handler) is dropped\&. 
.RE
.PP
\fBReturns\fP
.RS 4
0 on success, error code otherwise 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
