lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] netconn_write throughput stuck at 1024 bytes


From: DownyTif
Subject: [lwip-users] netconn_write throughput stuck at 1024 bytes
Date: Tue, 20 Jan 2009 13:15:59 -0800 (PST)

Hi,

first, I want to say that I'm new to this lwip world. I'm trying to make a
Ethernet speed test using the EVK1100 board from ATMEL (AVR32). The
communication will be between the board and a PC using 2 ports, one
dedicated to bidir requests/responses between the board and the host, the
other dedicated to maximum speed data sending from the board to the host. I
would like to be able to send packets of 32768 bytes.

I searched a lot on the suject, especially on how to configure the
lwipopts.h file. I found some usefull information, but I must say that I'm
raelly not confortable will all those options. 

Presently, for some reason, I can't send packets bigger than 1024 bytes.
Even if I write this:
writeRet = netconn_write(pNewConnection, g_pSDRAM, 2048, NETCONN_COPY);

what I get on the PC is 1024-byte packets. Tracing in the code, I found that
my connection is correctly configured ("pcb->mss" is 2048) but for some
reason, "pcb->mss" becomes 1460 somewhere (found by tracing in tcp_out.c). 

Below, I copied some of the parameters I have in the lwipopts.h file.

Thanks a lot, because I really don't know what to check at this point!!
Downy



/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
   lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
   byte alignment -> define MEM_ALIGNMENT to 2. */
#define MEM_ALIGNMENT                   4

/* MEM_SIZE: the size of the heap memory. If the application will send
a lot of data that needs to be copied, this should be set high. */
#define MEM_SIZE                        4 * 1024


/* ---------- Pbuf options ---------- */
/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
#define PBUF_POOL_SIZE                  10

/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
#define PBUF_POOL_BUFSIZE               512

/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
   link level header. Defaults to 14 for Ethernet. */
#define PBUF_LINK_HLEN                  14


/* ---------- TCP options ---------- */
#define LWIP_TCP                        1
#define TCP_TTL                         255
#define TCP_WND                        4096

/* Controls if TCP should queue segments that arrive out of
   order. Define to 0 if your device is low on memory. */
#define TCP_QUEUE_OOSEQ                 1

/* TCP Maximum segment size. */
#define TCP_MSS                         2048

/* TCP sender buffer space (bytes). */
#define TCP_SND_BUF                     TCP_MSS * 16

/* TCP sender buffer space (pbufs). This must be at least = 2 *
   TCP_SND_BUF/TCP_MSS for things to work. */
#define TCP_SND_QUEUELEN                6 * TCP_SND_BUF/TCP_MSS

/* Maximum number of retransmissions of data segments. */
#define TCP_MAXRTX                      6

/* Maximum number of retransmissions of SYN segments. */
#define TCP_SYNMAXRTX                   6
-- 
View this message in context: 
http://www.nabble.com/netconn_write-throughput-stuck-at-1024-bytes-tp21571019p21571019.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]