lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Why does enabling Debug fix this tcp_sndbuf()


From: Osborne, David
Subject: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()
Date: Wed, 24 Mar 2021 15:32:40 +0000

Hi All,

 

I’m using LwIP + FreeRTOS + Sockets on STM32H7 with external SDRAM and FLASH (Ethernet buffers are internal).  It works well until the server has to send a very large message (> 18Kbytes).  One in five attempts ends in failure.  During the transmission tcp_sndbuf() (in api_msg.c) returns zero and the connection falls over.  From what I’ve read, a common cause is that it’s waiting for an outstanding ACK.  I’m no expert, but it looks like the ACK has been sent (see Wireshark attachment).

 

When I enable certain debug settings it works every time (don’t you hate that).

 

#define TCP_DEBUG LWIP_DBG_ON

#define TCP_OUTPUT_DEBUG LWIP_DBG_ON

 

It has to be both debugs settings (just one doesn’t fix it).

 

Is there any TCP experts out there who can tell me why tcp_sndbuf() is returning 0 and the client is retransmitting (when debug is off)?

 

 

Regards

David

Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.

Attachment: failed_exchange.pcapng
Description: failed_exchange.pcapng


reply via email to

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