* RTE SWX Pipeline
*/
-#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
uint32_t port_id,
const char *port_type_name,
void *args);
+/*
+ * Packet mirroring
+ */
+
+/** Packet mirroring parameters. */
+struct rte_swx_pipeline_mirroring_params {
+ /** Number of packet mirroring slots. */
+ uint32_t n_slots;
+
+ /** Maximum number of packet mirroring sessions. */
+ uint32_t n_sessions;
+};
+
+/**
+ * Packet mirroring configure
+ *
+ * @param[in] p
+ * Pipeline handle.
+ * @param[in] params
+ * Packet mirroring parameters.
+ * @return
+ * 0 on success or the following error codes otherwise:
+ * -EINVAL: Invalid argument;
+ * -ENOMEM: Not enough memory;
+ * -EEXIST: Pipeline was already built successfully.
+ */
+__rte_experimental
+int
+rte_swx_pipeline_mirroring_config(struct rte_swx_pipeline *p,
+ struct rte_swx_pipeline_mirroring_params *params);
/*
* Extern objects and functions
*/
const char *default_action_name;
- /** Default action data. The size of this array is the action data size
- * of the default action. Must be NULL if the default action data size
- * is zero.
+ /** Default action arguments. Specified as a string with the format
+ * "ARG0_NAME ARG0_VALUE ...". The number of arguments in this string
+ * must match exactly the number of arguments of the default action.
+ * Must be NULL if the default action does not have any arguments.
*/
- uint8_t *default_action_data;
+ const char *default_action_args;
/** If non-zero (true), then the default action of the current table
* cannot be changed. If zero (false), then the default action can be
*/
const char *default_action_name;
- /** Default action data. The size of this array is the action data size
- * of the default action. Must be NULL if the default action data size
- * is zero.
+ /** Default action arguments. Specified as a string with the format
+ * "ARG0_NAME ARG0_VALUE ...". The number of arguments in this string
+ * must match exactly the number of arguments of the default action.
+ * Must be NULL if the default action does not have any arguments.
*/
- uint8_t *default_action_data;
+ const char *default_action_args;
/** If non-zero (true), then the default action of the current table
* cannot be changed. If zero (false), then the default action can be
* @param[in] size
* The maximum number of table entries. Must be non-zero.
* @param[in] timeout
- * Table entry timeout in seconds. Must be non-zero.
+ * Array of possible table entry timeouts in seconds. Must be non-NULL.
+ * @param[in] n_timeouts
+ * Number of elements in the *timeout* array.
* @return
* 0 on success or the following error codes otherwise:
* -EINVAL: Invalid argument;
const char *name,
struct rte_swx_pipeline_learner_params *params,
uint32_t size,
- uint32_t timeout);
+ uint32_t *timeout,
+ uint32_t n_timeouts);
/**
* Pipeline register array configure