Large number of duplicate ACKs and retransmissions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Large number of duplicate ACKs and retransmissions

lwip-users mailing list
I'm using 2.0.3 without an RTOS for receiving streaming audio at 128kbits/s in this example. lwIP is 192.168.0.200, and it's initiating the connection. Things are ok for several seconds or tens of seconds at a time then there will be duplicate ACKs and/or re-transmissions. The eventual consequence is the server sending this stream to lwIP gracefully disconnects with a FIN. That's not shown in the attached trace as this may take 10 minutes or more.

If you look at the "capture" file, you'll see that each time there's a re-transmission, lwIP ACKed that packed just moments before. Also, this seems to occur right before or around zero window announcements. I thought maybe the issue was the TCP_WND was too high compared with the amount of PBUF space available, so I cut down on TCP_WND but that didn't help. 

I'm not seeing anything of note on the debug output. It should be noted I'm capturing this by connecting my computer (for Wireshark), the lwIP board, and the link to my router with a 10Mb hub so I can do the capture. However the same eventual disconnection occurs even when everything is connected to a switch, hence the reason for my investigation.

For what it's worth, this is running on a PIC32MZ and the load isn't very high so the ETH interrupt gets serviced very quickly.

I've also attached "dupack" which shows duplicate ACKs, but this doesn't seem to occur as often as the re-transmissions.


#define NO_SYS                        1
#define MEM_ALIGNMENT                 4
#define MEM_SIZE                    16384
#define MEMP_NUM_PBUF                32
#define MEMP_NUM_RAW_PCB            4
#define MEMP_NUM_UDP_PCB            4
#define MEMP_NUM_TCP_PCB_LISTEN     4
#define MEMP_NUM_REASSDATA             10
#define MEMP_NUM_IGMP_GROUP        1
#define PBUF_POOL_SIZE                80
#define TCP_WND                     (TCP_MSS*10)
#define TCP_MAXRTX                    5
#define TCP_MSS                        1460
#define TCP_SND_BUF                 (TCP_MSS*30)        //the number of pbufs allowed to be used for outgoing.  important for webpage
#define TCP_SND_QUEUELEN            80       
#define PBUF_POOL_BUFSIZE            512


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

=?UTF-8?b?Y2FwdHVyZS5wY2Fwbmc=?= (111K) Download Attachment
=?UTF-8?b?ZHVwYWNrLnBjYXBuZw==?= (37K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Large number of duplicate ACKs and retransmissions

lwip-users mailing list

I believe I fixed my problem in case anyone finds this later and wants to know. I was calling lwIPServiceTimers() only when an ethernet interrupt occurred, meaning the stack wasn't doing anything for up to 500ms at a time. I'm now calling it every 10ms and things seem to be working now.
On Monday, April 20, 2020, 07:06:15 AM CDT, hondgm--- via lwip-users <[hidden email]> wrote:


I'm using 2.0.3 without an RTOS for receiving streaming audio at 128kbits/s in this example. lwIP is 192.168.0.200, and it's initiating the connection. Things are ok for several seconds or tens of seconds at a time then there will be duplicate ACKs and/or re-transmissions. The eventual consequence is the server sending this stream to lwIP gracefully disconnects with a FIN. That's not shown in the attached trace as this may take 10 minutes or more.

If you look at the "capture" file, you'll see that each time there's a re-transmission, lwIP ACKed that packed just moments before. Also, this seems to occur right before or around zero window announcements. I thought maybe the issue was the TCP_WND was too high compared with the amount of PBUF space available, so I cut down on TCP_WND but that didn't help. 

I'm not seeing anything of note on the debug output. It should be noted I'm capturing this by connecting my computer (for Wireshark), the lwIP board, and the link to my router with a 10Mb hub so I can do the capture. However the same eventual disconnection occurs even when everything is connected to a switch, hence the reason for my investigation.

For what it's worth, this is running on a PIC32MZ and the load isn't very high so the ETH interrupt gets serviced very quickly.

I've also attached "dupack" which shows duplicate ACKs, but this doesn't seem to occur as often as the re-transmissions.


#define NO_SYS                        1
#define MEM_ALIGNMENT                 4
#define MEM_SIZE                    16384
#define MEMP_NUM_PBUF                32
#define MEMP_NUM_RAW_PCB            4
#define MEMP_NUM_UDP_PCB            4
#define MEMP_NUM_TCP_PCB_LISTEN     4
#define MEMP_NUM_REASSDATA             10
#define MEMP_NUM_IGMP_GROUP        1
#define PBUF_POOL_SIZE                80
#define TCP_WND                     (TCP_MSS*10)
#define TCP_MAXRTX                    5
#define TCP_MSS                        1460
#define TCP_SND_BUF                 (TCP_MSS*30)        //the number of pbufs allowed to be used for outgoing.  important for webpage
#define TCP_SND_QUEUELEN            80       
#define PBUF_POOL_BUFSIZE            512

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

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