From fd8647d3ddfbe6c2acc8f61a5d1bb8f1c3ff7410 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 1 Nov 2022 19:29:58 -0300 Subject: [PATCH] Doc: Add how to configure network MTU size --- Documentation/faq/index.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/faq/index.rst b/Documentation/faq/index.rst index f5a09e5f78..3abf036fd4 100644 --- a/Documentation/faq/index.rst +++ b/Documentation/faq/index.rst @@ -144,3 +144,23 @@ It is important to note that your Ethernet controller driver of your MCU needs to support CONFIG_ARCH_PHY_INTERRUPT (and implement ``arch_phy_irq()``). +How to define the MTU and MSS for the network packets? +------------------------------------------------------ + +As you probably know the "MSS = MTU - 40", so you just need to setup the MTU. +If you search for MTU in the menuconfig you will not find it, but you can +setup the MTU using the ``CONFIG_NET_ETH_PKTSIZE`` here:: + + Networking Support ---> + Driver buffer configuration ---> + (590) Ethernet packet buffer size + +Then just figure it out using this formula: + + MTU = NET_ETH_PKTSIZE - 14 + + MSS = MTU - 40 + +In this case you have MTU = 590 - 14 => MTU = 576! + +And the MSS = 576 - 40 => MSS = 536.