Folks-
I have "fun" problem with NDK2.0, on custom hardware (DM648, Marvell PHY), sending UDP packets. It is test setup for video transmission, derived from "helloworld" project in NDK. The DSP, upon receiving a packet from host, responds by sending 10000 UDP packets back (in a while loop), of size 1472 (same issue exists with sizes of 1024 and 512). The ethernet connection is dedicated (through a hub/switch) betwen the DSP and a host PC.
At first, I was dropping sent packets (never were sent to host, according to WireShark) with either 100Mbit link or 1Gbit link, much more in the case of 100Mbit. Deciding that this was due to my loop throwing packets too fast at the bios/drivers, I added a sleep of 1 millisec in the send loop, and never lost a packet at either speed. Going with this, I increased the PKT_MAX in ethdriver.c, to allow more buffering of the packets I was throwing at the low-level, and sure enough was able to get no lost packets consistently with no sleep, but only in the case of 100Mbit/sec link to host. [I averaged about 95Mbit/sec payload transfer rate in this case]
When the link to host is 1Gbit, I still get a few (average maybe 20 out of 10000, and always in bunches) UDP packets that I send to the dspbios ("sendto") that never make it to the PC. The PC does not get partial packet, corrupt packet, or anything. The reason why this is interesting is that there is now never a problem at 100Mbit/sec physical link. One would think that ANY issues the DSP has with latency, buffer sizes, etc. would be alleviated by a 1Gbit link (compared to 100Mbit), not aggravated, as was the case before I increased the PKT_MAX. [I average about 300Mbit/sec payload transfer rate, lost packets notwithstanding]
I tried setting the priority of NETCTRL task to high, and increasing PKT_NUM_FRAMEBUF in PBM.C (per SPRU523g), but both to no effect/avail.
Does anyone have any idea what could be the problem? Or suggestions as to how I can diagnose the problem in the context of NDK2.0? Again, DSP is not sending occasional bunches of UDP packets (e.g., 8 lost in a row) when physical connection is 1Gbit, but sends all in same loop with a sleep in it (so likely not problem with physical layer, or chance of corruption would not depend on rate sent), and sends all in same loop with no sleep if physical connection is 100Mbit/sec (so I can't imagine it being problem with amount of buffering in the low-level DSP code, or with task latencies).
Thank you for any suggestions,
Jim