Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-25 Thread Trampas Stern
Doing the cache invalidation is best for speed. I am personally the type of person who thinks that every problem needs two fixes, first is the fix for the problem, second is the fix as to why the problem came into existence and/or was not found earlier. Hence I like to know that when I invalidat

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-25 Thread Indan Zupancic
Hello, Beware that everything should be cache line aligned! To be future proof assume cache size is 64 bytes, even if it's 32 bytes. I recommend making the TX descriptors non-cacheable, bufferable and the RX descriptors non-cacheable, non-bufferable and the DMA buffers fully cacheable and use ca

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-25 Thread goldsi...@gmx.de
Am 25.03.2021 um 12:44 schrieb Trampas Stern: > Rather than flushing cache you can create a non-cached section of RAM in > the linker script and put buffers there. But be aware that using non-cached buffers might be slow. While putting the DMA descriptors into uncached memory is a good solution (y

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-25 Thread Trampas Stern
; > David > > > > *From:* lwip-users leicabiosystems....@nongnu.org> *On Behalf Of *Trampas Stern > *Sent:* Thursday, 25 March 2021 4:10 AM > *To:* Mailing list for lwIP users > *Subject:* Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf() > > > > I h

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-25 Thread Osborne, David
ed all the issues yet. Thanks for your help everyone. Cheers David From: lwip-users On Behalf Of Trampas Stern Sent: Thursday, 25 March 2021 4:10 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf() I had similar problem with an ATSAME70 whi

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-24 Thread Alister Fisher
: +61  3 8400 4566 alis...@advateklights.com  www.advateklights.com    -Original Message- From: lwip-users On Behalf Of goldsi...@gmx.de Sent: Thursday, 25 March 2021 6:11 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] Why does enabling Debug fix

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-24 Thread Trampas Stern
I had similar problem with an ATSAME70 which was an M7 core. Turns out that the ethernet driver from Microchip did not invalidate cache for the ethernet MAC driver. Hence it would work some of the time and not others, like when debugging was on. Disabling the data cache on the processor would al

Re: [lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-24 Thread goldsi...@gmx.de
Am 24.03.2021 um 16:32 schrieb Osborne, David: > Hi All, > >   > > I’m using LwIP + FreeRTOS + Sockets on STM32H7 with external SDRAM and > FLASH (Ethernet buffers are internal).  It works well until the server > has to send a very large message (> 18Kbytes).  One in five attempts > ends in failure

[lwip-users] Why does enabling Debug fix this tcp_sndbuf()

2021-03-24 Thread Osborne, David
Hi All, I'm using LwIP + FreeRTOS + Sockets on STM32H7 with external SDRAM and FLASH (Ethernet buffers are internal). It works well until the server has to send a very large message (> 18Kbytes). One in five attempts ends in failure. During the transmission tcp_sndbuf() (in api_msg.c) return