|
From: | Howard Li |
Subject: | [lwip-users] Are there any safe ways to bypass the tcp_write() and/or tcp_output() call stack? |
Date: | Wed, 25 May 2022 06:15:31 +0000 |
The microcontroller I am working with is a TMS320F28388D.
https://www.ti.com/product/TMS320F28388D
The application I am writing for the microcontroller uses TCP communication and has tight timing constraint requirements for outgoing data; thus a need for very high TCP throughput.
Examination of the source code revealed the following call stack starting at tcp_output().
tcp_output() V V V tcp_output_segment() V V V ip4_output_if() V V V ip4_output_if_src() V V V etharp_output() V V V etharp_output_to_arp_index() V V V ethernet_output() V V V (platform-specific packet sending function)
That is an 8 levels deep function call stack (when including tcp_output())! Even with hardware checksum generation turned on and software checksum generation turned off, I am still not getting the performance that I need. I am seriously considering the possibility of pre-defining a TCP/IP packet, changing parts of it whenever I need to send new data, and using the platform specific packet sending function to do the sending. However, I am not sure how well this will play with the TCP PCBs used for establishing the connection in the first place (more specifically I am concerned about handling the acknowledgement of packets sent via the shortcut strategy instead of tcp_write()).
Sincerely, Howard Li |
[Prev in Thread] | Current Thread | [Next in Thread] |