lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problem with loading web-pages


From: Mário Luzeiro
Subject: Re: [lwip-users] Problem with loading web-pages
Date: Wed, 21 Jul 2021 14:40:47 +0000

You will need to play with LWIP configuration options and increase the TCP 
connections it can handle at same time.
Browsers fire about 8 connections at same time to load resources on the webpage

Mario

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=ua.pt@nongnu.org> on behalf of 
Андрей Виноградов <andrey.vinogradov@teplomonitor.ru>
Sent: 20 July 2021 16:12
To: lwip-users@nongnu.org
Subject: [lwip-users] Problem with loading web-pages

Hello!

I'm working on an embedded web-server. Web-browser (Chrome) can't get all 
needed files for opening a page. Some files he can obtain only after a second 
or third try. LwIP seems to be working fine, drivers too.
It looks like LwIP doesn't see or ignore browser file requests, if there are 
"too many" of them at the same time.

Browser screenshot:
https://drive.google.com/file/d/10Hp9MEY5ajJj9Bx_m1SDxUy5nKHm7KPE/view?usp=sharing

LwIP debug log:
https://docs.google.com/document/d/1ThkPlngDfR2Z_FePcTF2aETJ3b9KEKel6IlYSOj_w18/edit?usp=sharing

I don't know where to search for bottleneck. Which debug logs should I also 
enable and change LwIP options. Can you give me some clues on where to search 
for the bug?


BTW, some suggestions on debug prints:
tcp_debug_print_flags():
disable LWIP_DEBUGF(TCP_DEBUG, ("\n")) at the end, because debug log looks like 
this:
TCP header:
+-------------------------------+
|     7100      |       80      | (src port, dest port)
+-------------------------------+
|           2064295908          | (seq no)
+-------------------------------+
|           0000006957          | (ack no)
+-------------------------------+
|  5 |   |010000|     64240     | (hdrlen, flags (ACK    <---
 ), win)
+-------------------------------+
|    0xc50c     |         0     | (chksum, urgp)
+-------------------------------+

and next add \n here
#if TCP_INPUT_DEBUG
  LWIP_DEBUGF(TCP_INPUT_DEBUG, ("+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags 
"));
  tcp_debug_print_flags(TCPH_FLAGS(tcphdr));
  LWIP_DEBUGF(TCP_INPUT_DEBUG, ("\n-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n")); // <--- 
\n on both sides
#endif /* TCP_INPUT_DEBUG */


http.c:
LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\"\n"));
Extra quotation mark. Probably should be just
LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("Received GET request\n"));

Thx!

reply via email to

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