summaryrefslogtreecommitdiff
path: root/service/include
diff options
context:
space:
mode:
authorsongyanchao <[email protected]>2024-05-15 08:55:31 +0000
committersongyanchao <[email protected]>2024-05-15 08:55:31 +0000
commit64ad4ff87c581a0b91d56fb4a69d52996c7a0e72 (patch)
treeb5b38dd32971304f7a2fda75945cd1c10577508d /service/include
parent1ffe9799a4657c913b69b8e8f0eaa15d49d9f7ba (diff)
🎈 perf: Adapt to dp trace changes.v4.8.9-20240515
Adapt to dp trace changes.
Diffstat (limited to 'service/include')
-rw-r--r--service/include/sc_trace.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/service/include/sc_trace.h b/service/include/sc_trace.h
index c3d3f2d..9fd7233 100644
--- a/service/include/sc_trace.h
+++ b/service/include/sc_trace.h
@@ -138,7 +138,15 @@ static inline void gen_store_telemetry_info_rx(struct rte_node * node, struct rt
{
/* Populate the next node information */
char str_record[MR_STRING_MAX];
- snprintf(str_record, sizeof(str_record), "interface(rx) = %s, qid = %u", dev_desc->symbol, queue_id);
+
+ if (dev_desc == NULL)
+ {
+ snprintf(str_record, sizeof(str_record), "interface(rx) = NULL, qid = %u", queue_id);
+ }
+ else
+ {
+ snprintf(str_record, sizeof(str_record), "interface(rx) = %s, qid = %u", dev_desc->symbol, queue_id);
+ }
/* Emit the trace record */
struct dp_trace_record_meta meta = {.measurement_type = DP_TRACE_MEASUREMENT_TYPE_TELEMETRY,