Jumbo Frames - sort of working
Hi. I am working on a program to send jumbo frames at a fast rate using sockets over udp. I am using Fedora Core 5 - kernel 2.6.20-1.2320. So far this is what I've accomplished:
1.) The network adapter is set up to handle jumbo frames. Mtu = 9000.
2.) I can send repeated udp packets of size 8192 bytes broadcast over the network.
3.) Another computer on the network receives all of these packets...and their size if 8192 bytes.
4.) When I send these packets over the network I am using the sendto socket library call.
5.) Jumbo frame support seems ok at this point when I send this buffer repeatedly over the network with the size of the buffer set to 8192 bytes.
6.) At this point I start collecting data through some interface on my linux box and parsing the data and then sending this parsed data over the network, using udp....still using broadcast packets and packet size of 8192.
I have 4 buffers that round robin to put data into one buffer and fill up the next one once the previous one is full.
7.) At a packet size of 8192 bytes, the data in my buffer that I'm processing gets messed up (sort of like the hardware was filling the buffer with new data while I was processing it, but I don't get an overflow flag).
8.) At a packet size of 1500 bytes or less, the data in my buffer that I'm processing does not get mingled and all is well. More packets get sent per processed buffer when using 1500 vs. 8192 packet size. I can collect data in the round robin fashion and use the sendto(more calls for 1500 byte size vs. 8192 as my buffer is the same size) call to send the data. The receiver gets the data and it is all valid.
9.) Why does this work when I am calling sendto more times with a packet size of 1500 bytes vs. calling sendto less times with a packet size of 8192?
I'm new to linux and may be missing something that I'm hoping someone else knows off hand! My computer has 2 GB of memory, cpu is 3.2 GHz and my cache (in bios) says 512 KB - L2.
I did notice that there seem to be two different forms of linux - smp and the regular one. Would the smp version help out?
Also, the program works great on a Winows system!
Any suggestions will be appreciated!