net/mlx5: create flow matcher object on Windows
[dpdk.git] / lib / librte_pipeline / rte_swx_pipeline.h
index 7b131b0..d0a3439 100644 (file)
@@ -26,6 +26,17 @@ extern "C" {
 #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
  */
@@ -371,7 +382,7 @@ rte_swx_pipeline_packet_metadata_register(struct rte_swx_pipeline *p,
  *<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:
@@ -643,6 +654,32 @@ __rte_experimental
 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
  *