6 Maximum Transmission Unit is a term used to describe the maximum sized
7 “thingy” that can be sent out an interface. It can refer to the maximum
8 frame size that a NIC can send. On Ethernet that would include the
9 Ethernet header but typically not the IGF. It can refer to the maximum
10 packet size, that is, on Ethernet an MTU of 1500, would allow an IPv4
11 packet of 1500 bytes, that would result in an Ethernet frame of 1518
15 VPP allows setting of the physical payload MTU. I.e. not including L2
16 overhead. Setting the hardware MTU will program the NIC. This MTU will
17 be inherited by all software interfaces.
19 VPP also allows setting of the payload MTU for software interfaces.
20 Independently of the MTU set on the hardware. If the software payload
21 MTU is set higher than the capability of the NIC, the packet will be
24 In addition VPP supports setting the MTU of individual network layer
25 protocols. IPv4, IPv6 or MPLS. For example an IPv4 MTU of 1500 (includes
26 the IPv4 header) will fit in a hardware payload MTU of 1500.
28 *Note we might consider changing the hardware payload MTU to hardware
29 MTU*. That is, the MTU includes all L2 framing. Then the payload MTU can
30 be calculated based on the interface’s configuration. E.g. 802.1q tags
33 There are currently no checks or warnings if e.g. the user configures a
34 per-protocol MTU larger than the underlying payload MTU. If that happens
35 packets will be fragmented or dropped.
40 The hardware payload MTU is stored in the max_packet_bytes variable in
41 the vnet_hw_interface_t structure.
43 The software MTU (previously max_l3_packet_bytes) is in
44 vnet_sw_interface_t->in mtu[VNET_N_MTU].
52 This API message is used to set the physical MTU. It is currently
53 limited to Ethernet interfaces. Note, this programs the NIC.
57 autoreply define hw_interface_set_mtu
65 Set the L2 payload MTU
66 ^^^^^^^^^^^^^^^^^^^^^^
69 (not including the L2 header) and per-protocol MTUs
71 This API message sets the L3 payload MTU. E.g. on Ethernet it is the
72 maximum size of the Ethernet payload. If a value is left as 0, then the
73 default is picked from VNET_MTU_L3.
77 autoreply define sw_interface_set_mtu
82 /* $$$$ Replace with enum */
83 u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
89 The various MTUs on an interface can be queried with the
90 sw_interface_dump/sw_interface_details calls.
94 define sw_interface_details
99 /* Per protocol MTUs */
100 u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
108 set interface mtu [packet|ip4|ip6|mpls] <value> <interface>