I put all of your patches in the openwrt/target/linux/lantiq/patches-4.14/ (also from the other thread) but I don't think if they have been applied at all. I dont see any changes in the throuput speed although I have a 100mbit port on my Laptop not a 1gbit one. I am seeing 91 mbit/s for upload and 44.5 mbit/s for download through iperf. On the other hand I dont see any changes in cat /proc/interrupts either. I think for some reason your patches are not being applied. How can I see if they are being applied?
Edit: I can see the patches being applied but it also says patch unexpectedly ends in the middle of the line for all of your patches and after that it says Hunk # applied successfully. and it continues.
Edit 2: I carefully copied patches and applied 0666 permissions as was the case for other ones and then compiled again and there you go it works. Since my laptop can only handle 100mbit/s I can actually download and upload at 92mbit/s with my TD-W8980. Also irq balance seems to work and it increase the wifi throughput about 10% as you suggested before. With OpenWrt ethernet driver the upload to router was 92mbit/s and download was 44mbit/s and with this driver both directions get 92mbit/s.
Patch 904 / 905: I can not test it on Easybox 904xDSL because 904 it is incompatible with 4027-NET-MIPS-lantiq-support-fixed-link.patch
I will test it on O2-Box 6431, but the question are: in combination with patches 901 / 902 / 903 or with the raw files from post #1 or without changes before.
I think pastebin deletes the last empty lines in a post. But the patch applies OK
So an upgrade yay, congrat
Do all ports work?
These are just normal patches same as 4027-NET-MIPS-lantiq-support-fixed-link.patch the openwrt build will use them automatically. So the only problem is the compatibility with 4072. You should be to fix this merge problem manualy, it is just a few lines in noncritical section (you can see the differences if you make two patched version, 4027 only and 904 only).
DMA burst patch is not required, ICU patches (dts, irq.c and smp-mt) should be usefull, but system should build without them. I did used all of them.
So it seems there is a bug possibly and it can be solved, right? On my 2nd try everything works. Even on Port 1 and I think I should test it while attached to my HH5A on 1gbit/s link. Maybe it will shed some more light on what is going on.
Edit: Also it seems tx ring is getting full for some reason. Maybe its too low.
root@OpenWrt:/# iperf -c 192.168.1.196 -t 60
------------------------------------------------------------
Client connecting to 192.168.1.196, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.254 port 40052 connected with 192.168.1.196 port 5001
[ 3365.915243] tx ring full after send
[ 3365.944203] tx ring full after send
[ 3367.033160] tx ring full after send
[ 3367.102508] tx ring full after send
[ 3368.671618] tx ring full after send
[ 3368.734038] tx ring full after send
[ 3368.904054] tx ring full after send
[ 3369.025805] tx ring full after send
[ 3369.223867] tx ring full after send
[ 3369.451556] tx ring full after send
[ 3369.518576] tx ring full after send
[ 3370.098506] tx ring full after send
[ 3370.136027] tx ring full after send
[ 3370.187110] tx ring full after send
[ 3370.210587] tx ring full after send
[ 3370.278975] tx ring full after send
[ 3370.301863] tx ring full after send
[ 3370.376010] tx ring full after send
[ 3370.380904] tx ring full after send
[ 3381.090977] lantiq,xrx200-net 1e108000.eth eth0: not enough TX ring space for frags
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-73.8 sec 455 MBytes 51.7 Mbits/sec
root@OpenWrt:/#
root@OpenWrt:/# [ 3425.233724] eth0: transmit timed out!
I will run some more tests tomorrow to see how it behaves but so far no load on router even when going with full 100mbit/s throughput.
Yeah that's the problem with my 1Gbit ports too. I didn't figure yet why, but it is either I don't understand how to limit tx xmit function when the ring is growing or the system is too slow to be able to deallocate already transmitted packets in tx housekeeping function.
The error is just the warning the kernel network stack timeouted, unless there is the setting for panic on every warning, it will just continue.
I think probably not. If there are general optimisations of the network stack, they will probably end up in vanilla kernel and the hardware offloading thinks in SoC will be most likely implemented in a different way. I don't even know if there is some hardware (for example NAT offloading). There is no public manual for xrx200.
I did some more tests with wifi and it seems the throughput has actually improved. Not to mention that device is not routing any traffic though, it's just connected through LAN from the main router.
Tests before the patches:
DL: 35-40 mbit/s
UL: 40-45 mbit/s
CPU Load: ~1.8
After the patches:
DL: 50-105mbit/s
UL: 50-105mbit/s
Avg: 60-75mbit/s roughly
CPU Load: ~1.0
If testing both ways simultaneously the DL and UL is around 25mbit/s and 35mbit/s with load around 1.8 and more.
But I think there's still room for more. If you look the current /proc/interrupts:
ath9k is the WiFi chip and it's utilizing more of the 2nd core than the first one. I also managed to see the CPU activity through htop and 2nd CPU was being utilized more. Although I think the average utilization was around 30-40%. If the Wi-Fi can utilize more CPU cycles it can actually provide more than 100mbit/s DL and UL. I am not sure how would it do that but theoretically it should be possible.
Its maybe a bit offtopic, but someone know how stable it is now on vdsl2 and what performance am i expecting if im building my own modem only (or bridge mode) image? Last time i tryed a year ago with my 3370 it was kind of disappointing. I was not able to keep the vdsl2 line synced more than a few minutes to hours with the proprietary vr9 driver. And the performance on the vdsl2 line wasnt that great either.
Well this is pretty much off topic but it actually depends on your line. If your line is in bad condition it may not work as you expect it to so if you experience any problems I'd suggest to use a separate modem in bridge mode.
I tested the working patch created from files from post #1 + 904 and 905 on O2-Box 6431.
This box have only 4 100Mbit/s ports + 1 100Mbit/s port behind the gray DSL-port.
The result like the same:
I have to devices on it and do a speedtest:
They starts fast and them the connecting breaks down, after a while the connection come up.
It works if you do not use too much data.
@ahmar16 with regard to fastpath: It called "PPE" (Protokoll Processor Engine)
read post #4
In my hope it is possible to create an kernelmodule from an stockfw source and use them.
But I didn't worry about it anymore.
So, I use a by jomehub 5a on a Telekom vdsl2 50/10, Line resold by Telefonica/O2. I routinely see sync-uptime in multiple months (basically no unenforced resyncs). This is as bridged-modem only, as the box was overtaxed with adding NAT, traffic shaping and wifi processing on top of the vdsl-modem duty....
One caveat is that my line is still not using vectoring, so I have no information about stability in that increasingly likely scenario....
Upstream Downstream
Current Rate (Kbps) 2239 24125
Max Rate (Kbps) 39997 58892
SNR Margin (dB) 26.6 20
Line Attenuation (dB) 17.3 15.1
Errors (Pkts) 0 215
(I hope the formating is OK) ... the log from TD-W9980B(DE), stock firmware. Stability is fine, connection (22/2 Mbps) works all the day. I used openwrt firmware for about a day and it seems to be stable (I was testing different firmwares and some very very unstable, but the one directly from openwrt was OK).
Hmm irqbalance should (in theory) use the most optimal distribution. BTW even if the distribution is 1:1 it doesn't mean the load will be 1:1 too. RX interrupt have much different load than TX interrupt (at least in ethernet).
Yeah "ring is full" and "tx timeout", I'm working on it right now (most lags are already fixed). It seems SoC/kernel is too slow to actually deallocate transmitted DMA descriptors, so new packets must wait on it and they will timeout. It would be interesting to try increase system tick speed (openwrt is using 250 Hz, which is IMO pretty low for 1Gbit ethernet). BTW the ring full infos are just informative, you can decrease the event if you put RX and TX interrupt on differet core.
[ 2780.742945] lantiq,xrx200-net 1e108000.eth eth0: port 5 got link
[ 2782.790849] lantiq,xrx200-net 1e108000.eth eth0: port 5 lost link
This is weird, I didn't change the parts of the driver which control link. That must be something else.
It wasn't used on my modem at all. In a discussion on the mailing list, there are plans to use it in the future (it is reserved for direct DSL pipe right now, but it could be potentially used for 2 TX queues for 2 VPEs).
I can not really test the vdsl2 speed because my line have a datarate of 95Mbit/s and my Laptop and the Router have only 100Mbit/s connectors
I reached 89-90Mbit/s, but i remember i get this speed in past too (without patch)
But here are the testresult: http://www.dslreports.com/speedtest/45957706
Then i try your testscript:
But i have not really understand what will be tested or better does at make sense to test with the same device ?
So i will do an rebuild with patch 904 + 905 + only one core but vmmc support
Well but it is complex too make an build for Easybox 904x and the NAND-flash do not like to overide too much.
Additional the target should be on normal condition.
But i will do it when i have a littlebit time.
Yes i have an second device on it and i have disconnect it.