Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-11-16 Thread Kristian Evensen
Hello, On Thu, Nov 9, 2017 at 8:42 PM, Kristian Evensen wrote: > I replaced the 3526 with other devices containing the mt7530 switch > (both mt7621 and mt7623-based boards), and the issues seems to be > related to the switch rather than the SoC. I am able to reliably > trigger the timeout on all

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-11-09 Thread Kristian Evensen
On Thu, Nov 9, 2017 at 5:21 PM, Kristian Evensen wrote: > I have been hammering away on this issue during the day, and it seems > that the DMA engine, TX, etc. works just fine. However, for some > reason, the port with the router that has hung is able to stop the > whole switch. If I disable the p

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-11-09 Thread Kristian Evensen
On Thu, Nov 9, 2017 at 12:06 PM, Kristian Evensen wrote: > I see that the CPU txds [384-511] have DDONE set and no SKB, while > DDONE is not set for the DMA txds [0-383] and an skb is attached. I > also looked at the content of the skb, and as far as I can see it is > valid. Looking at the content

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-11-09 Thread Kristian Evensen
Hello, On Wed, Nov 8, 2017 at 10:56 PM, Kristian Evensen wrote: > I have been trying to solve this myself for a couple of days, but I am > starting to run out of idea. Could it be that there is some traffic > destined for the client (via. the 2626) that gets stuck in the TX > queue on the 3526? A

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-11-08 Thread Kristian Evensen
Hello, It turns out that the assumption that the "transmit timed out"-issue was related to pause frames/flow control was incorrect. I have recently started to see the error again, with flow control disabled. However, unlike last time, I am now able to reliably trigger the issue. The timeout seems

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-10-27 Thread Kristian Evensen
Hi John, On Sat, Aug 19, 2017 at 8:16 PM, John Crispin wrote: > Hi All, > > i have a staged commit on my laptop that makes all the (upstream) ethernet > fixes that i pushed to mt7623 work on mt7621. please hang on for a few more > days till i finished testing the support. this will add latest ups

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-28 Thread Kristian Evensen
Hello again, On Sat, Aug 26, 2017 at 4:57 PM, Kristian Evensen wrote: > I did not have to wait very long before anything. Unfortunately, my > router crashed right after I sent the previous email. So I guess that > means back to the drawing board. I have kept working on this issue throughout the

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-26 Thread Kristian Evensen
Hi, On Sat, Aug 26, 2017 at 4:47 PM, Kristian Evensen wrote: > I guess our common theory is that something is causing TX interrupts > not to be enabled again. After reading up on NAPI > (https://wiki.linuxfoundation.org/networking/napi), it seems that the > recommended way of using NAPI on clear-

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-26 Thread Kristian Evensen
Hello again, On Sat, Aug 26, 2017 at 12:38 PM, Kristian Evensen wrote: > Hi, > > On Sat, Aug 26, 2017 at 7:43 AM, Mingyu Li wrote: >> Hi. >> >> i check the code again. found xmit_more can cause tx timeout. you can >> reference this. >> https://www.mail-archive.com/netdev@vger.kernel.org/msg12333

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-26 Thread Kristian Evensen
Hi, On Sat, Aug 26, 2017 at 7:43 AM, Mingyu Li wrote: > Hi. > > i check the code again. found xmit_more can cause tx timeout. you can > reference this. > https://www.mail-archive.com/netdev@vger.kernel.org/msg123334.html > so the patch should be like this. edit mtk_eth_soc.c > > tx_num =

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-25 Thread Mingyu Li
Hi. i check the code again. found xmit_more can cause tx timeout. you can reference this. https://www.mail-archive.com/netdev@vger.kernel.org/msg123334.html so the patch should be like this. edit mtk_eth_soc.c tx_num = fe_cal_txd_req(skb); if (unlikely(fe_empty_txd(ring) <= tx_num

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-25 Thread Kristian Evensen
Hi all, On Sun, Aug 20, 2017 at 12:30 AM, John Crispin wrote: > correct, in my testing i have been ... with 200 parallel flows ... on > MT7623, we'll have to find out what mt7621 can achieve ... this is all using > hwnat ... > 1) tcp - at 50 byte frames i am able to pass 720 MBit which is > 1M FP

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread John Crispin
On 20/08/17 01:13, Florian Fainelli wrote: On 08/19/2017 03:30 PM, John Crispin wrote: On 20/08/17 00:07, Kristian Evensen wrote: On Sat, 19 Aug 2017 at 23:52, John Crispin mailto:j...@phrozen.org>> wrote: On 19/08/17 23:13, Kristian Evensen wrote: > Hi both, > > On S

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread Florian Fainelli
On 08/19/2017 03:30 PM, John Crispin wrote: > > > On 20/08/17 00:07, Kristian Evensen wrote: >> >> On Sat, 19 Aug 2017 at 23:52, John Crispin > > wrote: >> >> >> >> On 19/08/17 23:13, Kristian Evensen wrote: >> > Hi both, >> > >> > On Sat, 19 Aug 2017 at

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread John Crispin
On 20/08/17 00:07, Kristian Evensen wrote: On Sat, 19 Aug 2017 at 23:52, John Crispin > wrote: On 19/08/17 23:13, Kristian Evensen wrote: > Hi both, > > On Sat, 19 Aug 2017 at 20:16, John Crispin mailto:j...@phrozen.org> >

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread John Crispin
On 19/08/17 23:13, Kristian Evensen wrote: Hi both, On Sat, 19 Aug 2017 at 20:16, John Crispin > wrote: Hi All, i have a staged commit on my laptop that makes all the (upstream) ethernet fixes that i pushed to mt7623 work on mt7621. please hang on fo

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread John Crispin
Hi All, i have a staged commit on my laptop that makes all the (upstream) ethernet fixes that i pushed to mt7623 work on mt7621. please hang on for a few more days till i finished testing the support. this will add latest upstream ethernet support + DSA John On 19/08/17 17:06, Mingyu L

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-08-19 Thread Mingyu Li
Hi Kristian. does this patch works? 2017-07-24 23:45 GMT+08:00 Mingyu Li : > i guess more other interrupts maybe cause the problem. because the > ethernet receive flow is interrupt by other hardware. so use sd card, > wifi or usb can generate interrupts. > > 2017-07-24 17:19 GMT+08:00 Kristian Ev

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-07-24 Thread Mingyu Li
i guess more other interrupts maybe cause the problem. because the ethernet receive flow is interrupt by other hardware. so use sd card, wifi or usb can generate interrupts. 2017-07-24 17:19 GMT+08:00 Kristian Evensen : > Hi, > > On Mon, Jul 24, 2017 at 4:02 AM, Mingyu Li wrote: >> i guest the pr

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-07-24 Thread Kristian Evensen
Hi, On Mon, Jul 24, 2017 at 4:02 AM, Mingyu Li wrote: > i guest the problem is there are some tx data not free. but tx > interrupt is clean. cause tx timeout. the old code will free data > first then clean interrupt. but there maybe new data arrive after free > data before clean interrupt. > so c

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-07-23 Thread Mingyu Li
Hi. i guest the problem is there are some tx data not free. but tx interrupt is clean. cause tx timeout. the old code will free data first then clean interrupt. but there maybe new data arrive after free data before clean interrupt. so change it to clean interrupt first then clean all tx data( als

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-07-23 Thread Kristian Evensen
Hi! On Sun, Jul 23, 2017 at 4:50 PM, Mingyu Li wrote: > Hi. > i write a path. could you help to verify it? Thanks a lot, will do! I am leaving on holiday tomorrow, so testing might take a little while, but I will get back to you as soon as possible. Would you mind explaining a bit about what you

Re: [LEDE-DEV] Transmit timeouts with mtk_eth_soc and MT7621

2017-07-23 Thread Mingyu Li
Hi. i write a path. could you help to verify it? --- a/mtk_eth_soc.c 2017-07-22 08:13:52.845251484 +0800 +++ b/mtk_eth_soc.c 2017-07-23 22:38:37.746471417 +0800 @@ -810,6 +810,8 @@ u8 *data, *new_data; struct fe_rx_dma *rxd, trxd; int done = 0, pad; + u32 hwi