[PATCH v1 3/3] net/af_packet: support jumbo frames
Stephen Hemminger
stephen at networkplumber.org
Mon Mar 9 17:03:47 CET 2026
On Fri, 6 Mar 2026 10:20:13 +0100
Xavier Guillaume <xavier.guillaume at ovhcloud.com> wrote:
> Derive max_rx_pktlen and max_mtu from the actual TPACKET ring
> frame size rather than the static RTE_ETHER_MAX_LEN (1518).
> This allows jumbo frame support when the user specifies a
> larger framesz devarg at vdev creation time, for example:
>
> --vdev=net_af_packet0,iface=eth0,framesz=9216
>
> The advertised capabilities now accurately reflect what the
> configured ring can handle, avoiding both false limitations
> with large frames and false promises with small ones.
>
> Signed-off-by: Xavier Guillaume <xavier.guillaume at ovhcloud.com>
> ---
AI had this observation.
Patch 3: max_mtu subtracts RTE_ETHER_CRC_LEN, but the kernel
strips CRC before placing data in the TPACKET ring, so MTU is
understated by 4 bytes. This is conservative and safe, and
matches what af_xdp does, so probably fine as-is.
More information about the dev
mailing list