aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-11-21 09:54:41 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2018-11-22 19:08:08 +0000
commit6a8bfd43a057da68d43074d0abc3c598c5ccb55a (patch)
treefbe3d4c225d94e2cd5ec2c4342e37e3b73695bc2 /src
parent9af4504db1f5d6f5562d8445ab325989b968cf12 (diff)
vhost-user: hint ethernet-input about single sw_if_index
Change-Id: Ia495f8f50c43baf0d6eeb8e9ba04314ce277286f Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/virtio/vhost_user_input.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 97f6792354a..87a01cefd5b 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -384,7 +384,22 @@ vhost_user_if_input (vlib_main_t * vm,
while (n_left > 0)
{
- vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
+ vlib_get_new_next_frame (vm, node, next_index, to_next, n_left_to_next);
+
+ if (next_index == VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT)
+ {
+ /* give some hints to ethernet-input */
+ vlib_next_frame_t *nf;
+ vlib_frame_t *f;
+ ethernet_input_frame_t *ef;
+ nf = vlib_node_runtime_get_next_frame (vm, node, next_index);
+ f = vlib_get_frame (vm, nf->frame_index);
+ f->flags = ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX;
+
+ ef = vlib_frame_scalar_args (f);
+ ef->sw_if_index = vui->sw_if_index;
+ ef->hw_if_index = vui->hw_if_index;
+ }
while (n_left > 0 && n_left_to_next > 0)
{