[meta-xilinx] Ethernet Transfer Speed Question

Nathan Rossi nathan at nathanrossi.com
Wed May 6 21:21:05 PDT 2015


On Thu, May 7, 2015 at 3:05 AM, Joe Nicholson <joe at joenicholson.co.uk> wrote:
> Hi Philip
>
> Thanks a lot for this.  I think we're in a similar situation to you: we need USB plus a way to program up the fpga.
>
> I really like the idea of moving over to using mainline... Let's hope some pragmatic voices can drown out the 'blue sky use cases' you mention and we can get to the point where this can actually happen!  :-)
>
> Cheers!
>
> Joe
>
>
> -----Original Message-----
> From: Philip Balister [mailto:philip at balister.org]
> Sent: 06 May 2015 14:17
> To: Joe Nicholson; 'Mike Looijmans'; meta-xilinx at yoctoproject.org
> Subject: Re: [meta-xilinx] Ethernet Transfer Speed Question
>
> On 05/06/2015 08:25 AM, Joe Nicholson wrote:
>> Thanks, Mike, that's really helpful.  Very good news to hear that the
>> issue has been 'fixed' in later kernels :-) If I can get this board to anything approaching that speed, I'll be very happy.
>>
>> All I need now is to get a 3.18+ kernel build out of the meta-xilinx layer... it's still defaulting to 3.14 for this machine, even in the new Fido branch.
>>
>> I see the meta-xilinx layer has a linux-yocto 3.19 recipe (3.17 in Dizzy), but only uses it for the microblaze config.
>> Is it possible for me to change to the linux-yocto 3.17/19 kernel recipe for the zc702-zynq7 machine (e.g. by changing XILINX_DEFAULT_KERNEL)?  Or will this only work correctly for the microblaze?

The linux-xlnx kernel supports both MicroBlaze and Zynq (at the
moment). The linux-yocto kernel (3.14/3.17/3.19) all support
MicroBlaze and Zynq also.

In fido/master for MicroBlaze targets the default/recommended kernel
is linux-yocto, this is because mainline functionality and driver
support is on par with the vendor tree (linux-xlnx).

For Zynq there are still some drivers missing, however the linux-yocto
kernels will boot however may be missing important drivers for devices
you are relying on. But don't let that stop you, try to use the
linux-yocto kernel if you can :). To change the following two configs
are useful and you can set them in your machine.conf or in local.conf.

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto = "3.19%"

>>
>> Alternatively, would a better approach be for me to make up a completely new 3.18/19 Xilinx kernel recipe that brings in the standard Xilinx kernel and just use that?
>> I have to admit that although the meta-xilinx layer is very clever re. configuration fragments and kernel features, it's starting to confuse my (ageing) brain!

I will be adding a linux-xlnx recipe to meta-xilinx master for the
3.19 kernel that is currently available on the master branch of
linux-xlnx. This is mainly for ZynqMP but also to bring the linux-xlnx
recipe upto date.

>
> Ideally, we just use a mainline kernel and everything works.
>
> I'm told mainline boots on zynq, but is missing a couple of critical features. This page shows the upstream status of drivers:
>
> http://www.wiki.xilinx.com/Linux+Drivers
>
> For my application, there are only two pieces missing, USB and some way to load the fpga. I understand there are patches to resolve the USB issue. The bigger pain point is devcfg. Vendor specific solutions for loading fpga's will not be accepted upstream. Vendors are expected to collaborate on a common framework called fpga_manager. It looks like this is really close to being usable and just need a bunch of people that need it to drown out one or two people coming up with blue sky use case questions.

Any 3.19 or newer (including linux-yocto 3.19) kernel has support for
the Zynq USB, its part of the ChipIdea driver. I added the bindings to
the base device tree include for fido/master, so you should be good to
go on that front :). I do however remember that Mike had some very
specific requirements around how to trigger the reset gpio (note: the
reset gpio is now handled as part of the phy driver) so it would be
great if it gets some real world testing :).

I saw your email about getting fpga_manager patches onto the
linux-yocto kernel. I haven't had a chance yet to look but it
definitely sounds like a good idea.

>
> Philip
>
>>
>> ;-)
>>
>> Cheers!
>>
>> Joe Nicholson
>>
>>
>> -----Original Message-----
>> From: Mike Looijmans [mailto:mike.looijmans at topic.nl]
>> Sent: 06 May 2015 12:49
>> To: Joe Nicholson; meta-xilinx at yoctoproject.org
>> Subject: Re: [meta-xilinx] Ethernet Transfer Speed Question
>>
>> On 06-05-15 13:39, Joe Nicholson wrote:
>>> Hi Nathan et al
>>>
>>> I've a question regarding data transfer speed over Ethernet using the
>>> Xilinx
>>> 3.14 kernel built from the meta-xilinx layer.
>>>
>>> We've previously been using a 'custom' 3.9 kernel (basically a
>>> slightly customised Xilinx kernel, with a couple of new drivers… no important changes).
>>>
>>> We're keen to move to the standard Xilinx 3.14 kernel as built from
>>> meta-xilinx.  Our target is zc702-zynq7.
>>>
>>> On the 3.9 kernel, an iperf test of data transfer over the Ethernet
>>> gives a massively respectable 480Mbits/second!
>>>
>>> On the 3.14 kernel, however, the same test gives just 327Mbits/second.
>>>
>>> 327Mbits/second is OK, but still much lower than the Xilinx 3.9 kernel.
>>>
>>> I tried make oldconfig of the old 3.9 kernel configuration used that
>>> instead of the default config, but had the same result.
>>>
>>> Is it possible that the Ethernet driver has had some speed
>>> retardation in the driver recently, between 3.9 and 3.14?  Any pointers would be helpful.
>>>
>>> In reality I think we can probably cope with 327Mbits/second, however
>>> the customer's initial tests were on the 3.9 kernel... so I'm keen to
>>> trace the point of the speed reduction.
>>>
>>> On a similar issue, I tried the Daisy branch of meta-xilinx with the
>>> 3.14 kernel – it achieves only 107Mbit/second!!
>>>
>>> I traced this down to CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y and a few
>>> other similar debugging options being switched on by default.  These
>>> are all nicely switch off in the Dizzy branch.
>>>
>>> So really, I'm keen to understand why the Ethernet transfer speed of
>>> the zc702 appears to have slowed down and whether there's anything I
>>> can do to speed it back up!

So I think the key thing to note is that there are two ethernet
drivers. The "emacps" (linux-xlnx vendor tree only) and "macb"
(mainline, also available in the linux-xlnx tree) drivers.

The "macb" driver has previously had performance issues however this
is improving over time and will continue to do so as this driver will
be the default driver for ZynqMP.

In meta-xilinx the device tree bindings prioritize the macb
compatiblity string, this means if both drivers are enabled then the
macb driver will be used over the emacps. If you are using the
linux-xlnx kernel and you want to use the emacps driver instead there
is a config fragment to disable the macb driver (see below).

KERNEL_FEATURES_append += "bsp/xilinx/disable-macb.scc"

Regards,
Nathan

>>>
>>> …e.g. move to Fido and a 3.17 kernel J
>>>
>>> Cheers!
>>>
>>> Joe Nicholson
>>>
>>>
>>>
>>
>> With the 3.18 kernel, iperf3 gives me the following results on a topic-miami-florida board (also a zynq, 7015, so results should be the same as for any other board):
>>
>> $ iperf3 -c 192.168.80.138
>> Connecting to host 192.168.80.138, port 5201 [  4] local 192.168.80.121 port 60370 connected to 192.168.80.138 port 5201
>> [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
>> [  4]   0.00-1.00   sec  75.6 MBytes   634 Mbits/sec   41    348 KBytes
>> [  4]   1.00-2.00   sec  75.1 MBytes   630 Mbits/sec    0    397 KBytes
>> [  4]   2.00-3.00   sec  74.7 MBytes   627 Mbits/sec    0    399 KBytes
>> [  4]   3.00-4.00   sec  75.6 MBytes   634 Mbits/sec    0    399 KBytes
>> [  4]   4.00-5.00   sec  74.7 MBytes   627 Mbits/sec   34    321 KBytes
>> [  4]   5.00-6.00   sec  76.2 MBytes   639 Mbits/sec    0    346 KBytes
>> [  4]   6.00-7.00   sec  73.6 MBytes   618 Mbits/sec    0    346 KBytes
>> [  4]   7.00-8.00   sec  75.3 MBytes   631 Mbits/sec    0    372 KBytes
>> [  4]   8.00-9.00   sec  75.3 MBytes   632 Mbits/sec    0    375 KBytes
>> [  4]   9.00-10.00  sec  77.0 MBytes   646 Mbits/sec    0    378 KBytes
>> - - - - - - - - - - - - - - - - - - - - - - - - -
>> [ ID] Interval           Transfer     Bandwidth       Retr
>> [  4]   0.00-10.00  sec   753 MBytes   632 Mbits/sec   75             sender
>> [  4]   0.00-10.00  sec   751 MBytes   630 Mbits/sec                  receiver
>>
>>
>> $ iperf3 -c 192.168.80.138 -R
>> Connecting to host 192.168.80.138, port 5201 Reverse mode, remote host 192.168.80.138 is sending [  4] local 192.168.80.121 port 60366 connected to 192.168.80.138 port 5201
>> [ ID] Interval           Transfer     Bandwidth
>> [  4]   0.00-1.00   sec  79.5 MBytes   667 Mbits/sec
>> [  4]   1.00-2.00   sec  79.3 MBytes   665 Mbits/sec
>> [  4]   2.00-3.00   sec  79.3 MBytes   665 Mbits/sec
>> [  4]   3.00-4.00   sec  84.6 MBytes   710 Mbits/sec
>> [  4]   4.00-5.00   sec   103 MBytes   863 Mbits/sec
>> [  4]   5.00-6.00   sec   103 MBytes   865 Mbits/sec
>> [  4]   6.00-7.00   sec   103 MBytes   866 Mbits/sec
>> [  4]   7.00-8.00   sec   103 MBytes   866 Mbits/sec
>> [  4]   8.00-9.00   sec   103 MBytes   867 Mbits/sec
>> [  4]   9.00-10.00  sec   103 MBytes   866 Mbits/sec
>> - - - - - - - - - - - - - - - - - - - - - - - - -
>> [ ID] Interval           Transfer     Bandwidth       Retr
>> [  4]   0.00-10.00  sec   943 MBytes   791 Mbits/sec    0             sender
>> [  4]   0.00-10.00  sec   943 MBytes   791 Mbits/sec                  receiver
>>
>>
>> The board is connected to the company network switch, and that's connected to the PC I'm running this on.
>>
>> Apparently, something got fixed in later kernels :-)
>>
>>
>>
>> Kind regards,
>>
>> Mike Looijmans
>> System Expert
>>
>> TOPIC Embedded Products
>> Eindhovenseweg 32-C, NL-5683 KH Best
>> Postbus 440, NL-5680 AK Best
>> Telefoon: +31 (0) 499 33 69 79
>> Telefax: +31 (0) 499 33 69 70
>> E-mail: mike.looijmans at topicproducts.com
>> Website: www.topicproducts.com
>>
>> Please consider the environment before printing this e-mail
>>
>>
>>
>>
>>
>>
>
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx



More information about the meta-xilinx mailing list