Hi,
I'm not an tcpip expert too, but I've worked with lwip for past few weeks. I 
had exactly the same problem like yours, also using SAM7X256 processor.
I solved the problem changing following thing in api_msg.c:

/* This is the Nagle algorithm: inhibit the sending of new TCP
segments when new outgoing data arrives from the user if any
previously transmitted data on the connection remains
unacknowledged. */

//      if(err == ERR_OK && (msg->conn->pcb.tcp->unacked == NULL || 
(msg->conn->pcb.tcp->flags & TF_NODELAY)) ) {
  tcp_output(msg->conn->pcb.tcp);
//      }

As you see, I commented out this if statement. Well, I dont understand why it 
is written that way, and when TF_NODELAY flag is being set (it is probably 
possible to set it for a socket using BSD-style sockets api, but I dont use it).
After commenting this out, everything works fine and now I can send up to 
several megabits per second.
Its true that Windows sends first ACK after about 200ms, but when you send it a 
second packet, it starts to ACK much faster, so it works fine.

Mateusz Plocinski



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to