1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
4 #ifndef __INCLUDE_RTE_SWX_CTL_H__
5 #define __INCLUDE_RTE_SWX_CTL_H__
13 * RTE SWX Pipeline Control
19 #include <rte_compat.h>
21 #include "rte_swx_table.h"
28 struct rte_swx_table_state {
32 /** Action ID of the table default action. */
33 uint64_t default_action_id;
35 /** Action data of the table default action. Ignored when the action
36 * data size is zero; otherwise, action data size bytes are meaningful.
38 uint8_t *default_action_data;
42 * Pipeline table state get
46 * @param[out] table_state
47 * After successful execution, the *table_state* contains the pointer to the
48 * current pipeline table state, which is an array of *n_tables* elements,
49 * with array element i containing the state of the i-th pipeline table. The
50 * pipeline continues to own all the data structures directly or indirectly
51 * referenced by the *table_state* until the subsequent successful invocation
52 * of function *rte_swx_pipeline_table_state_set*.
54 * 0 on success or the following error codes otherwise:
55 * -EINVAL: Invalid argument.
59 rte_swx_pipeline_table_state_get(struct rte_swx_pipeline *p,
60 struct rte_swx_table_state **table_state);
63 * Pipeline table state set
67 * @param[out] table_state
68 * After successful execution, the pipeline table state is updated to this
69 * *table_state*. The ownership of all the data structures directly or
70 * indirectly referenced by this *table_state* is passed from the caller to
73 * 0 on success or the following error codes otherwise:
74 * -EINVAL: Invalid argument.
78 rte_swx_pipeline_table_state_set(struct rte_swx_pipeline *p,
79 struct rte_swx_table_state *table_state);