From 8111d1e9a8e8aa271a24188ada9a9b4fe66574cf Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sun, 8 Aug 2021 21:35:13 +0200 Subject: [PATCH] Force MTU 9216 on lcpng TAP interfaces The TAP interface does copy forward the host MTU based on the VPP interface's L3 MTU, but it should also ensure that the VPP tap interface has an MTU that is greater-or-equal to those. Considering users can set the interfaces at runtime (set interface mtu packet ...) ensure that the tap MTU is large enough. Ideally, a callback updates the MTU to the same value as the L3 MTU of the VPP interface, or the L3 MTU of the host interface, if either of those change. For now, it's a safe bet to take jumbo 9216. --- lcpng_interface.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lcpng_interface.c b/lcpng_interface.c index 9009b38..2d77039 100644 --- a/lcpng_interface.c +++ b/lcpng_interface.c @@ -775,6 +775,15 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, return args.rv; } + /* + * The TAP interface does copy forward the host MTU based on the VPP + * interface's L3 MTU, but it should also ensure that the VPP tap + * interface has an MTU that is greater-or-equal to those. Considering + * users can set the interfaces at runtime (set interface mtu packet ...) + * ensure that the tap MTU is large enough. + */ + vnet_sw_interface_set_mtu (vnm, args.sw_if_index, 9216); + /* * get the hw and ethernet of the tap */