aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r--src/vnet/interface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index 05a1c7c34a9..a1493c66c23 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -772,6 +772,9 @@ clib_error_t *
vnet_hw_interface_set_mtu (vnet_main_t *vnm, u32 hw_if_index, u32 mtu)
{
vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index);
+ vnet_hw_interface_class_t *hw_if_class =
+ vnet_get_hw_interface_class (vnm, hi->hw_class_index);
+ clib_error_t *err = 0;
if (hi->max_packet_bytes != mtu)
{
@@ -781,8 +784,10 @@ vnet_hw_interface_set_mtu (vnet_main_t *vnm, u32 hw_if_index, u32 mtu)
"requested mtu must be in the %u to %u range",
hi->min_supported_packet_bytes,
hi->max_supported_packet_bytes);
+ if (hw_if_class->set_mtu)
+ if ((err = hw_if_class->set_mtu (vnm, hi, mtu)))
+ return err;
hi->max_packet_bytes = mtu;
- ethernet_set_flags (vnm, hw_if_index, ETHERNET_INTERFACE_FLAG_MTU);
vnet_hw_interface_walk_sw (vnm, hw_if_index, sw_interface_walk_callback,
&mtu);
}