DD1984 / sockperf

Automatically exported from code.google.com/p/sockperf
Other
1 stars 0 forks source link

Support --tcp-skip-blocking-send switch in command line #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
imported from: http://argus-bg.dnsalias.org/issues/584

In case user used this new switch, we should:

   1. skip sending TCP packets that would block our thread.
   2. increment a new counter – equivalent to dropped-counter that exists on receive.
   3. display this counter at the end statistics when displaying dropped-counter.

Note: this counter should be in place, even if this flag is not used and we 
blocked on send operation.
In both cases, in case the counter > 0, the message at the end should educate 
the user about the other option.

Original issue reported on code.google.com by igor.ivanov@itseez.com on 1 Apr 2011 at 1:41

GoogleCodeExporter commented 9 years ago
Igor, Please provide your plan on how to do that.
Do not start coding before I approve it.
When you have plan, please assign the issue to me!
Thanks,
  Avner

Original comment by avne...@gmail.com on 3 Apr 2011 at 7:45

GoogleCodeExporter commented 9 years ago
this point is close with #25.

Plan:
1. add option -tcp-skip-blocking-send for a server and a client modes (set off 
by default);
2. use special return value (-2) in msg_sendto to process skip send operation 
cases;
3. add global variable as g_skipCount to count skipped messages;
4. increment g_skipCount in client_send_packet() and decrement packet sequence 
number to keep one w/o gaps;
5. clear Tx Time for ping-pong reply packets in case (-2) is occured;
6. process EAGAIN and EWOULDBLOCK in sendto();
7. set MSG_DONTWAIT flag for send operation in case --tcp-skip-blocking-send is 
enabled;
8. Important: skip case is occured (for statistic) during send operation when 
no bytes related message sent before due to we do not have way to notify server 
about corrupted or skipped messages and we do not have CRC inside message.
9. display number of skipped messages in case they exist in final output.

Original comment by igor.ivanov@itseez.com on 25 Apr 2011 at 10:08

GoogleCodeExporter commented 9 years ago
r54
This ability is enclosed in EXTRA_ABILITY macro definition. It is disabled in 
build process by default. User needs to set --enable-extra option in configure 
as ($ ./configure --prefix=<path to install> --enable-extra) to make 
functionality workable.

Original comment by igor.ivanov@itseez.com on 13 May 2011 at 6:37