[OpenWrt-Devel] [RFC] lantiq: SMP interrupts and ethernet driver backport from vanilla v5

Hauke Mehrtens hauke at hauke-m.de
Fri Feb 1 04:51:46 EST 2019

On 1/31/19 9:30 PM, Mathias Kresin wrote:
> 30/01/2019 11:38, Petr Cvek:
>> Hello,
>> I discovered the lantiq xrx200 lacks support for interrupts on secondary
>> VPE, and I've managed to add this functionality to the kernel, the
>> second icu controller lives on base address 0x1f880300 and works in the
>> same way as first. Tested with 4.14.93 kernel, untested patches in the
>> attachment or on openwrt forum:
>> https://forum.openwrt.org/t/xrx200-irq-balancing-between-vpes/29732/11
>> My second submission is a backported xrx200 ethernet driver from vanilla
>> kernel v5 patched with switch and phy functions. Using kernel napi
>> polling seems to highly increase the throughput of the network.
>> Trying to initially increase the throughput of the network I've found
>> there is an inefficiently setting of DMA burst size. My patch sets this
>> value to a higher value.
>> These two patches were tested with 4.14.93 kernel too, there is forum
>> thread:
>> https://forum.openwrt.org/t/how-can-we-make-the-lantiq-xrx200-devices-faster/9724/30
>> RFC for any parallel development info (next version of ethernet driver
>> will be based on vanilla kernel version?), ideas, testing ...
>> best regards,
>> Petr Cvek
> Hey Petr,
> first of all, the patches don't apply as they are:
> is: ./a/arch/mips/lantiq/irq.c
> expected: a/arch/mips/lantiq/irq.c
> For an official submission, a commit message is a must have. But even
> for testing it would be nice to have a commit message explaining what a
> patch is proposed to do. Otherwise it is kind of hard to provide any
> comments.
> Furthermore, it would be very helpful if the source of the changes is
> mentioned. At least parts of the code seem to be from intel/lantiq UGW 7.x.
> The backport of the vanilla eth driver breaks Ethernet completely on my
> board. I dropped it during my testing.
> Since we're all busy, providing some numbers about the seen improvement
> would might raise more interest. Ideally, you provide the numbers per
> patch, to see if a specific patch really changes something.
> I gave the patches a quick try in conjunction with the irqbalance
> package (to not move driver irqs from one core/vpe to another by hand).
> I saw an improvement in throughput on my BT HomeHub 5a while doing iperf
> from 5Ghz wireless to a lan client.
> The bandwidth was UP: 195 Mbits/s, DOWN: 137 Mbit/s with the patches
> applied, while it was UP: 152 Mbit/s, DOWN: 95,5 MBit/s without. It's
> more than the all time max of 180MBit, I measured a long time ago in a
> test setup I can't remember.
> But I only consider wireless benchmarks in a shielded/isolated
> environment as reliable anyway. It's good to know, but benchmarking the
> ethernet (nat/routing) should be more reliable. As we speak of
> benchmarking the ethernet, it would be interesting to see if enabling
> flow offloading improves the situation even further.
> Of course, the 5GHz wireless bandwidth is still less than the 385
> Mbits/s I benchmarked with the BT firmware in the tests setup I can't
> remember. Nevertheless, it's promising.
> Mathias

Hi Petr,

I am also interested in benchmarks with only one of the patches to know
which patch gives us which improvement. The IRQ controller patch needs
some improvements to get into mainline Linux kernel and I would look
into it if it creates some improvement.
Are the IRQs on the 2. VPE used automatically or do you use it with irq
Could you please provide the output of "cat /proc/interrupts"

I used vanilla upstream kernel without the OpenWrt patches and only got
about 60MBit/s NAT performance, but I think about 300MBit/s software
forwarding performance. We should probably make use for scattered DMA in
the driver too. I plan to use this new driver + a DSA switch driver in
OpenWrt, but we still need a good configuration migration script.


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list