-static void
-serialize_vnet_sw_hw_interface_set_flags (serialize_main_t * m, va_list * va)
-{
- vnet_sw_hw_interface_state_t *s =
- va_arg (*va, vnet_sw_hw_interface_state_t *);
- serialize (m, serialize_vec_vnet_sw_hw_interface_state, s, 1);
-}
-
-static void
-unserialize_vnet_sw_interface_set_flags (serialize_main_t * m, va_list * va)
-{
- CLIB_UNUSED (mc_main_t * mc) = va_arg (*va, mc_main_t *);
- vnet_sw_hw_interface_state_t s;
-
- unserialize (m, unserialize_vec_vnet_sw_hw_interface_state, &s, 1);
-
- vnet_sw_interface_set_flags_helper
- (vnet_get_main (), s.sw_hw_if_index, s.flags,
- /* helper_flags no redistribution */ 0);
-}
-
-void
-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);
-
- if (hi->max_packet_bytes != mtu)
- {
- u16 l3_pad = hi->max_packet_bytes - hi->max_l3_packet_bytes[VLIB_TX];
- hi->max_packet_bytes = mtu;
- hi->max_l3_packet_bytes[VLIB_TX] =
- hi->max_l3_packet_bytes[VLIB_RX] = mtu - l3_pad;
- ethernet_set_flags (vnm, hw_if_index, ETHERNET_INTERFACE_FLAG_MTU);
- adj_mtu_update (hw_if_index);
- }
-}
-
-static void
-unserialize_vnet_hw_interface_set_flags (serialize_main_t * m, va_list * va)
-{
- CLIB_UNUSED (mc_main_t * mc) = va_arg (*va, mc_main_t *);
- vnet_sw_hw_interface_state_t s;
-
- unserialize (m, unserialize_vec_vnet_sw_hw_interface_state, &s, 1);
-
- vnet_hw_interface_set_flags_helper
- (vnet_get_main (), s.sw_hw_if_index, s.flags,
- /* helper_flags no redistribution */ 0);
-}
-
-MC_SERIALIZE_MSG (vnet_sw_interface_set_flags_msg, static) =
-{
-.name = "vnet_sw_interface_set_flags",.serialize =
- serialize_vnet_sw_hw_interface_set_flags,.unserialize =
- unserialize_vnet_sw_interface_set_flags,};
-
-MC_SERIALIZE_MSG (vnet_hw_interface_set_flags_msg, static) =
-{
-.name = "vnet_hw_interface_set_flags",.serialize =
- serialize_vnet_sw_hw_interface_set_flags,.unserialize =
- unserialize_vnet_hw_interface_set_flags,};
-