Copy L3 VPP interface MTU if available

Still use a sensible default of 9216, but if the L3 packet size is set
on the VPP interface, copy it forward (just as we do in the 'host'
interface of the TAP itself, ie the interface created in the linux
namespace). Now they will all line up initially.
This commit is contained in:
Pim van Pelt
2021-08-08 21:53:04 +02:00
parent 4b79f042bf
commit 69d7cb73cc

View File

@ -780,8 +780,12 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name,
* interface's L3 MTU, but it should also ensure that the VPP tap * 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 * interface has an MTU that is greater-or-equal to those. Considering
* users can set the interfaces at runtime (set interface mtu packet ...) * users can set the interfaces at runtime (set interface mtu packet ...)
* ensure that the tap MTU is large enough. * ensure that the tap MTU is large enough, taking the VPP interface L3
* if it's set, and otherwise a sensible default.
*/ */
if (sw->mtu[VNET_MTU_L3])
vnet_sw_interface_set_mtu (vnm, args.sw_if_index, sw->mtu[VNET_MTU_L3]);
else
vnet_sw_interface_set_mtu (vnm, args.sw_if_index, ETHERNET_MAX_PACKET_BYTES); vnet_sw_interface_set_mtu (vnm, args.sw_if_index, ETHERNET_MAX_PACKET_BYTES);
/* /*