Hello Again, thank you very much. I probably am just really bad at using these sources but I find it hard to find all the info so your help is really great.
So I have now a different setup, still just for testing. I think I understand better but it looks like there is some concept I am not grasping. So I have: - the "main". - The ISRs (ethernet ISR and timer ISR) So ethernet ISR and timer ISR should be in the same context if they have the same priority. The main should be like a low priority task. In the main I have a function to send data. The function either a) call tcp_sent() and tcp_write() if no data is loaded. This between disabling interrupts (all for now) so it's like a priority inversion and the ISRs should not be where they shouldn't. b) load up my buffer - a buffer that I created for the purpose. In the timer ISR: - Increment lwip timer by 5. - Call tcp_output every 10 counts, so 50ms. - Load tcp_write if there is data available and tcp_sent callback has happened. With this I can see an increase in throughput though I see many lost data - my buffer fills up too quickly. I have tried to instead just fill my buffer when TCP snd_buf is full (tcp_write() returns err_mem). I am trying to find the bottle neck with no success. In wireshark I see that never more than 2 segments are sent without an ACK. Some cases it sends 2 at the same time, get and ACK, send other 2 just 3ms later (all with len=1460). So this seems high enough throughput on some bursts. I already tried with nagle enabled and disabled. With nagle disabled I had to buffer all data into tcp_write to not run out of snd_queuelen. But it seems to me that, since I don't quite need crazy low latency, nagle should be enabled. I can see some issues with my test case even for just a test. But not sure if I am in the right path. This is very different from playing with tiny tests in Linux with Unix sockets. -- Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
