diff mbox

[API-NEXT,PATCHv4,2/2] api: pktio statistics: define start and stop

Message ID 1445001927-13916-3-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov Oct. 16, 2015, 1:25 p.m. UTC
Define pktio stats start/stop functions for case when same
statistic module is used by different pktios, so if it's used
for one of them it cannot be used by other, to allow it for
first it should be disable for second. For instance 2 statistic
modules are shared between 4 eth ports, etc.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 include/odp/api/packet_io_stats.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
diff mbox

Patch

diff --git a/include/odp/api/packet_io_stats.h b/include/odp/api/packet_io_stats.h
index 94af18c..73db34c 100644
--- a/include/odp/api/packet_io_stats.h
+++ b/include/odp/api/packet_io_stats.h
@@ -156,6 +156,26 @@  int odp_pktio_stats(odp_pktio_t pktio,
 int odp_pktio_stats_reset(odp_pktio_t pktio, odp_pktio_stats_mask_t mask);
 
 /**
+ * Start statistics for pktio handle
+ *
+ * @param	pktio	 Packet IO handle
+ * @retval  0 on success
+ * @retval <0 on failure
+ *
+ */
+int odp_pktio_stats_start(odp_pktio_t pktio);
+
+/**
+ * Stop statistics for pktio handle
+ *
+ * @param	pktio	 Packet IO handle
+ * @retval  0 on success
+ * @retval <0 on failure
+ *
+ */
+int odp_pktio_stats_stop(odp_pktio_t pktio);
+
+/**
  * @}
  */