aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-04 18:41:59 +0100
committerOle Tr�an <otroan@employees.org>2021-03-05 11:59:24 +0000
commit8fb5add31885fcee1abaf60dd903aa566cc53b0d (patch)
tree774eddc57568e5cad1cb3c2d4a4956501d21a37b /src/vnet/ethernet
parent3efd4e9998192545c32aeb33a9f8f72a1ba085a9 (diff)
interface: move vnet_pcap_t to vnet
It naturally belogns there... Type: refactor Change-Id: I05f7ba01103a5e9b3756f1ea69c8cc5d8f26f0a0 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index f4f84f8ca45..c31e22299b3 100644
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -1131,6 +1131,7 @@ static_always_inline void
ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * from_frame)
{
+ vnet_main_t *vnm = vnet_get_main ();
u32 *from, n_left;
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
{
@@ -1159,10 +1160,10 @@ ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* rx pcap capture if enabled */
- if (PREDICT_FALSE (vlib_global_main.pcap.pcap_rx_enable))
+ if (PREDICT_FALSE (vnm->pcap.pcap_rx_enable))
{
u32 bi0;
- vnet_pcap_t *pp = &vlib_global_main.pcap;
+ vnet_pcap_t *pp = &vnm->pcap;
from = vlib_frame_vector_args (from_frame);
n_left = from_frame->n_vectors;
@@ -1188,7 +1189,6 @@ ethernet_input_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
if (pp->pcap_sw_if_index == 0 ||
pp->pcap_sw_if_index == vnet_buffer (b0)->sw_if_index[VLIB_RX])
{
- vnet_main_t *vnm = vnet_get_main ();
vnet_hw_interface_t *hi =
vnet_get_sup_hw_interface
(vnm, vnet_buffer (b0)->sw_if_index[VLIB_RX]);