if (error) goto done;
hash_set (hi->sub_interface_sw_if_index_by_id, id, sw_if_index);
hash_set_mem (im->sw_if_index_by_sup_and_sub, kp, sw_if_index);
+ vlib_cli_output(vm, "%U\n", format_vnet_sw_if_index_name, vnet_get_main(), sw_if_index);
}
if (error)
if (!eif)
return clib_error_return (0, "not supported");
- if (mtu < ETHERNET_MIN_PACKET_BYTES)
+ if (mtu < hi->min_supported_packet_bytes)
return clib_error_return (0, "Invalid mtu (%d): "
"must be >= min pkt bytes (%d)", mtu,
- hi->min_packet_bytes);
+ hi->min_supported_packet_bytes);
- if (mtu > ETHERNET_MAX_PACKET_BYTES)
- return clib_error_return (0, "Invalid mtu (%d): must be <= 9216", mtu);
+ if (mtu > hi->max_supported_packet_bytes)
+ return clib_error_return (0, "Invalid mtu (%d): must be <= (%d)", mtu,
+ hi->max_supported_packet_bytes);
if (hi->max_packet_bytes != mtu)
{
VLIB_CLI_COMMAND (set_interface_mtu_cmd, static) = {
.path = "set interface mtu",
- .short_help = "set interface mtu <64-9216> <intfc>",
+ .short_help = "set interface mtu <value> <intfc>",
.function = mtu_cmd,
};