Flush the packets currently buffered by the SWX pipeline output ports.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
rte_swx_pipeline_extern_object_config;
rte_swx_pipeline_extern_type_member_func_register;
rte_swx_pipeline_extern_type_register;
+ rte_swx_pipeline_flush;
rte_swx_pipeline_free;
rte_swx_pipeline_instructions_config;
rte_swx_pipeline_packet_header_register;
instr_exec(p);
}
+void
+rte_swx_pipeline_flush(struct rte_swx_pipeline *p)
+{
+ uint32_t i;
+
+ for (i = 0; i < p->n_ports_out; i++) {
+ struct port_out_runtime *port = &p->out[i];
+
+ if (port->flush)
+ port->flush(port->obj);
+ }
+}
+
/*
* Control.
*/
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
*