diff options
| author | 童宗振 <[email protected]> | 2024-05-11 11:12:48 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-05-11 11:12:48 +0000 |
| commit | 53b4887e5c2dd8d2113a011135c5f13f4ca42edb (patch) | |
| tree | 4b847d1d1726065da57feb06438ebef279119b3a /service | |
| parent | 4a1635862ee49c06620bb1b374c3315a14950fea (diff) | |
Dp trace save quadruple 2
Diffstat (limited to 'service')
| -rw-r--r-- | service/src/dp_trace.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/service/src/dp_trace.c b/service/src/dp_trace.c index 166a2d1..30ebf61 100644 --- a/service/src/dp_trace.c +++ b/service/src/dp_trace.c @@ -194,6 +194,12 @@ void hook_rte_pktmbuf_free(struct rte_mbuf * m) if (m == NULL) return; struct dp_trace_process * trace = sc_main_get()->trace; + if (unlikely(dp_trace_record_can_emit(m, DP_TRACE_MEASUREMENT_TYPE_TELEMETRY))) + { + struct dp_trace_record_meta meta = { + .measurement_type = DP_TRACE_MEASUREMENT_TYPE_TELEMETRY, .appsym = MR_TRACE_APPSYM, .module = ""}; + dp_trace_record_emit_str(sc_main_get()->trace, m, rte_lcore_id(), &meta, "packet free."); + } if (unlikely(dp_trace_record_can_emit(m, DP_TRACE_MEASUREMENT_TYPE_TRACE))) { struct dp_trace_record_meta meta = { @@ -211,6 +217,12 @@ void hook_rte_pktmbuf_free_bulk(struct rte_mbuf ** mbufs, unsigned int count) { if (mbufs[idx] == NULL) continue; + if (unlikely(dp_trace_record_can_emit(mbufs[idx], DP_TRACE_MEASUREMENT_TYPE_TELEMETRY))) + { + struct dp_trace_record_meta meta = { + .measurement_type = DP_TRACE_MEASUREMENT_TYPE_TELEMETRY, .appsym = MR_TRACE_APPSYM, .module = ""}; + dp_trace_record_emit_str(sc_main_get()->trace, mbufs[idx], rte_lcore_id(), &meta, "packet free."); + } if (unlikely(dp_trace_record_can_emit(mbufs[idx], DP_TRACE_MEASUREMENT_TYPE_TRACE))) { struct dp_trace_record_meta meta = { |
