aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-08-01 19:04:40 -0700
committerDave Barach <openvpp@barachs.net>2019-08-02 13:40:11 +0000
commit678d64d0b28f9ea1728ff35ae162c8f22d1cb8a9 (patch)
treed8f0d37187661da564ac7b6ac6b34add4b866bc8 /src/plugins
parent23b26e71e79ed4f232ac972948a8a91b554ba5f4 (diff)
vmxnet3: don't bypass ethernet_input
Queue everything to ethernet_input to not break pcap rx trace. Fix a minor typo in vmxnet3_api.c Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7df7b3e20b525e3d6f7421c8e213b6541cdd15b6
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/vmxnet3/input.c19
-rw-r--r--src/plugins/vmxnet3/vmxnet3_api.c2
2 files changed, 6 insertions, 15 deletions
diff --git a/src/plugins/vmxnet3/input.c b/src/plugins/vmxnet3/input.c
index 7928bc35fd9..6d30f19116a 100644
--- a/src/plugins/vmxnet3/input.c
+++ b/src/plugins/vmxnet3/input.c
@@ -76,7 +76,7 @@ vmxnet3_rx_comp_ring_advance_next (vmxnet3_rxq_t * rxq)
static_always_inline void
vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
- u16 * next, u16 gso_size)
+ u16 gso_size)
{
u8 l4_hdr_sz = 0;
@@ -92,7 +92,6 @@ vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
hb->flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP4;
- next[0] = VNET_DEVICE_INPUT_NEXT_IP4_NCS_INPUT;
/* checksum offload */
if (!(rx_comp->index & VMXNET3_RXCI_CNC))
@@ -141,7 +140,6 @@ vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
vnet_buffer2 (hb)->gso_l4_hdr_sz = l4_hdr_sz;
hb->flags |= VNET_BUFFER_F_GSO;
}
- vlib_buffer_advance (hb, device_input_next_node_advance[next[0]]);
}
else if (rx_comp->flags & VMXNET3_RXCF_IP6)
{
@@ -152,7 +150,6 @@ vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
hb->flags |= VNET_BUFFER_F_L2_HDR_OFFSET_VALID |
VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
VNET_BUFFER_F_L4_HDR_OFFSET_VALID | VNET_BUFFER_F_IS_IP6;
- next[0] = VNET_DEVICE_INPUT_NEXT_IP6_INPUT;
/* checksum offload */
if (!(rx_comp->index & VMXNET3_RXCI_CNC))
@@ -196,10 +193,7 @@ vmxnet3_handle_offload (vmxnet3_rx_comp * rx_comp, vlib_buffer_t * hb,
vnet_buffer2 (hb)->gso_l4_hdr_sz = l4_hdr_sz;
hb->flags |= VNET_BUFFER_F_GSO;
}
- vlib_buffer_advance (hb, device_input_next_node_advance[next[0]]);
}
- else
- next[0] = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
}
static_always_inline uword
@@ -387,17 +381,14 @@ vmxnet3_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
if (PREDICT_FALSE (known_next))
- {
- next[0] = next_index;
- }
+ next[0] = next_index;
else
{
ethernet_header_t *e = (ethernet_header_t *) hb->data;
- if (ethernet_frame_is_tagged (e->type))
- next[0] = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
- else
- vmxnet3_handle_offload (rx_comp, hb, next, gso_size);
+ next[0] = VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT;
+ if (!ethernet_frame_is_tagged (e->type))
+ vmxnet3_handle_offload (rx_comp, hb, gso_size);
}
n_rx_packets++;
diff --git a/src/plugins/vmxnet3/vmxnet3_api.c b/src/plugins/vmxnet3/vmxnet3_api.c
index 8afc40e3280..731a5d0b25f 100644
--- a/src/plugins/vmxnet3/vmxnet3_api.c
+++ b/src/plugins/vmxnet3/vmxnet3_api.c
@@ -251,7 +251,7 @@ vl_api_vmxnet3_dump_t_handler (vl_api_vmxnet3_dump_t * mp)
}
static void *
-vl_api_vmxnet3_dump_t_print (vl_api_vmxnet3_create_t * mp, void *handle)
+vl_api_vmxnet3_dump_t_print (vl_api_vmxnet3_dump_t * mp, void *handle)
{
u8 *s;