From 2b4c89c9cfeeb08fb4917e846e58ac963af7dc72 Mon Sep 17 00:00:00 2001 From: Koichi Okamoto Date: Fri, 27 Dec 2019 14:50:08 +0900 Subject: [PATCH] Set CONFIG_NET_ETH_PKTSIZE to 1514 for spresense Set CONFIG_NET_ETH_PKTSIZE to 1514 when performing $ tools/configure.sh spresense/rndis configuration CONFIG_NET_ETH_PKTSIZE defines the size of ethernet packet. Ethernet packet size is 1514 including the ethernet header. This commit can send 1514 bytes packet as follow: e.g) For OpenWrt Router nsh> ping -c 1 -s 1472 192.168.1.1 PING 192.168.1.1 1472 bytes of data 1472 bytes from 192.168.1.1: icmp_seq=0 time=0 ms 1 packets transmitted, 1 received, 0% packet loss, time 1010 ms nsh> https://tools.ietf.org/html/rfc894 said at Frame Format ``` The minimum length of the data field of a packet sent over an Ethernet is 1500 octets, thus the maximum length of an IP datagram sent over an Ethernet is 1500 octets. Implementations are encouraged to support full-length packets. `` Just for your information, include/nuttx/net/ethernet.h:78:#define ETH_HDRLEN 14 /* Header size: 2*6 + 2 */ Signed-off-by: Koichi Okamoto --- boards/arm/cxd56xx/spresense/configs/rndis/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig index c1239b9fcf9d9..cb43c2721d32a 100644 --- a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig @@ -69,7 +69,7 @@ CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NETUTILS_WEBSERVER=y CONFIG_NET_ARP_SEND=y CONFIG_NET_BROADCAST=y -CONFIG_NET_ETH_PKTSIZE=1500 +CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP=y CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_LOOPBACK=y