trace: implement operation APIs
[dpdk.git] / lib / librte_eal / common / eal_trace.h
index a294834..2b9a5f0 100644 (file)
@@ -26,9 +26,19 @@ struct trace_point {
 
 struct trace {
        int register_errno;
+       bool status;
+       enum rte_trace_mode mode;
        uint32_t nb_trace_points;
 };
 
+/* Helper functions */
+static inline uint16_t
+trace_id_get(rte_trace_point_t *trace)
+{
+       return (*trace & __RTE_TRACE_FIELD_ID_MASK) >>
+               __RTE_TRACE_FIELD_ID_SHIFT;
+}
+
 /* Trace point list functions */
 STAILQ_HEAD(trace_point_head, trace_point);