aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/dpdk.h
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2018-05-25 17:36:05 -0400
committerDave Barach <dbarach@cisco.com>2018-05-25 17:36:44 -0400
commitc6f186b23d00685b3e9f132ba79a5cb44f0a44c0 (patch)
treecddcc7b7831e61f0f5d7b008a7ca1ae80e14f280 /src/plugins/dpdk/device/dpdk.h
parentc65770deebf63d34cc09c6aa3af7c86b3affb4b8 (diff)
Add interface rx pcap tracing
Should cost at most 1 clock per frame when not enabled. Add "pcap rx trace..." debug CLI, refactored "pcap tx trace" debug CLI to avoid duplicating code. Change-Id: I19ac75d1cf94a6a24c98facbf0753381d37963ea Signed-off-by: Dave Barach <dbarach@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/dpdk.h')
-rw-r--r--src/plugins/dpdk/device/dpdk.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index eed1126da74..c60312e804b 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -380,6 +380,15 @@ typedef struct
typedef struct
{
+ int pcap_enable;
+ pcap_main_t pcap_main;
+ u8 *pcap_filename;
+ u32 pcap_sw_if_index;
+ u32 pcap_pkts_to_capture;
+} dpdk_pcap_t;
+
+typedef struct
+{
/* Devices */
dpdk_device_t *devices;
@@ -392,8 +401,10 @@ typedef struct
/* buffer flags template, configurable to enable/disable tcp / udp cksum */
u32 buffer_flags_template;
- /* pcap tracing [only works if (CLIB_DEBUG > 0)] */
- int tx_pcap_enable;
+ /* pcap tracing */
+ dpdk_pcap_t pcap[VLIB_N_RX_TX];
+
+ int pcap_enable;
pcap_main_t pcap_main;
u8 *pcap_filename;
u32 pcap_sw_if_index;