Giter VIP home page Giter VIP logo

Comments (13)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Alex,

Attached (by pawan chawla) is patch to allow specifying IP_TOS in command line. 
 I didn't check it thoroughly; however, the idea sounds good.  
Among all your checks, It may worth to verify that the default value is what we 
had anyhow (for making sure there is backward compatibility for current users).

For your convenience, below is the definition of IP_TOS from "man 7 ip".  
(Notice that we can consider additional improvement by using different value 
for throughput tests vs. latency tests.)

*IP_TOS (since Linux 1.0)*
Set or receive the Type-Of-Service (TOS) field that is sent with every IP 
packet originating from this socket. It is used to prioritize packets on the 
network. TOS is a byte. There are some standard TOS flags defined: 
IPTOS_LOWDELAY to minimize delays for interactive traffic, IPTOS_THROUGHPUT to 
optimize throughput, IPTOS_RELIABILITY to optimize for reliability, 
IPTOS_MINCOST should be used for "filler data" where slow transmission doesn't 
matter. At most one of these TOS values can be specified. Other bits are 
invalid and shall be cleared. Linux sends IPTOS_LOWDELAY datagrams first by 
default, but the exact behavior depends on the configured queueing discipline. 
Some high priority levels may require superuser privileges (the CAP_NET_ADMIN 
capability). The priority can also be set in a protocol independent way by the 
(SOL_SOCKET, SO_PRIORITY) socket option (see socket(7)).

Original comment by [email protected] on 18 Apr 2013 at 10:30

  • Removed labels: Pjm-New

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Also, need to verify it doesn't break our MS-Windows support.

Original comment by [email protected] on 18 Apr 2013 at 10:46

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
The default value in the patch is is IPTOS_LOWDELAY (0x01). I will shortly 
attach one with default value 0.

Original comment by [email protected] on 18 Apr 2013 at 3:39

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Typo in previous comment, IPTOS_LOWDELAY value is 0x10.
I have modified the patch to have default TOS value of 0x00.

- Pawan

Original comment by [email protected] on 18 Apr 2013 at 4:20

Attachments:

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Hi Pawan,

Thanks for your patch.  Can you please adjust it to the latest version in svn 
trunk and make sure for the following:
1. It doesn't break our MS-Windows support
2. The default value is what the user has anyhow.

Thanks,
  Avner

Original comment by [email protected] on 21 Apr 2013 at 6:51

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Hi Avner,

I have created another patch from the trunk, made the default value (0x00) 
which is the TOS value if not configured, however I do not have a Windows 
machine to test this on. 

Thanks,
Pawan

Original comment by [email protected] on 4 Jun 2013 at 9:27

Attachments:

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Thanks Pawan,

sounds good.
I looked in MSDN, it sounds that this option exists in Windows, but it is not 
recommended to use it.  Hence, I am afraid it might mislead our Windows users.  
See 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx .

I would suggest to use #ifndef w-i-n-d-o-w-s gourd, in the following block: 

+        
+        if ( !rc && aopt_check(common_obj, OPT_TOS) ) {
+            const char * optarg = aopt_value(common_obj, OPT_TOS);
+            if (optarg)
+           {
            #ifndef ...
               print error and exit
            #endif
+                int value=strtol(optarg,NULL,0);
+                s_user_params.tos = value;
+            }
+       }

In case, we are running under Windows, just print error message and exit.  This 
way we live option for someone in the future to continue your work and support 
it in Windows.

Do you mind completing it in this way.
Thanks,
  Avner

Original comment by [email protected] on 5 Jun 2013 at 8:08

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Hi Avner,

I have added a check for WIN32 or _WIN32 being defined, which logs error and 
return the unsupported error code.

thanks
pawan

Original comment by [email protected] on 6 Jun 2013 at 9:55

Attachments:

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024
Thanks Pawan.

Alex, Or,

Do you mind integrating the last patch?  According to the author it should work 
out of the box without breaking Windows.  
If there is any issue, it will probably fast caught in tests.

Avner

Original comment by [email protected] on 9 Jun 2013 at 7:43

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024

Original comment by [email protected] on 18 Jun 2013 at 8:32

  • Added labels: Type-Enhancement
  • Removed labels: Type-Task

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024

Original comment by [email protected] on 18 Jun 2013 at 8:33

  • Changed state: Started

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024

Original comment by [email protected] on 18 Jun 2013 at 11:09

  • Changed state: Accepted

from sockperf.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 26, 2024

Original comment by [email protected] on 18 Jun 2013 at 11:09

  • Changed state: Done

from sockperf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.