Hi Meganathan, >The main purpose of the application is to get max TCP throughput(10Gbps). >Application is in full receiving(server) mode, which just sends ACK for the >client data. >The lwIP application and client app are cross connected with 10Gbps intel >82599 NIC card. >The application has three threads. Each thread is pinned to a separate >core(Intel Xeon 3.1 GHz).
> If I set MSS size as 1460, I see ~130K packets per second(1.3Gbps). As far as I understand what lwIP library is ("A Lightweight TCP/IP stack") it was not designed for these kind of targets. i.e: even if you are using a X CPU with x GHz speed, to reach more throughput you would need to design all the code for cache awareness. Even with that, with the package routine handling and OS overhead, I'm wondering where the bottleneck will be. I'm just a curious here and maybe the others could give a more informed opinion but it doesn't sound to me the lwIP is the best fit for that job. Mario ________________________________________ From: lwip-users-bounces+mrluzeiro=ua...@nongnu.org <lwip-users-bounces+mrluzeiro=ua...@nongnu.org> on behalf of Meganathan Raja Mani <meganathanr...@gmail.com> Sent: 21 November 2024 16:43 To: Mailing list for lwIP users Subject: Re: [lwip-users] Maximizing TCP throughput You don't often get email from meganathanr...@gmail.com. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Thanks to everyone. Just figure it out the issue. When I set the MSS size as 9K and packet length on the client side as 9K, I see only 2K packets per second. #define TCP_MSS 9000 If I set MSS size as 1460, I see ~130K packets per second(1.3Gbps). Still a long way to reach 10Gbps throughput. Regards, Meganathan On Fri, Nov 15, 2024 at 2:11 PM Leon Woestenberg <leon.woestenb...@gmail.com<mailto:leon.woestenb...@gmail.com>> wrote: Hi, there is a tinyhttp server example for lwIP / DPDK on github, did tou try that? Do you call tcp_output() aftern tcp_send()? Regards, Leon On Tue, 12 Nov 2024 at 17:18, Meganathan Raja Mani <meganathanr...@gmail.com<mailto:meganathanr...@gmail.com>> wrote: Hi Integrated the lwIP stack over DPDK and the application is written by using the lwIP raw API(NO_SYS=1). The main purpose of the application is to get max TCP throughput(10Gbps). Application is in full receiving(server) mode, which just sends ACK for the client data. The lwIP application and client app are cross connected with 10Gbps intel 82599 NIC card. The application has three threads. Each thread is pinned to a separate core(Intel Xeon 3.1 GHz). All the threads are running in a poll mode. 1. One thread receives the packets from DPDK and enqueues into rte ring. 2. Second thread takes the packets from rte ring and converts into pbuf and then passes it to lwIP stack by calling ip_input function. In the receive callback, the app just frees the pbuf(does nothing). 3. Third thread reads data from lwIP stack and sends out to DPDK Changed following things in lwIP stack. #define TCP_TMR_INTERVAL 5 /* The TCP timer interval in milliseconds. */ #define MEMP_NUM_PBUF (10028) #define MEMP_NUM_TCP_SEG 160 #define TCP_SND_QUEUELEN MEMP_NUM_TCP_SEG #define PBUF_POOL_SIZE (10 * 1024) #define TCP_MSS 1460 #define TCP_WND 65535 #define LWIP_CHECKSUM_ON_COPY 1 #define TCP_SND_BUF 65535 #define TCP_SNDLOWAT TCP_SND_BUF/2 #define MEMP_NUM_TCPIP_MSG_INPKT 160 #define CHECKSUM_CHECK_IP 0 #define CHECKSUM_CHECK_TCP 0 #define LWIP_DEBUG 0 #define LWIP_ICMP 1 #define MEM_USE_POOLS 1 #define MEM_SIZE (128 * 1024 * 1024) #define MEM_ALIGNMENT 4 #define ETH_PAD_SIZE 2 #define LWIP_CHKSUM_ALGORITHM 2 #define LWIP_TCP_KEEPALIVE 1 Disable nagle(tcp_nagle_disable) for the pcb The stats_display() function doesn’t show any errors. With this,I can get max 2K packets per second(25 Mbps), which is very low. Any info about the max throughput can we get it with lwIP TCP protocol on any platform? Please let me know what I should do to get max throughput (line rate 10 Gbps). Regards, Meganathan _______________________________________________ lwip-users mailing list lwip-users@nongnu.org<mailto:lwip-users@nongnu.org> https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list lwip-users@nongnu.org<mailto:lwip-users@nongnu.org> https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users