From 4b943d632864949310da4c88ea00e59f6043ae40 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Mon, 9 Sep 2019 16:38:17 -0400 Subject: 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 Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7 (cherry picked from commit b97641c79f4aaf0069268c550f263167ddea2b34) --- src/vlib/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vlib') 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 */ -- cgit 1.2.3-korg