From 97d54ed43eb69f6ea731c02305ebe0ca0b1a5cc4 Mon Sep 17 00:00:00 2001 From: Mohsin Kazmi Date: Mon, 10 Jun 2019 11:20:15 +0200 Subject: tap: add support to configure tap interface host MTU size This patch adds support to configure host mtu size using api, cli or startup.conf. Type: feature Change-Id: I8ab087d82dbe7dedc498825c1a3ea3fcb2cce030 Signed-off-by: Mohsin Kazmi --- src/vnet/devices/virtio/virtio.c | 3 +++ src/vnet/devices/virtio/virtio.h | 1 + 2 files changed, 4 insertions(+) (limited to 'src/vnet/devices/virtio') diff --git a/src/vnet/devices/virtio/virtio.c b/src/vnet/devices/virtio/virtio.c index a3fd05dbb55..9e2067bd521 100644 --- a/src/vnet/devices/virtio/virtio.c +++ b/src/vnet/devices/virtio/virtio.c @@ -317,6 +317,9 @@ virtio_show (vlib_main_t * vm, u32 * hw_if_indices, u8 show_descr, u32 type) vlib_cli_output (vm, " name \"%s\"", vif->host_if_name); if (vif->net_ns) vlib_cli_output (vm, " host-ns \"%s\"", vif->net_ns); + if (vif->host_mtu_size) + vlib_cli_output (vm, " host-mtu-size \"%d\"", + vif->host_mtu_size); vlib_cli_output (vm, " fd %d", vif->fd); vlib_cli_output (vm, " tap-fd %d", vif->tap_fd); vlib_cli_output (vm, " gso-enabled %d", vif->gso_enabled); diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index 55b6271b337..52b57e9d95f 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -178,6 +178,7 @@ typedef struct u8 host_ip4_prefix_len; ip6_address_t host_ip6_addr; u8 host_ip6_prefix_len; + u32 host_mtu_size; u32 tap_file_index; int gso_enabled; int ifindex; -- cgit 1.2.3-korg