All of lore.kernel.org
 help / color / mirror / Atom feed
* Sending ethernet frames one after another
@ 2005-07-05 15:52 Karel Kulhavy
  2005-07-05 16:48 ` Richard B. Johnson
  2005-07-06  4:03 ` jscottkasten
  0 siblings, 2 replies; 3+ messages in thread
From: Karel Kulhavy @ 2005-07-05 15:52 UTC (permalink / raw)
  To: linux-kernel

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.

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

Regards,

CL<




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sending ethernet frames one after another
  2005-07-05 15:52 Sending ethernet frames one after another Karel Kulhavy
@ 2005-07-05 16:48 ` Richard B. Johnson
  2005-07-06  4:03 ` jscottkasten
  1 sibling, 0 replies; 3+ messages in thread
From: Richard B. Johnson @ 2005-07-05 16:48 UTC (permalink / raw)
  To: Karel Kulhavy; +Cc: linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Sending ethernet frames one after another
  2005-07-05 15:52 Sending ethernet frames one after another Karel Kulhavy
  2005-07-05 16:48 ` Richard B. Johnson
@ 2005-07-06  4:03 ` jscottkasten
  1 sibling, 0 replies; 3+ messages in thread
From: jscottkasten @ 2005-07-06  4:03 UTC (permalink / raw)
  To: Karel Kulhavy, linux-kernel



--- Karel Kulhavy <clock@twibright.com> 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

Are you sure that it is the program getting this
error?  Have you traced this to a bad return from the
sendto function?

I have a couple thoughs.  One issue with the memory is
that going in and out of the driver, the network
buffers are DMA quality memory (meaning hardware
accessable address space, and contiguous physically,
rather than virtually).  When things get churned up it
can be difficult to get memory that fits those
criteria.

-S-

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-06  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-05 15:52 Sending ethernet frames one after another Karel Kulhavy
2005-07-05 16:48 ` Richard B. Johnson
2005-07-06  4:03 ` jscottkasten

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.