#ifndef RTE_SWX_NAME_SIZE
#define RTE_SWX_NAME_SIZE 64
#endif
+
+/** Instruction size. */
+#ifndef RTE_SWX_INSTRUCTION_SIZE
+#define RTE_SWX_INSTRUCTION_SIZE 256
+#endif
+
+/** Instruction tokens. */
+#ifndef RTE_SWX_INSTRUCTION_TOKENS_MAX
+#define RTE_SWX_INSTRUCTION_TOKENS_MAX 16
+#endif
+
/*
* Pipeline setup and operation
*/
*<pre>+-----+---------------------------+------------------+-----+-----+</pre>
*<pre>| T | Table action data field | t.header.field | NO | YES |</pre>
*<pre>+-----+---------------------------+------------------+-----+-----+</pre>
- *<pre>| I | Immediate value (32-bit) | h.header.field | NO | YES |</pre>
+ *<pre>| I | Immediate value (64-bit) | h.header.field | NO | YES |</pre>
*<pre>+-----+---------------------------+------------------+-----+-----+</pre>
*
* Instruction set:
int
rte_swx_pipeline_build(struct rte_swx_pipeline *p);
+/**
+ * Pipeline build from specification file
+ *
+ * @param[in] p
+ * Pipeline handle.
+ * @param[in] spec
+ * Pipeline specification file.
+ * @param[out] err_line
+ * In case of error and non-NULL, the line number within the *spec* file where
+ * the error occurred. The first line number in the file is 1.
+ * @param[out] err_msg
+ * In case of error and non-NULL, the error message.
+ * @return
+ * 0 on success or the following error codes otherwise:
+ * -EINVAL: Invalid argument;
+ * -ENOMEM: Not enough space/cannot allocate memory;
+ * -EEXIST: Resource with the same name already exists;
+ * -ENODEV: Extern object or table creation error.
+ */
+__rte_experimental
+int
+rte_swx_pipeline_build_from_spec(struct rte_swx_pipeline *p,
+ FILE *spec,
+ uint32_t *err_line,
+ const char **err_msg);
+
/**
* Pipeline run
*
rte_swx_pipeline_run(struct rte_swx_pipeline *p,
uint32_t n_instructions);
+/**
+ * Pipeline flush
+ *
+ * Flush all output ports of the pipeline.
+ *
+ * @param[in] p
+ * Pipeline handle.
+ */
+__rte_experimental
+void
+rte_swx_pipeline_flush(struct rte_swx_pipeline *p);
+
/**
* Pipeline free
*