[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] UDP bug in kernel 2.6?



Hi Werner,

I also ran into UDP failures when testing petalinux-mmu-v0.10 a few months
back.  Below is an email I sent to this list on 3/21/08.  BlueCat Linux
on the same MicroBlaze hardware design did not have the UDP failures.
Are you using Ethernet Lite?  I noticed there are minor differences between
it's device driver in PetaLinux, BlueCat Linux, and the standalone drivers
from the Xilinx EDK.  I recently ran into the following from Xilinx
discussing Ethernet Lite driver bugs.
 http://www.xilinx.com/support/answers/29791.htm

I have not had a chance to test these changes but they may address the
failures you are seeing.

Bob


Bob Cutler wrote:
Hi John,

Here is an update on petalinux-mmu-v0.10 network testing.  I noticed
that there were quite a few kernel debug options enabled in
petalinux-mmu-v0.10.  I disabled all of them and that brought the
transfer rates in line with BlueCat.  I can still not get PC ->
microblaze UDP transfers to work.  They no longer hang or panic
petalinux though.  Any idea what may be wrong with UDP?  I also
attempted to test with the non-MMU petalinux-v0.30-rc1.  The nuttcp
tool does not work very well on uClinux due to it's extensive use of
fork().  Here is an update of what I sent earlier:

I did some further network testing of petalinux-mmu-v0.10.  I used the
nuttcp network testing tool to test unidirectional TCP and UDP traffic.
For all tests, I ran the server on the MicroBlaze with the "nuttcp -S"
command.  For the tests over Ethernet, I ran the client on a PC with
a 100BASE-T NIC connected directly to the MicroBlaze board with a
crossover cable.  For the loopback device test, I ran the client on
the MicroBlaze.  I used the Xilinx Spartan-3A DSP S3D1800A board
running Xilinx's MicroBlaze reference design for this board with the
CPU clock at 62.5 MHz.  Here are the tests I ran using the same FPGA
bitstream for two OS's:

Test                        petalinux-mmu-v0.10   BlueCat 2.4.2   Ratio
-------------------------   -------------------   -------------   -----
TCP/IP : PC <- microblaze    7.2298 Mbps           7.7408 Mbps    1.071
TCP/IP : PC -> microblaze    3.7588 Mbps           3.7754 Mbps    1.004
UDP/IP : PC <- microblaze    3.7475 Mbps           3.9464 Mbps    1.053
UDP/IP : PC -> microblaze    0.0000 Mbps           4.9938 Mbps    -----
TCP/IP : loopback device    14.7774 Mbps          15.3766 Mbps    1.041
UDP/IP : loopback device    11.3837 Mbps          11.6176 Mbps    1.021

The client commands I used on the PC for the first four tests are:

Test                        Command
-------------------------   -------------------------------------
TCP/IP : PC <- microblaze   nuttcp -r -T60 10.25.1.201
TCP/IP : PC -> microblaze   nuttcp -t -T60 10.25.1.201
UDP/IP : PC <- microblaze   nuttcp -r -u -T60 -Ri100m 10.25.1.201
UDP/IP : PC -> microblaze   nuttcp -t -u -T60 -Ri5000 10.25.1.201

The client commands I used on the MicroBlaze for the last two tests are:

Test                        Command
-------------------------   ---------------------------------
TCP/IP : loopback device    nuttcp -T60 127.0.0.1
UDP/IP : loopback device    nuttcp -u -T60 -Ri1000m 127.0.0.1

There is no transfer time for "UDP/IP : PC -> microblaze" on PetaLinux
since I can not get it to receive UDP traffic no matter what nuttcp
options I try to rate limit, etc.

Thanks,
Bob


Werner Fries wrote:
Hi all,

I have trouble using UDP for my microblaze design.
I'm using kernel 2.6 from the Petalinux V0.30 RC1 release on a custom
platform with Virtex5.

It started that I had trouble mounting nfs exports from my development
machine on the microblaze system (mount failed with IO error).
When I use the "proto=tcp" option with the mount command everything
works fine, without any trouble.

Also UDP test with netcat didn't work (command on microblaze: nc -l -u -p 1234).


After searching the internet I found the following link:
  http://forum.niosforum.com/forum/index.php?showtopic=8250
I applied the changes described for nios-specific code (see the link
above) to the file
linux-2.6.x-petalogix/include/asm-microblaze/checksum.h
( changed return value of function csum_fold(unsigned int sum) from type
"unsinged int" to "__sum16" )

(
speedy@linux-ws3:~/work/petalinux-v0.30-rc1/software/linux-2.6.x-petalogix/include/asm-microblaze> diff checksum.h.original checksum.h
61c61
< static inline unsigned int csum_fold(unsigned int sum)
---
static inline __sum16 csum_fold(unsigned int sum)
)

After recompiling the kernel mounting with UDP worked (no error message
from the mount command), but operations on mounted files is not stable
(e.g. after listing the content of a mounted directory the shell seems
to hang, but the uCLinux system is still running).
Also a test with netcat worked with the kernel modifications.

I'm not a Kernel hacker, but it seems like there is a bug related to
UDP / checksum or whatever.

Has anybody an idea?


Regards
Werner



___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/



___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/