mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile. People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header). A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length. Instead, we define the packet buffer size then derive the MTU.
The MTU is not common currency in networking. On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP). Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes. So we should be all good and without the recurring 14 byte error in MTU's and MSS's.
Squashed commit of the following:
Trivial update to fix some spacing issues.
net/: Rename several macros containing _MTU to _PKTSIZE.
net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE. This is not the MTU which does not include the size of the link layer header. This is the full size of the packet buffer memory (minus any GUARD bytes).
net/: Rename the file d_mtu in the network driver structure to d_pktsize. That value saved there is not the MTU. The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header. The MTU does not include the link layer header.
This commit is contained in:
@@ -4270,7 +4270,7 @@ set FOOBAR ABC_${FOO}_${BAR}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><b><code>CONFIG_NET_ETH_MTU=650</code></b> (or larger)</td>
|
||||
<td valign="top"><b><code>CONFIG_NET_ETH_PKTSIZE=650</code></b> (or larger)</td>
|
||||
<td>
|
||||
Per RFC2131 (p. 9), the DHCP client must be prepared to receive DHCP messages of up to
|
||||
576 bytes (excluding Ethernet, IP, or UDP headers and FCS).
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* The c5471_driver_s encapsulates all state information for a single c5471
|
||||
* hardware interface
|
||||
@@ -1224,7 +1224,7 @@ static void c5471_receive(struct c5471_driver_s *priv)
|
||||
|
||||
/* Check if the received packet will fit within the network packet buffer */
|
||||
|
||||
if (packetlen < (CONFIG_NET_ETH_MTU + 4))
|
||||
if (packetlen < (CONFIG_NET_ETH_PKTSIZE + 4))
|
||||
{
|
||||
/* Get the packet memory from words #2 and #3 of descriptor */
|
||||
|
||||
@@ -1285,7 +1285,7 @@ static void c5471_receive(struct c5471_driver_s *priv)
|
||||
* to the network for processing.
|
||||
*/
|
||||
|
||||
if (packetlen > 0 && packetlen < CONFIG_NET_ETH_MTU)
|
||||
if (packetlen > 0 && packetlen < CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
/* Set amount of data in priv->c_dev.d_len. */
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
#define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
|
||||
|
||||
#define IMXRT_BUF_SIZE ENET_ALIGN_UP(CONFIG_NET_ETH_MTU)
|
||||
#define IMXRT_BUF_SIZE ENET_ALIGN_UP(CONFIG_NET_ETH_PKTSIZE)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
@@ -1996,11 +1996,11 @@ static inline int imxrt_initphy(struct imxrt_driver_s *priv)
|
||||
|
||||
#ifdef CONFIG_IMXRT_ENETUSEMII
|
||||
rcr = ENET_RCR_CRCFWD |
|
||||
CONFIG_NET_ETH_MTU << ENET_RCR_MAX_FL_SHIFT |
|
||||
CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT |
|
||||
ENET_RCR_MII_MODE;
|
||||
#else
|
||||
rcr = ENET_RCR_RMII_MODE | ENET_RCR_CRCFWD |
|
||||
CONFIG_NET_ETH_MTU << ENET_RCR_MAX_FL_SHIFT |
|
||||
CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT |
|
||||
ENET_RCR_MII_MODE;
|
||||
#endif
|
||||
tcr = 0;
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
#define BUF ((struct eth_hdr_s *)priv->dev.d_buf)
|
||||
|
||||
#define KINETIS_BUF_SIZE ((CONFIG_NET_ETH_MTU & 0xfffffff0) + 0x10)
|
||||
#define KINETIS_BUF_SIZE ((CONFIG_NET_ETH_PKTSIZE & 0xfffffff0) + 0x10)
|
||||
|
||||
/* If this SoC has the RMII Clock Source selection configure it */
|
||||
|
||||
@@ -1807,11 +1807,11 @@ static inline int kinetis_initphy(struct kinetis_driver_s *priv)
|
||||
|
||||
#ifdef CONFIG_KINETIS_ENETUSEMII
|
||||
rcr = ENET_RCR_CRCFWD |
|
||||
CONFIG_NET_ETH_MTU << ENET_RCR_MAX_FL_SHIFT |
|
||||
CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT |
|
||||
ENET_RCR_MII_MODE;
|
||||
#else
|
||||
rcr = ENET_RCR_RMII_MODE | ENET_RCR_CRCFWD |
|
||||
CONFIG_NET_ETH_MTU << ENET_RCR_MAX_FL_SHIFT |
|
||||
CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT |
|
||||
ENET_RCR_MII_MODE;
|
||||
#endif
|
||||
tcr = 0;
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
/* Descriptor Memory Layout *********************************************************/
|
||||
/* EMAC DMA RAM and descriptor definitions. The configured number of descriptors
|
||||
* will determine the organization and the size of the descriptor and status tables.
|
||||
* There is a complex interaction between the maximum packet size (CONFIG_NET_ETH_MTU)
|
||||
* There is a complex interaction between the maximum packet size (CONFIG_NET_ETH_PKTSIZE)
|
||||
* and the number of Rx and Tx descriptors that can be supported (CONFIG_LPC17_ETH_NRXDESC
|
||||
* and CONFIG_LPC17_ETH_NTXDESC): Small buffers -> more packets. This is something that
|
||||
* needs to be tuned for you system.
|
||||
@@ -168,7 +168,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_ETH_MTU + CONFIG_NET_GUARDSIZE + 3) & ~3)
|
||||
#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3)
|
||||
#define LPC17_NTXPKTS CONFIG_LPC17_ETH_NTXDESC
|
||||
#define LPC17_NRXPKTS CONFIG_LPC17_ETH_NRXDESC
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
# define CONFIG_LPC17_ETH_PRIORITY NVIC_SYSH_PRIORITY_DEFAULT
|
||||
#endif
|
||||
|
||||
#define PKTBUF_SIZE (MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE)
|
||||
#define PKTBUF_SIZE (MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE)
|
||||
|
||||
/* Debug Configuration *****************************************************/
|
||||
/* Register debug -- can only happen of CONFIG_DEBUG_NET_INFO is selected */
|
||||
@@ -860,7 +860,7 @@ static void lpc17_rxdone_work(FAR void *arg)
|
||||
* imply that the packet is too big.
|
||||
*/
|
||||
|
||||
/* else */ if (pktlen > CONFIG_NET_ETH_MTU + CONFIG_NET_GUARDSIZE)
|
||||
/* else */ if (pktlen > CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE)
|
||||
{
|
||||
nwarn("WARNING: Too big. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n",
|
||||
considx, prodidx, pktlen, *rxstat);
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
* will use the 16-byte alignment in all cases.
|
||||
*/
|
||||
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_MTU + 4 + 15) & ~15)
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 4 + 15) & ~15)
|
||||
|
||||
#ifndef CONFIG_LPC43_ETH_BUFSIZE
|
||||
# define CONFIG_LPC43_ETH_BUFSIZE OPTIMAL_ETH_BUFSIZE
|
||||
@@ -1028,7 +1028,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv)
|
||||
|
||||
/* Set frame size */
|
||||
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_MTU);
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_PKTSIZE);
|
||||
txdesc->tdes1 = priv->dev.d_len;
|
||||
|
||||
/* Set the Buffer1 address pointer */
|
||||
@@ -1603,7 +1603,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
/* Free dropped packet buffer */
|
||||
|
||||
@@ -179,9 +179,9 @@
|
||||
CONFIG_LPC54_ETH_NTXDESC0)
|
||||
#endif
|
||||
|
||||
#define LPC54_BUFFER_SIZE MAX_NET_DEV_MTU
|
||||
#define LPC54_BUFFER_ALLOC ((MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE + 3) & ~3)
|
||||
#define LPC54_BUFFER_WORDS ((MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE + 3) >> 2)
|
||||
#define LPC54_BUFFER_SIZE MAX_NETDEV_PKTSIZE
|
||||
#define LPC54_BUFFER_ALLOC ((MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3)
|
||||
#define LPC54_BUFFER_WORDS ((MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE + 3) >> 2)
|
||||
#define LPC54_BUFFER_MAX 16384
|
||||
|
||||
/* DMA and DMA descriptor definitions */
|
||||
|
||||
@@ -216,8 +216,8 @@
|
||||
|
||||
/* EMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_PKTSIZE /* MAX size for Ethernet packet */
|
||||
|
||||
/* We need at least one more free buffer than transmit buffers */
|
||||
|
||||
@@ -316,7 +316,7 @@ static struct sam_emac_s g_emac;
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
#ifdef CONFIG_SAM34_EMAC_PREALLOCATE
|
||||
/* Preallocated data */
|
||||
@@ -1078,9 +1078,9 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
/* Get the number of bytes to copy from the buffer */
|
||||
|
||||
copylen = EMAC_RX_UNITSIZE;
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_MTU)
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
copylen = CONFIG_NET_ETH_MTU - pktlen;
|
||||
copylen = CONFIG_NET_ETH_PKTSIZE - pktlen;
|
||||
}
|
||||
|
||||
/* Get the data source. Invalidate the source memory region to
|
||||
@@ -1201,7 +1201,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
continue;
|
||||
|
||||
@@ -221,8 +221,8 @@
|
||||
|
||||
/* EMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_PKTSIZE /* MAX size for Ethernet packet */
|
||||
|
||||
/* We need at least one more free buffer than transmit buffers */
|
||||
|
||||
@@ -321,7 +321,7 @@ static struct sam_emac_s g_emac;
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
#ifdef CONFIG_SAMA5_EMACA_PREALLOCATE
|
||||
/* Preallocated data */
|
||||
@@ -1099,9 +1099,9 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
/* Get the number of bytes to copy from the buffer */
|
||||
|
||||
copylen = EMAC_RX_UNITSIZE;
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_MTU)
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
copylen = CONFIG_NET_ETH_MTU - pktlen;
|
||||
copylen = CONFIG_NET_ETH_PKTSIZE - pktlen;
|
||||
}
|
||||
|
||||
/* Get the data source. Invalidate the source memory region to
|
||||
@@ -1239,7 +1239,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
continue;
|
||||
|
||||
@@ -314,8 +314,8 @@
|
||||
|
||||
/* EMAC buffer sizes, number of buffers, and number of descriptors **********/
|
||||
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||
#define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_PKTSIZE /* MAX size for Ethernet packet */
|
||||
|
||||
/* Timing *******************************************************************/
|
||||
/* TX poll delay = 1 seconds. CLK_TCK is the number of clock ticks per
|
||||
@@ -694,7 +694,7 @@ static const struct sam_emacattr_s g_emac0_attr =
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf0[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf0[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* EMAC0 peripheral state */
|
||||
|
||||
@@ -774,7 +774,7 @@ static const struct sam_emacattr_s g_emac1_attr =
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf1[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf1[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* EMAC1 peripheral state */
|
||||
|
||||
@@ -1434,9 +1434,9 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
/* Get the number of bytes to copy from the buffer */
|
||||
|
||||
copylen = EMAC_RX_UNITSIZE;
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_MTU)
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
copylen = CONFIG_NET_ETH_MTU - pktlen;
|
||||
copylen = CONFIG_NET_ETH_PKTSIZE - pktlen;
|
||||
}
|
||||
|
||||
/* Get the data source. Invalidate the source memory region to
|
||||
@@ -1574,7 +1574,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
continue;
|
||||
|
||||
@@ -140,14 +140,14 @@
|
||||
|
||||
/* GMAC buffer sizes, number of buffers, and number of descriptors. *********/
|
||||
|
||||
#define GMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define GMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */
|
||||
#define GMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */
|
||||
#define GMAC_TX_UNITSIZE CONFIG_NET_ETH_PKTSIZE /* MAX size for Ethernet packet */
|
||||
|
||||
/* The MAC can support frame lengths up to 1536 bytes */
|
||||
|
||||
#define GMAC_MAX_FRAMELEN 1536
|
||||
#if CONFIG_NET_ETH_MTU >GMAC_MAX_FRAMELEN
|
||||
# error CONFIG_NET_ETH_MTU is too large
|
||||
#if CONFIG_NET_ETH_PKTSIZE >GMAC_MAX_FRAMELEN
|
||||
# error CONFIG_NET_ETH_PKTSIZE is too large
|
||||
#endif
|
||||
|
||||
/* We need at least one more free buffer than transmit buffers */
|
||||
@@ -247,7 +247,7 @@ static struct sam_gmac_s g_gmac;
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
#ifdef CONFIG_SAMA5_GMAC_PREALLOCATE
|
||||
/* Preallocated data */
|
||||
@@ -1031,9 +1031,9 @@ static int sam_recvframe(struct sam_gmac_s *priv)
|
||||
/* Get the number of bytes to copy from the buffer */
|
||||
|
||||
copylen = GMAC_RX_UNITSIZE;
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_MTU)
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
copylen = CONFIG_NET_ETH_MTU - pktlen;
|
||||
copylen = CONFIG_NET_ETH_PKTSIZE - pktlen;
|
||||
}
|
||||
|
||||
/* Get the data source. Invalidate the source memory region to
|
||||
@@ -1169,7 +1169,7 @@ static void sam_receive(struct sam_gmac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
continue;
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
*/
|
||||
|
||||
#define EMAC_RX_UNITSIZE EMAC_ALIGN_UP(128)
|
||||
#define EMAC_TX_UNITSIZE EMAC_ALIGN_UP(CONFIG_NET_ETH_MTU)
|
||||
#define EMAC_TX_UNITSIZE EMAC_ALIGN_UP(CONFIG_NET_ETH_PKTSIZE)
|
||||
#define DUMMY_BUFSIZE EMAC_ALIGN_UP(128)
|
||||
#define DUMMY_NBUFFERS 2
|
||||
|
||||
@@ -852,7 +852,7 @@ static const struct sam_emacattr_s g_emac0_attr =
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf0[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf0[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* EMAC0 peripheral state */
|
||||
|
||||
@@ -932,7 +932,7 @@ static const struct sam_emacattr_s g_emac1_attr =
|
||||
* a full packet.
|
||||
*/
|
||||
|
||||
static uint8_t g_pktbuf1[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf1[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* EMAC1 peripheral state */
|
||||
|
||||
@@ -1762,9 +1762,9 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
||||
/* Get the number of bytes to copy from the buffer */
|
||||
|
||||
copylen = EMAC_RX_UNITSIZE;
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_MTU)
|
||||
if ((pktlen + copylen) > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
copylen = CONFIG_NET_ETH_MTU - pktlen;
|
||||
copylen = CONFIG_NET_ETH_PKTSIZE - pktlen;
|
||||
}
|
||||
|
||||
/* Get the data source. Invalidate the source memory region to
|
||||
@@ -1917,7 +1917,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid)
|
||||
* configuration (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Dropped, Too big: %d\n", dev->d_len);
|
||||
NETDEV_RXERRORS(&priv->dev);
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
* will use the 16-byte alignment in all cases.
|
||||
*/
|
||||
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_MTU + 4 + 15) & ~15)
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 4 + 15) & ~15)
|
||||
|
||||
#ifndef CONFIG_STM32_ETH_BUFSIZE
|
||||
# define CONFIG_STM32_ETH_BUFSIZE OPTIMAL_ETH_BUFSIZE
|
||||
@@ -1134,7 +1134,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv)
|
||||
|
||||
/* Set frame size */
|
||||
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_MTU);
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_PKTSIZE);
|
||||
txdesc->tdes1 = priv->dev.d_len;
|
||||
|
||||
/* Set the Buffer1 address pointer */
|
||||
@@ -1709,7 +1709,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nerr("ERROR: Dropped, Too big: %d\n", dev->d_len);
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
* will use the 16-byte alignment in all cases.
|
||||
*/
|
||||
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_MTU + 4 + 15) & ~15)
|
||||
#define OPTIMAL_ETH_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 4 + 15) & ~15)
|
||||
|
||||
#ifdef CONFIG_STM32F7_ETH_BUFSIZE
|
||||
# define ETH_BUFSIZE CONFIG_STM32F7_ETH_BUFSIZE
|
||||
@@ -1159,7 +1159,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv)
|
||||
|
||||
/* Set frame size */
|
||||
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_MTU);
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_PKTSIZE);
|
||||
txdesc->tdes1 = priv->dev.d_len;
|
||||
|
||||
/* Set the Buffer1 address pointer */
|
||||
@@ -1784,7 +1784,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: DROPPED Too big: %d\n", dev->d_len);
|
||||
continue;
|
||||
|
||||
@@ -216,7 +216,7 @@ struct tiva_driver_s
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* Ethernet peripheral state */
|
||||
|
||||
@@ -713,7 +713,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
|
||||
* and 4 byte FCS that are not copied into the network packet.
|
||||
*/
|
||||
|
||||
if (pktlen > (CONFIG_NET_ETH_MTU + 6) || pktlen <= (ETH_HDRLEN + 6))
|
||||
if (pktlen > (CONFIG_NET_ETH_PKTSIZE + 6) || pktlen <= (ETH_HDRLEN + 6))
|
||||
{
|
||||
int wordlen;
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
* will use the 16-byte alignment in all cases.
|
||||
*/
|
||||
|
||||
#define OPTIMAL_EMAC_BUFSIZE ((CONFIG_NET_ETH_MTU + 4 + 15) & ~15)
|
||||
#define OPTIMAL_EMAC_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 4 + 15) & ~15)
|
||||
|
||||
#if OPTIMAL_EMAC_BUFSIZE > EMAC_TDES1_TBS1_MASK
|
||||
# error OPTIMAL_EMAC_BUFSIZE is too large
|
||||
@@ -1136,7 +1136,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv)
|
||||
|
||||
/* Set frame size */
|
||||
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_MTU);
|
||||
DEBUGASSERT(priv->dev.d_len <= CONFIG_NET_ETH_PKTSIZE);
|
||||
txdesc->tdes1 = priv->dev.d_len;
|
||||
|
||||
/* Set the Buffer1 address pointer */
|
||||
@@ -1711,7 +1711,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv)
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
if (dev->d_len > CONFIG_NET_ETH_MTU)
|
||||
if (dev->d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("DROPPED: Too big: %d\n", dev->d_len);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ struct emac_driver_s
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* Driver state structure */
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
* type).
|
||||
*/
|
||||
|
||||
#define PIC32MX_ALIGNED_BUFSIZE ((CONFIG_NET_ETH_MTU + 3) & ~3)
|
||||
#define PIC32MX_ALIGNED_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 3) & ~3)
|
||||
|
||||
/* The number of buffers will, then, be one for each descriptor plus one extra */
|
||||
|
||||
@@ -1021,7 +1021,7 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv)
|
||||
*/
|
||||
|
||||
DEBUGASSERT(priv->pd_dev.d_buf != NULL &&
|
||||
priv->pd_dev.d_len < CONFIG_NET_ETH_MTU);
|
||||
priv->pd_dev.d_len < CONFIG_NET_ETH_PKTSIZE);
|
||||
|
||||
/* Increment statistics and dump the packet (if so configured) */
|
||||
|
||||
@@ -1393,7 +1393,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
|
||||
* imply that the packet is too big.
|
||||
*/
|
||||
|
||||
else if (priv->pd_dev.d_len > CONFIG_NET_ETH_MTU)
|
||||
else if (priv->pd_dev.d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nerr("ERROR: Too big. packet length: %d rxdesc: %08x\n",
|
||||
priv->pd_dev.d_len, rxdesc->status);
|
||||
@@ -2208,7 +2208,7 @@ static int pic32mx_ifup(struct net_driver_s *dev)
|
||||
* length restriction is desired, program this 16-bit field.
|
||||
*/
|
||||
|
||||
pic32mx_putreg(CONFIG_NET_ETH_MTU, PIC32MX_EMAC1_MAXF);
|
||||
pic32mx_putreg(CONFIG_NET_ETH_PKTSIZE, PIC32MX_EMAC1_MAXF);
|
||||
|
||||
/* Configure the MAC station address in the EMAC1SA0, EMAC1SA1 and
|
||||
* EMAC1SA2 registers (these registers are loaded at reset from the
|
||||
@@ -2273,7 +2273,7 @@ static int pic32mx_ifup(struct net_driver_s *dev)
|
||||
* noticeable impact on the performance.
|
||||
*/
|
||||
|
||||
pic32mx_putreg(ETH_CON2_RXBUFSZ(CONFIG_NET_ETH_MTU), PIC32MX_ETH_CON2);
|
||||
pic32mx_putreg(ETH_CON2_RXBUFSZ(CONFIG_NET_ETH_PKTSIZE), PIC32MX_ETH_CON2);
|
||||
|
||||
/* Reset state varialbes */
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
* type).
|
||||
*/
|
||||
|
||||
#define PIC32MZ_ALIGNED_BUFSIZE ((CONFIG_NET_ETH_MTU + 3) & ~3)
|
||||
#define PIC32MZ_ALIGNED_BUFSIZE ((CONFIG_NET_ETH_PKTSIZE + 3) & ~3)
|
||||
|
||||
/* The number of buffers will, then, be one for each descriptor plus one extra */
|
||||
|
||||
@@ -1048,7 +1048,7 @@ static int pic32mz_transmit(struct pic32mz_driver_s *priv)
|
||||
*/
|
||||
|
||||
DEBUGASSERT(priv->pd_dev.d_buf != NULL &&
|
||||
priv->pd_dev.d_len < CONFIG_NET_ETH_MTU);
|
||||
priv->pd_dev.d_len < CONFIG_NET_ETH_PKTSIZE);
|
||||
|
||||
/* Increment statistics and dump the packet (if so configured) */
|
||||
|
||||
@@ -1420,7 +1420,7 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv)
|
||||
* imply that the packet is too big.
|
||||
*/
|
||||
|
||||
else if (priv->pd_dev.d_len > CONFIG_NET_ETH_MTU)
|
||||
else if (priv->pd_dev.d_len > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
nwarn("WARNING: Too big. packet length: %d rxdesc: %08x\n",
|
||||
priv->pd_dev.d_len, rxdesc->status);
|
||||
@@ -2235,7 +2235,7 @@ static int pic32mz_ifup(struct net_driver_s *dev)
|
||||
* length restriction is desired, program this 16-bit field.
|
||||
*/
|
||||
|
||||
pic32mz_putreg(CONFIG_NET_ETH_MTU, PIC32MZ_EMAC1_MAXF);
|
||||
pic32mz_putreg(CONFIG_NET_ETH_PKTSIZE, PIC32MZ_EMAC1_MAXF);
|
||||
|
||||
/* Configure the MAC station address in the EMAC1SA0, EMAC1SA1 and
|
||||
* EMAC1SA2 registers (these registers are loaded at reset from the
|
||||
@@ -2305,7 +2305,7 @@ static int pic32mz_ifup(struct net_driver_s *dev)
|
||||
* noticeable impact on the performance.
|
||||
*/
|
||||
|
||||
pic32mz_putreg(ETH_CON2_RXBUFSZ(CONFIG_NET_ETH_MTU), PIC32MZ_ETH_CON2);
|
||||
pic32mz_putreg(ETH_CON2_RXBUFSZ(CONFIG_NET_ETH_PKTSIZE), PIC32MZ_ETH_CON2);
|
||||
|
||||
/* Reset state varialbes */
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ struct misoc_net_driver_s
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* Driver state structur */
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ endif
|
||||
ifeq ($(CONFIG_SIM_NETDEV),y)
|
||||
ifeq ($(CONFIG_NET_ETHERNET),y)
|
||||
CSRCS += up_netdriver.c
|
||||
HOSTCFLAGS += -DNETDEV_BUFSIZE=$(CONFIG_NET_ETH_MTU)
|
||||
HOSTCFLAGS += -DNETDEV_BUFSIZE=$(CONFIG_NET_ETH_PKTSIZE)
|
||||
ifneq ($(HOSTOS),Cygwin)
|
||||
HOSTSRCS += up_tapdev.c up_netdev.c
|
||||
ifeq ($(CONFIG_SIM_NET_BRIDGE),y)
|
||||
|
||||
@@ -86,7 +86,7 @@ static struct timer g_periodic_timer;
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* Ethernet peripheral state */
|
||||
|
||||
@@ -180,7 +180,7 @@ void netdriver_loop(void)
|
||||
/* netdev_read will return 0 on a timeout event and >0 on a data received event */
|
||||
|
||||
g_sim_dev.d_len = netdev_read((FAR unsigned char *)g_sim_dev.d_buf,
|
||||
CONFIG_NET_ETH_MTU);
|
||||
CONFIG_NET_ETH_PKTSIZE);
|
||||
|
||||
/* Disable preemption through to the following so that it behaves a little more
|
||||
* like an interrupt (otherwise, the following logic gets pre-empted an behaves
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
# define CONFIG_EZ80_RAMADDR EZ80_EMACSRAM
|
||||
#endif
|
||||
|
||||
#if CONFIG_NET_ETH_MTU > 1518
|
||||
#if CONFIG_NET_ETH_PKTSIZE > 1518
|
||||
# error "MAXF size too big for this device"
|
||||
#endif
|
||||
|
||||
@@ -360,7 +360,7 @@ struct ez80emac_driver_s
|
||||
|
||||
/* A single packet buffer is used */
|
||||
|
||||
static uint8_t g_pktbuf[MAX_NET_DEV_MTU + CONFIG_NET_GUARDSIZE];
|
||||
static uint8_t g_pktbuf[MAX_NETDEV_PKTSIZE + CONFIG_NET_GUARDSIZE];
|
||||
|
||||
/* There is only a single instance of driver private data (because there is
|
||||
* only one EMAC interface.
|
||||
@@ -1272,10 +1272,10 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
|
||||
* for the network buffer configuration (I routinely see
|
||||
*/
|
||||
|
||||
if (rxdesc->pktsize > CONFIG_NET_ETH_MTU)
|
||||
if (rxdesc->pktsize > CONFIG_NET_ETH_PKTSIZE)
|
||||
{
|
||||
ninfo("Truncated oversize RX pkt: %d->%d\n", rxdesc->pktsize, CONFIG_NET_ETH_MTU);
|
||||
pktlen = CONFIG_NET_ETH_MTU;
|
||||
ninfo("Truncated oversize RX pkt: %d->%d\n", rxdesc->pktsize, CONFIG_NET_ETH_PKTSIZE);
|
||||
pktlen = CONFIG_NET_ETH_PKTSIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ CONFIG_NETUTILS_TFTPC=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=650
|
||||
CONFIG_NET_ETH_PKTSIZE=650
|
||||
CONFIG_NET_HOSTNAME="Bambino-200E"
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
|
||||
@@ -226,7 +226,7 @@ Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_ETHERNET=y : Support Ethernet data link
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=590 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=590 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : Enable ARP
|
||||
CONFIG_NET_ARPTAB_SIZE=16 : ARP table size
|
||||
CONFIG_NET_ARP_IPIN=y : Enable ARP address harvesting
|
||||
|
||||
@@ -26,7 +26,7 @@ CONFIG_MAX_TASKS=16
|
||||
CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_NET=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=590
|
||||
CONFIG_NET_ETH_PKTSIZE=590
|
||||
CONFIG_NET_ICMPv6=y
|
||||
CONFIG_NET_ICMPv6_NEIGHBOR=y
|
||||
CONFIG_NET_ICMPv6_SOCKET=y
|
||||
|
||||
@@ -194,7 +194,7 @@ Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_ETHERNET=y : Support Ethernet data link
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=590 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=590 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : Enable ARP
|
||||
CONFIG_NET_ARPTAB_SIZE=16 : ARP table size
|
||||
CONFIG_NET_ARP_IPIN=y : Enable ARP address harvesting
|
||||
@@ -805,9 +805,9 @@ Freedom K64F Configuration Options
|
||||
Kenetis ethernet controller settings
|
||||
|
||||
CONFIG_ENET_NRXBUFFERS - Number of RX buffers. The size of one
|
||||
buffer is determined by CONFIG_NET_ETH_MTU. Default: 6
|
||||
buffer is determined by CONFIG_NET_ETH_PKTSIZE. Default: 6
|
||||
CONFIG_ENET_NTXBUFFERS - Number of TX buffers. The size of one
|
||||
buffer is determined by CONFIG_NET_ETH_MTU. Default: 2
|
||||
buffer is determined by CONFIG_NET_ETH_PKTSIZE. Default: 2
|
||||
CONFIG_ENET_USEMII - Use MII mode. Default: RMII mode.
|
||||
CONFIG_ENET_PHYADDR - PHY address
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_ETHERNET=y : Support Ethernet data link
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=590 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=590 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : Enable ARP
|
||||
CONFIG_NET_ARPTAB_SIZE=16 : ARP table size
|
||||
CONFIG_NET_ARP_IPIN=y : Enable ARP address harvesting
|
||||
@@ -812,9 +812,9 @@ Freedom K66F Configuration Options
|
||||
Kenetis ethernet controller settings
|
||||
|
||||
CONFIG_ENET_NRXBUFFERS - Number of RX buffers. The size of one
|
||||
buffer is determined by CONFIG_NET_ETH_MTU. Default: 6
|
||||
buffer is determined by CONFIG_NET_ETH_PKTSIZE. Default: 6
|
||||
CONFIG_ENET_NTXBUFFERS - Number of TX buffers. The size of one
|
||||
buffer is determined by CONFIG_NET_ETH_MTU. Default: 2
|
||||
buffer is determined by CONFIG_NET_ETH_PKTSIZE. Default: 2
|
||||
CONFIG_ENET_USEMII - Use MII mode. Default: RMII mode.
|
||||
CONFIG_ENET_PHYADDR - PHY address
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=1500
|
||||
CONFIG_NET_ETH_PKTSIZE=1500
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_LOOPBACK=y
|
||||
@@ -94,7 +94,7 @@ CONFIG_NET_STATISTICS=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCP_KEEPALIVE=y
|
||||
CONFIG_NET_TUN=y
|
||||
CONFIG_NET_TUN_MTU=1500
|
||||
CONFIG_NET_TUN_PKTSIZE=1500
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_BINDTODEVICE=y
|
||||
CONFIG_NFILE_DESCRIPTORS=45
|
||||
|
||||
@@ -81,7 +81,7 @@ CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=1500
|
||||
CONFIG_NET_ETH_PKTSIZE=1500
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_LOOPBACK=y
|
||||
|
||||
@@ -25,7 +25,7 @@ CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NETUTILS_TFTPC=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=650
|
||||
CONFIG_NET_ETH_PKTSIZE=650
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_MAX_LISTENPORTS=8
|
||||
|
||||
@@ -43,7 +43,7 @@ CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=1400
|
||||
CONFIG_NET_ETH_PKTSIZE=1400
|
||||
CONFIG_NET_GUARDSIZE=648
|
||||
CONFIG_NET_HOSTNAME="nuttx"
|
||||
CONFIG_NET_ICMP=y
|
||||
|
||||
@@ -62,7 +62,7 @@ CONFIG_NETDEVICES=y
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_ETH_MTU=1500
|
||||
CONFIG_NET_ETH_PKTSIZE=1500
|
||||
CONFIG_NET_FTMAC100=y
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
|
||||
@@ -837,7 +837,7 @@ Configuration Sub-Directories
|
||||
use the UART1 hardware flow control yet.
|
||||
|
||||
NOTE: The Linux slip module hard-codes its MTU size to 296. So you
|
||||
might as well set CONFIG_NET_ETH_MTU to 296 as well.
|
||||
might as well set CONFIG_NET_ETH_PKTSIZE to 296 as well.
|
||||
|
||||
4. After turning over the line to the SLIP driver, you must configure
|
||||
the network interface. Again, you do this using the standard
|
||||
|
||||
@@ -25,7 +25,7 @@ CONFIG_NET=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETUTILS_TFTPC=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_ETH_MTU=650
|
||||
CONFIG_NET_ETH_PKTSIZE=650
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
|
||||
@@ -42,7 +42,7 @@ CONFIG_NETUTILS_DHCPC=y
|
||||
CONFIG_NETUTILS_PING=y
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=800
|
||||
CONFIG_NET_ETH_PKTSIZE=800
|
||||
CONFIG_NET_GUARDSIZE=32
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_PKT=y
|
||||
|
||||
@@ -223,7 +223,7 @@ Networking Support
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
CONFIG_NET_TCPBACKLOG=y : Support TCP/IP backlog
|
||||
CONFIG_NET_TCP_READAHEAD_BUFSIZE=536 Read-ahead buffer size
|
||||
|
||||
@@ -811,7 +811,7 @@ Networking
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
CONFIG_NET_TCPBACKLOG=y : Support TCP/IP backlog
|
||||
CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 : Read-ahead buffer size
|
||||
|
||||
@@ -976,7 +976,7 @@ Networking
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Networking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
CONFIG_NET_TCPBACKLOG=y : Support TCP/IP backlog
|
||||
CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 : Read-ahead buffer size
|
||||
|
||||
@@ -1339,7 +1339,7 @@ Networking
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : ARP support should be enabled
|
||||
CONFIG_NET_ARP_IPIN=y : IP address harvesting (optional)
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
|
||||
@@ -55,7 +55,7 @@ CONFIG_MMCSD_SDIO=y
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=590
|
||||
CONFIG_NET_ETH_PKTSIZE=590
|
||||
CONFIG_NET_ICMPv6_NEIGHBOR=y
|
||||
CONFIG_NET_ICMPv6_SOCKET=y
|
||||
CONFIG_NET_ICMPv6=y
|
||||
|
||||
@@ -390,7 +390,7 @@ Selecting the GMAC peripheral
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : ARP support should be enabled
|
||||
CONFIG_NET_ARP_SEND=y : Use ARP to get peer address before sending
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
|
||||
@@ -54,7 +54,7 @@ CONFIG_MTD_CONFIG=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_NET_6LOWPAN=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=590
|
||||
CONFIG_NET_ETH_PKTSIZE=590
|
||||
CONFIG_NET_HOSTNAME="MRF24J40-Hub"
|
||||
CONFIG_NET_ICMPv6_NEIGHBOR=y
|
||||
CONFIG_NET_ICMPv6_SOCKET=y
|
||||
|
||||
@@ -706,7 +706,7 @@ Selecting the GMAC peripheral
|
||||
Networking Support
|
||||
CONFIG_NET=y : Enable Neworking
|
||||
CONFIG_NET_SOCKOPTS=y : Enable socket operations
|
||||
CONFIG_NET_ETH_MTU=562 : Maximum packet size (MTU) 1518 is more standard
|
||||
CONFIG_NET_ETH_PKTSIZE=562 : Maximum packet size 1518 is more standard
|
||||
CONFIG_NET_ARP=y : ARP support should be enabled
|
||||
CONFIG_NET_ARP_SEND=y : Use ARP to get peer address before sending
|
||||
CONFIG_NET_TCP=y : Enable TCP/IP networking
|
||||
@@ -2483,7 +2483,7 @@ Configuration sub-directories
|
||||
configuration. The CONFIG_VNCSERVER_UPDATE_BUFSIZE determines the
|
||||
size of update messages. That is 1024 bytes in that configuration
|
||||
(the full message with the header will be a little larger). The
|
||||
MTU (CONFIG_NET_ETH_MTU) is set to 590 so that a full update will
|
||||
CONFIG_NET_ETH_PKTSIZE is set to 590 so that a full update will
|
||||
require several packets.
|
||||
|
||||
Write buffering also effects network performance. This will break
|
||||
@@ -2632,7 +2632,7 @@ Configuration sub-directories
|
||||
configuration. The CONFIG_VNCSERVER_UPDATE_BUFSIZE determines the
|
||||
size of update messages. That is 1024 bytes in that configuration
|
||||
(the full message with the header will be a little larger). The
|
||||
MTU (CONFIG_NET_ETH_MTU) is set to 590 so that a full update will
|
||||
CONFIG_NET_ETH_PKTSIZE is set to 590 so that a full update will
|
||||
require several packets.
|
||||
|
||||
Write buffering also effects network performance. This will break
|
||||
|
||||
@@ -55,7 +55,7 @@ CONFIG_MTD_CONFIG=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_NET_6LOWPAN=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=590
|
||||
CONFIG_NET_ETH_PKTSIZE=590
|
||||
CONFIG_NET_HOSTNAME="MRF24J40-Hub"
|
||||
CONFIG_NET_ICMPv6_NEIGHBOR=y
|
||||
CONFIG_NET_ICMPv6_SOCKET=y
|
||||
|
||||
@@ -30,7 +30,7 @@ CONFIG_NETUTILS_TFTPC=y
|
||||
CONFIG_NETUTILS_THTTPD=y
|
||||
CONFIG_NETUTILS_WEBCLIENT=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=768
|
||||
CONFIG_NET_ETH_PKTSIZE=768
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
|
||||
@@ -27,7 +27,7 @@ CONFIG_NET=y
|
||||
CONFIG_NETDB_DNSCLIENT_ENTRIES=4
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=650
|
||||
CONFIG_NET_ETH_PKTSIZE=650
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
|
||||
@@ -26,7 +26,7 @@ CONFIG_NET=y
|
||||
CONFIG_NETDB_DNSCLIENT_ENTRIES=4
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_MTU=650
|
||||
CONFIG_NET_ETH_PKTSIZE=650
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
|
||||
@@ -37,7 +37,7 @@ CONFIG_MAX_WDOGPARMS=2
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_NET_ARP_IPIN=y
|
||||
CONFIG_NET_ETH_MTU=1500
|
||||
CONFIG_NET_ETH_PKTSIZE=1500
|
||||
CONFIG_NET_HOSTNAME="butterfly2"
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user