lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] WG: Webserver based on lwip 1.4.1


From: Keppler, Uwe
Subject: [lwip-users] WG: Webserver based on lwip 1.4.1
Date: Thu, 10 Jan 2019 12:03:24 +0000

 

 

Von: Keppler, Uwe
Gesendet: Montag, 7. Januar 2019 09:26
An: 'address@hidden' <address@hidden>
Betreff: Webserver based on lwip 1.4.1

 

Hello,

 

I have a webserver application based on lwip 1.4.1 and found the following problem:

 

In my index.html I have linked a css file and a _javascript_ file.

So if the index.html is received by the browser he immediately send two requests to get the linked file.

If this is repeated a couple of times or the F5 (reload) button is kept pressed the lwip stacks crashs.

 

I tried to investigate on that by using debug infos and found a message ”memp out of memory pbuf_pool”.

The stacks in a loop and waits endless for pbufs to become available.

Furthermore I found if I go to the file etharp.c and add a delay of 1ms (vTaskDelay) in function “etharp_send_ip

Before the lowlevel_output function is called the problem is gone.

 

I tried with lwip 2.1.0 but the problem is the same and even more worse.

 

Does anyone have an idea what is the reason for that and how it can be solved?

 

 

static err_t

etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst)

{

  struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload;

 

  LWIP_ASSERT("netif->hwaddr_len must be the same as ETHARP_HWADDR_LEN for etharp!",

              (netif->hwaddr_len == ETHARP_HWADDR_LEN));

  ETHADDR32_COPY(&ethhdr->dest, dst);

  ETHADDR16_COPY(&ethhdr->src, src);

  ethhdr->type = PP_HTONS(ETHTYPE_IP);

  LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_send_ip: sending packet %p\n", (void *)p));

  vTaskDelay(1);

  /* send the packet */

  return netif->linkoutput(netif, p);

}

 

 

 

 

 

 

 

Kind regards

 

i.A. Uwe Keppler

Forschung & Entwicklung

Research & Development

 

PolyElectronics-email 

Polytron Electronics GmbH & Co. KG

Langwiesenweg 64-71

D-75323 Bad Wildbad

 

Tel.:      +49 7081 1702-43

Fax:      +49 7081 1702-60

 

eMail: address@hidden

Internet: http://www.polytron.de

 

Beschreibung: Beschreibung: FB-FindUsonFacebook-online-144

 

HRA 330639 Amtsgericht Stuttgart, Sitz: Bad Wildbad, Komplementär: Polytron-Vertrieb GmbH, Sitz: Bad Wildbad, HRB 330330 Amtsgericht Stuttgart, Geschäftsführer: Dipl.-Ing. Wolfgang Schlüter

 

Diese eMail enthält vertrauliche oder rechtlich geschützte Informationen. Wenn Sie nicht der beabsichtigte Empfänger sind, informieren Sie bitte sofort den Absender und löschen Sie diese eMail.

Das unbefugte Kopieren dieser eMail oder die unbefugte Weitergabe der enthaltenen Informationen ist nicht gestattet.

 

The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message.

Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited.

_____________________________________________________________________________

 

 


reply via email to

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