lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" fai


From: Tomas Mudrunka
Subject: Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake
Date: Wed, 21 Apr 2021 11:35:40 +0200
User-agent: Roundcube Webmail/1.2.3

This is a special case where locking is taken care of. However:
- SYS_LIGHTWEIGHT_PROT needs to be set (this takes care of locking the
memp pools)

I have  SYS_LIGHTWEIGHT_PROT defined as 1

- pbuf_alloc/pbuf_take/pbuf_free are ok to call from your own thread as
long as you don't use the heap (e.g. don't use PBUF_RAM, don't enable
MEMP_MEM_MALLOC)

I use PBUF_POOL to alloc pbufs

- netif->input must point to tcpip_input() to ensure the actual packet
processing takes place in lwIP thread context, not in your RX thread. To
do that, pass tcpip_input (not ethernet_input) to netif_add().

I init my interface like this:

netif_add(&mynet, &ip, &mask, &gw, NULL, mynet_init, NO_SYS ? netif_input : tcpip_input);

But i also tried this with exactly the same result:

netif_add(&mynet, &ip, &mask, &gw, NULL, mynet_init, tcpip_input);

Still have the issue...

--
S pozdravem
Best regards
     Tomáš Mudruňka - SPOJE.NET s.r.o.



reply via email to

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