service: add attribute for number of invocations
[dpdk.git] / lib / librte_eal / common / include / rte_service.h
index 4898e76..85e964b 100644 (file)
@@ -399,6 +399,11 @@ int32_t rte_service_dump(FILE *f, uint32_t id);
  */
 #define RTE_SERVICE_ATTR_CYCLES 0
 
+/**
+ * Returns the count of invocations of this service function
+ */
+#define RTE_SERVICE_ATTR_CALL_COUNT 1
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice
@@ -411,6 +416,18 @@ int32_t rte_service_dump(FILE *f, uint32_t id);
 int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id,
                             uint32_t *attr_value);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Reset all attribute values of a service.
+ *
+ * @param id The service to reset all statistics of
+ * @retval 0 Successfully reset attributes
+ *         -EINVAL Invalid service id provided
+ */
+int32_t rte_service_attr_reset_all(uint32_t id);
+
 #ifdef __cplusplus
 }
 #endif