aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-09-23 10:27:27 -0400
committerDamjan Marion <dmarion@me.com>2019-09-25 22:19:59 +0000
commit731312df93534d9695b2d22fc9071a860868f87d (patch)
tree76e30dfd15a341170cb886dabb0f8d5d58f31e37 /src/vnet/ethernet
parent2cf5b1a1ec8d959f1355974822deba35d6bfb04b (diff)
misc: unify pcap rx / tx / drop trace
Use a single vnet_pcap_t in vlib_global_main, specifically to support unified tracing Update sphinx docs, doxygen tags Type: refactor Ticket: VPP-1776 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id15d41a596712968c0714cef1bd2cd5bc9cbdd55 (cherry picked from commit 33909777c63712ca397165cd92e7cc62208eb5c8)
Diffstat (limited to 'src/vnet/ethernet')
-rwxr-xr-xsrc/vnet/ethernet/node.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index cfbad8b8cc0..272475938a9 100755
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -991,10 +991,11 @@ ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* rx pcap capture if enabled */
- if (PREDICT_FALSE (vlib_global_main.pcap[VLIB_RX].pcap_enable))
+ if (PREDICT_FALSE (vlib_global_main.pcap.pcap_rx_enable))
{
u32 bi0;
vnet_main_t *vnm = vnet_get_main ();
+ vnet_pcap_t *pp = &vlib_global_main.pcap;
from = vlib_frame_vector_args (from_frame);
n_left = from_frame->n_vectors;
@@ -1013,17 +1014,16 @@ ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
(b0, vnm->classify_filter_table_indices[0],
0 /* full classify */ );
if (classify_filter_result)
- pcap_add_buffer (&vlib_global_main.pcap[VLIB_RX].pcap_main,
- vm, bi0, 512);
+ pcap_add_buffer (&pp->pcap_main, vm, bi0,
+ pp->max_bytes_per_pkt);
continue;
}
- if (vlib_global_main.pcap[VLIB_RX].pcap_sw_if_index == 0 ||
- vlib_global_main.pcap[VLIB_RX].pcap_sw_if_index
- == vnet_buffer (b0)->sw_if_index[VLIB_RX])
+ if (pp->pcap_sw_if_index == 0 ||
+ pp->pcap_sw_if_index == vnet_buffer (b0)->sw_if_index[VLIB_RX])
{
- pcap_add_buffer (&vlib_global_main.pcap[VLIB_RX].pcap_main, vm,
- bi0, 512);
+ pcap_add_buffer (&pp->pcap_main, vm, bi0,
+ pp->max_bytes_per_pkt);
}
}
}