lkml.org 
[lkml]   [2005]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Sending ethernet frames one after another
On Tue, 5 Jul 2005, Karel Kulhavy wrote:

> Hello
>
> I have written a software to test connected optical datalink in loopback
> mode which works by sending a burst of e. g. 1024 raw Ethernet frames
> directly to that interface, then waiting a little bit, and counting from
> ifconfig how many were received.
>
> Some people report a problem that on their eepro100 in IBM Thinkpad, the
> program (probably sendto) is returning error "No buffer space available".
>
> Why doesn't the sendto block instead? Does it mean that I cannot use
> this testing mode with that card? I need to send as fast as possible,
> because it's necessary to constantly transmit, as the link must be
> tested in load going in both directions simultaneously, to catch
> possible crosstalks.
>

If sendto is used on a data-gram socket, it may just dump
extra packets on the floor. If you have a connected socket,
sendto will return an error when no buffers are available.

If you want RELIABLE communication, then you use a connected
stream socket and send() or write(). These handle transmission
problems transparently.

> Or is that an error that should be handled by the application? In which
> way, then?
>

Generally, it is least expensive as far as performance is concerned
if you let the kernel handle errors, retries, duplicate packets, etc.
That's what you get with a connected stream socket. However, since
every packet is ACKed, the round-trip time can be a performance
killer. So, a private protocol for talking through satellites which
have awful round-trip time might be to number packets at the application
level, send everything, then query the receiver software about the
missing packets. This continues until all the packets have been
received.

> Regards,
>
> CL<
>




Cheers,
Dick Johnson
Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-05 18:58    [W:0.141 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site