summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnet/vnet/devices/dpdk/node.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/vnet/vnet/devices/dpdk/node.c b/vnet/vnet/devices/dpdk/node.c
index 3b4b82afbbc..a7590a5c566 100644
--- a/vnet/vnet/devices/dpdk/node.c
+++ b/vnet/vnet/devices/dpdk/node.c
@@ -1101,7 +1101,7 @@ void dpdk_io_thread (vlib_worker_thread_t * w,
u32 num_devices = 0;
uword * p;
u16 queue_id = 0;
- vlib_node_runtime_t * node_trace;
+ vlib_node_runtime_t * node_trace = 0;
u32 first_worker_index = 0;
u32 buffer_flags_template;
@@ -1145,9 +1145,6 @@ void dpdk_io_thread (vlib_worker_thread_t * w,
first_worker_index + num_workers - 1,
(vlib_frame_queue_t *)(~0));
- /* packet tracing is triggered on the dpdk-input node for ease-of-use */
- node_trace = vlib_node_get_runtime (vm, dpdk_input_node.index);
-
buffer_flags_template = dm->buffer_flags_template;
/* And handle them... */
@@ -1204,8 +1201,19 @@ void dpdk_io_thread (vlib_worker_thread_t * w,
continue;
}
- vec_reset_length (xd->d_trace_buffers);
- trace_cnt = n_trace = vlib_get_trace_count (vm, node_trace);
+ trace_cnt = n_trace = 0;
+ if (PREDICT_FALSE(vm->trace_main.trace_active_hint))
+ {
+ /*
+ * packet tracing is triggered on the dpdk-input node for
+ * ease-of-use. Re-fetch the node_runtime for dpdk-input
+ * in case it has changed.
+ */
+ node_trace = vlib_node_get_runtime (vm, dpdk_input_node.index);
+
+ vec_reset_length (xd->d_trace_buffers);
+ trace_cnt = n_trace = vlib_get_trace_count (vm, node_trace);
+ }
/*
* DAW-FIXME: VMXNET3 device stop/start doesn't work,