Mathias Koehrer wrote:
Hello everybody,
for a system that uses a Ethernet point-to-point
connection that end-to-end latency should decrease
dramatically when not UDP/IP but "raw" Ethernet frames
are used. I.e. the data to transfer are directly written into
the Ethernet frame, the Type field in the Ethernet
header has to be set to be not equal to 0x800. This should
save transmission time and also it should save software effort as not protocol layers have to be
passed. Addressing could be based on MAC addresses (or even
broadcasts?). Did anybody run any tests with something similar to
that?
I did some "ping-pong" tests with connecting two PC
(point-to-point full duplex) using rtnet (100 MBit Ethernet, eepro100) and I measured a
round-trip delay for 20 byte UDP data of approx. 110 microseconds, which is not really
low-latency... The theoretical value for transfering 20 byte twice
via a 100 Mbit/s line is about 3.2 microseconds - thus the overhead is fairly big and it should be
possible to reduce it.
Any comments on that are highly welcome!
UDP doesn't cause so much overhead as one may expect. The 110 us are widely dominated by hardware and software IRQ latencies (up to 20 us per station), scheduling delays (of your reader task), PCI access times and memory copy delays. The fastest round trip I once saw was a bit below 60 us on rather fast (~700 MHz Pentium) machines.
But you are free to add some time stamping code to RTnet and do some quick profiling. I cannot exclude that a few us (depending on the system performance) can still be gained by optimising. UDP, e.g., may become slightly faster if we combine the CRC generation with the required copy step between stack and user (see source code comment).
Jan
PS: Note that the smallest Ethernet packets take a bit longer (~8-9 us) due to their minimum payload size.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
RTnet-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/rtnet-users

