Re: STM32H7 Ethernet problems

2020-02-24 Thread Reto Gähwiler
Just a short summary: Your suggested fix in stm32_freeframe was resolving the issue as it seems for the moment. So far it seems to handle our traffic and several ping-floods well. The suggested iobs solution do not address our problem since we do not use the buffered functions. On 2020/02/22

Re: STM32H7 Ethernet problems

2020-02-21 Thread Jukka Laitinen
Hi! On 21.2.2020 16.08, Reto Gähwiler wrote: > Hi Jukka, > > First of all, thanks for your time and hints. Just applied your suggested > change to the stm32_freebuffer. Don't mention, I am sort of responsible for these bugs originally ;) > About the second suggested fix in stm32_freesegment,

STM32H7 Ethernet problems

2020-02-21 Thread Jukka Laitinen
Hi, Reviewing the ethernet driver, I can see couple of bugs: 1) In stm32_freeframe, it should free all the buffers, and not just the first one. So remove the "if ((txdesc->des3 & ETH_TDES3_RD_FD) != 0)" That may cause it run out of buffers 2) In stm32_freesegment, the order of getting the next

Re: STM32H7 Ethernet problems

2020-02-21 Thread Reto Gähwiler
Hi Jukka, First of all, thanks for your time and hints. Just applied your suggested change to the stm32_freebuffer. About the second suggested fix in stm32_freesegment, how do you mean that? The stm32_get_next_rxdesc just increments the descriptor, this should be independent from advancing th

Re: STM32H7 Ethernet problems

2020-02-21 Thread Jukka Laitinen
Hi, Reviewing the ethernet driver, I can see couple of bugs: 1) In stm32_freeframe, it should free all the buffers, and not just the first one. So remove the "if ((txdesc->des3 & ETH_TDES3_RD_FD) != 0)" That may cause it run out of buffers. 2) In stm32_freesegment, the order of getting the nex

Re: STM32H7 Ethernet problems

2020-02-19 Thread Reto Gähwiler
@Gregory: Thanks for your responses and input, will see what I can do. On 2020/02/19 22:50:02, Gregory Nutt wrote: > > > This sounds a lot like the problem I'm having with the SAMA5D36 Gigabit > > ethernet... I'm running into some kind of deadlock on long transfers that > > send packets very q

Re: STM32H7 Ethernet problems

2020-02-19 Thread Reto Gähwiler
Hi Adam, I saw your post and was thinking about linking to it. From what I understand so far, it happens only if there are multiple connections running. Some bursts of arp messages or flood pings will eventually also break things. Just a matter of timing. The whole collapse starts with no free

Re: STM32H7 Ethernet problems

2020-02-19 Thread Reto Gähwiler
@Xiao: Thanks for your example, I'll see how I can apply it to our problem. On 2020/02/20 02:10:49, Xiang Xiao wrote: > Here is a demo fix for one of IOB deadlock recently : > > commit 2d0baa779d997f39b8121f5965f8125184e80d71 > Author: chao.an > Date: Thu Jan 16 14:20:09 2020 -0300 > >

Re: STM32H7 Ethernet problems

2020-02-19 Thread Adam Feuer
Thanks Greg. I will try to track down the deadlock this way. -adam On Wed, Feb 19, 2020 at 2:50 PM Gregory Nutt wrote: > > > This sounds a lot like the problem I'm having with the SAMA5D36 Gigabit > > ethernet... I'm running into some kind of deadlock on long transfers that > > send packets ver

Re: STM32H7 Ethernet problems

2020-02-19 Thread Adam Feuer
Xiang, Thanks for the concrete example of how to break IOB deadlock. If that is what's causing my problem, I will try it out. cheers adam On Wed, Feb 19, 2020 at 6:11 PM Xiang Xiao wrote: > Here is a demo fix for one of IOB deadlock recently : > > commit 2d0baa779d997f39b8121f5965f8125184e80d7

Re: STM32H7 Ethernet problems

2020-02-19 Thread Xiang Xiao
Here is a demo fix for one of IOB deadlock recently : commit 2d0baa779d997f39b8121f5965f8125184e80d71 Author: chao.an Date: Thu Jan 16 14:20:09 2020 -0300 net/udp: break the network lock to avoid deadlock Author: chao.an net/udp: break the network lock to avoid deadlock

Re: STM32H7 Ethernet problems

2020-02-19 Thread Gregory Nutt
This sounds a lot like the problem I'm having with the SAMA5D36 Gigabit ethernet... I'm running into some kind of deadlock on long transfers that send packets very quickly. NuttX seems to run out of IOBs and then can't send or respond to network packets. I tried increasing the low priority wor

Re: STM32H7 Ethernet problems

2020-02-19 Thread Adam Feuer
Reto, This sounds a lot like the problem I'm having with the SAMA5D36 Gigabit ethernet... I'm running into some kind of deadlock on long transfers that send packets very quickly. NuttX seems to run out of IOBs and then can't send or respond to network packets. I tried increasing the low priority

Re: STM32H7 Ethernet problems

2020-02-19 Thread Gregory Nutt
Hi, Reto, I am working for Hexagon Mining in Baar (some of our people were on the last nuttx summit). Our project involves nuttx and runs on a stm32h743zi. Our nuttx version was recently (mid January) updated. We recently recognised that the ethernet of our platform dies after some time. Afte

STM32H7 Ethernet problems

2020-02-19 Thread Reto Gähwiler
Hello Everyone, I am working for Hexagon Mining in Baar (some of our people were on the last nuttx summit). Our project involves nuttx and runs on a stm32h743zi. Our nuttx version was recently (mid January) updated. We recently recognised that the ethernet of our platform dies after some time.