Packet IO start and stop enable a controlled setup and
tear down phases.

Interface control sequence:
* odp_pktio_open() creates a pktio interface object
* potential interface configurations (classification, input queues, etc)
* odp_pktio_start() enables packet input/output
* receive / transmit packets
* odp_pktio_stop() disables packet input/output
* drain remaining packets from queues
* remove / destroy input queues
* odp_pktio_close() destroys the pktio interface object

Signed-off-by: Petri Savolainen <[email protected]>
---
 include/odp/api/packet_io.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h
index 97f79ee..6e77705 100644
--- a/include/odp/api/packet_io.h
+++ b/include/odp/api/packet_io.h
@@ -118,6 +118,26 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t 
pool,
                           const odp_pktio_param_t *param);
 
 /**
+ * Start packet receive and transmit
+ *
+ * @param pktio  Packet IO handle
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int odp_pktio_start(odp_pktio_t pktio);
+
+/**
+ * Stop packet receive and transmit
+ *
+ * @param pktio  Packet IO handle
+ *
+ * @retval 0 on success
+ * @retval <0 on failure
+ */
+int odp_pktio_stop(odp_pktio_t pktio);
+
+/**
  * Close a packet IO interface
  *
  * @param pktio  Packet IO handle
-- 
2.3.5

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to