I read a paragraph from O'Reilly's "Linux Device Drivers, 3rd Edition"(makelinux.net/ldd3/chp-6-sect-2) and according to this, blocking device driver(e1000.ko in my case) puts the process(Iperf client in my case) to sleep until the request can proceed. So as Metod already mentioned in this e-mail thread, in non-blocking mode the driver probably doesn't put the process(Iperf client) into sleep and just silently discards the data and thus gives Iperf client a false impression of amount of data sent. Do you agree with this? In addition, non-blocking drivers are bit negligently programmed, aren't they? Or is there a possibility that different GNU/Linux distributions load the drivers differently? At least according to modinfo, for example e1000 driver does not have blocking mode and non-blocking mode parameter.
thanks, Martin On 9/6/14, Marc Herbert <marc.herb...@gmail.com> wrote: > AFAIK iperf is using the regular BSD socket API (discard this message > if it does not). The BSP API provides very limited information but on > the other hand it makes sure iperf numbers are exactly the numbers any > application would get. Continued below. > > 2014-09-06 13:06 GMT+01:00 Martin T <m4rtn...@gmail.com>: >> in case of blocking NIC drivers, how does the kernel signal the Iperf >> client if buffers are full? Does those signals make the Iperf client >> to do more or longer nanosleep() system calls between write() calls to >> UDP socket in order to write less data to socket > > If the driver and the stack are "truly blocking", then iperf will > simply block for longer in the write() call, which may reduce the > throughput. Exactly like when writing to a (slow) TCP socket or a > (busy) disk. > >> or does the signal sent by kernel include the amount of data dropped > > I don't think the BSP socket API can report anything like this. > > Cheers, > > Marc > ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Iperf-users mailing list Iperf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iperf-users