9
0
Fork 0

Fix minimum MTU... must be at lest 576

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3674 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-06-06 15:06:08 +00:00
parent 10184acdd2
commit e0b3ebce7f
6 changed files with 31 additions and 7 deletions

View File

@ -1,4 +1,4 @@
NuttX TODO List (Last updated May 31, 2011)
NuttX TODO List (Last updated June 6, 2011)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nuttx/
@ -10,7 +10,7 @@ nuttx/
(1) pthreads (sched/)
(1) C++ Support
(5) Binary loaders (binfmt/)
(15) Network (net/, drivers/net)
(16) Network (net/, drivers/net)
(2) USB (drivers/usbdev, drivers/usbhost)
(6) Libraries (lib/)
(13) File system/Generic drivers (fs/, drivers/)
@ -333,6 +333,17 @@ o Network (net/, drivers/net)
the mechanism for leaving and joining groups is hidden behind a wrapper
function so that little of this incompatibilities need be exposed.
Description: Many configurations have the MTU (CONFIG_NET_BUFSIZE) set to very small
numbers, less then the minimum MTU size that must be supported -- 576.
This can cause problems in some networks: CONFIG_NET_BUFSIZE should
be set to at least 576 in all defconfig files.
The symptoms of using very small MTU sizes can be very strange. With
Ubuntu 9.x and vsFtpd was that the total packet size did *not match* the
packet size in the IP header. This then caused a TCP checksum failure
and the packet was rejected.
Status: Open
Priority: Low... fix defconfig files as necessary.
o USB (drivers/usbdev, drivers/usbhost)
^^^^^^^^^^^^^^^^^^^^

View File

@ -209,7 +209,7 @@
#define LPC17_PKTMEM_SIZE (LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE)
#define LPC17_PKTMEM_END (LPC17_EMACRAM_BASE+LPC17_PKTMEM_SIZE)
#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + 3 + 2) & ~3)
#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3)
#define LPC17_NTXPKTS CONFIG_NET_NTXDESC
#define LPC17_NRXPKTS CONFIG_NET_NRXDESC

View File

@ -53,6 +53,7 @@
#include <nuttx/mii.h>
#include <net/uip/uip.h>
#include <net/uip/uipopt.h>
#include <net/uip/uip-arp.h>
#include <net/uip/uip-arch.h>
@ -809,7 +810,7 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv)
* imply that the packet is too big.
*/
/* else */ if (pktlen > CONFIG_NET_BUFSIZE+2)
/* else */ if (pktlen > CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE)
{
nlldbg("Too big. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n",
considx, prodidx, pktlen, *rxstat);

View File

@ -207,7 +207,7 @@ CONFIG_PHY_KS8721=y
CONFIG_PHY_AUTONEG=y
CONFIG_PHY_SPEED100=n
CONFIG_PHY_FDUPLEX=y
CONFIG_NET_EMACRAM_SIZE=8192
CONFIG_NET_EMACRAM_SIZE=8448
CONFIG_NET_NTXDESC=7
CONFIG_NET_NRXDESC=7
CONFIG_NET_REGDEBUG=n
@ -551,7 +551,7 @@ CONFIG_NET=y
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=16
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=562
CONFIG_NET_BUFSIZE=576
CONFIG_NET_TCP=y
CONFIG_NET_TCP_CONNS=16
CONFIG_NET_NTCP_READAHEAD_BUFFERS=16

View File

@ -117,7 +117,7 @@ struct uip_driver_s
#ifdef CONFIG_NET_MULTIBUFFER
uint8_t *d_buf;
#else
uint8_t d_buf[CONFIG_NET_BUFSIZE + 2];
uint8_t d_buf[CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE];
#endif
/* d_appdata points to the location where application data can be read from

View File

@ -134,6 +134,18 @@
#define UIP_REASS_MAXAGE (20*10) /* 20 seconds */
/* Network drivers often receive packets with garbage at the end
* and are longer than the size of packet in the TCP header. The
* following "fudge" factor increases the size of the I/O buffering
* by a small amount to allocate slightly oversize packets. After
* receipt, the packet size will be chopped down to the size indicated
* in the TCP header.
*/
#ifndef CONFIG_NET_GUARDSIZE
# define CONFIG_NET_GUARDSIZE 2
#endif
/* ICMP configuration options */
#if !defined(CONFIG_NET_ICMP) || defined(CONFIG_DISABLE_CLOCK)