aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-09-09 16:38:17 -0400
committerDamjan Marion <dmarion@me.com>2019-09-10 14:51:02 +0000
commitb97641c79f4aaf0069268c550f263167ddea2b34 (patch)
tree26c8401461d0f99aab3895a03f32844b16fa6d35 /src/vlib
parent61a89f2b614184eeced3f67affed959897d4da18 (diff)
misc: clean up "pcap [rx|tx] trace" debug CLI
Separate debug CLI arg parsing from the underlying action function. Fixes a number of subtle ordering dependencies, and will allow us to add a binary API to control the feature at some point in the future. Type: refactor Ticket: VPP-1770 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c
index 1c6b9ba6329..2df935a5e17 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -2202,7 +2202,7 @@ vlib_pcap_dispatch_trace_configure (vlib_pcap_dispatch_trace_args_t * a)
return -81; /* VNET_API_ERROR_VALUE_EXIST */
/* Change number of packets to capture while capturing */
- if (vm->dispatch_pcap_enable
+ if (vm->dispatch_pcap_enable && a->enable
&& (pm->n_packets_to_capture != a->packets_to_capture))
return -8; /* VNET_API_ERROR_INVALID_VALUE_2 */