lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] How best to use NETCONN_NOCOPY


From: Alan L
Subject: [lwip-users] How best to use NETCONN_NOCOPY
Date: Wed, 16 Apr 2008 19:09:46 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I've tried to be self-sufficient on this, but the more I learn, the more I
realize how little I know.

My focus is maximizing ftp speed of 100GB+ distributed in a tool consisting of
17 AT91SAM ARM boards sitting on a daisy-chain of ethernet switches.  The ftp
data is retrieved from iNand flash, therefore is volatile in RAM.

I have a 17k heap (MEM_SIZE).  My ftp data thread loops, reading up to 2k of
iNand data, then sends it using lwip_send, which ultimately results in the data
being copied via a netconn_write with NETCONN_COPY flag.

I really want to avoid the extra data copy, but am so far awash in failed 'blind
stabs' at achieving this.

In my mind, I would like to use more of the heap as my iNand read buffer, say
5*TCP_MSS, freezing the data that is yet unsent/unacked.  When one or more
packet's worth of data has been sent and acked, I would refill that portion of
my read buffer with more iNand data and add it to the send queue - avoiding the
netconn_write copy.

How would I keep track of the "history" of one of many packets placed on the
queue?  Would the sequence number (seqno) reference a particular item on the
queue?  I can see via "sock->conn->pcb.tcp->unacked" and "->unsent" the status
of the whole, but am wondering how to check each individual piece - to know
which portions of my read buffer can be refilled.

Questions, suggestions, what I need a better understanding of, ... would be
greatly appreciated.
Alan





reply via email to

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