Comments (13)
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.
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.
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.
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.
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.
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.
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.
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.
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.
Original comment by [email protected]
on 18 Jun 2013 at 8:32
- Added labels: Type-Enhancement
- Removed labels: Type-Task
from sockperf.
Original comment by [email protected]
on 18 Jun 2013 at 8:33
- Changed state: Started
from sockperf.
Original comment by [email protected]
on 18 Jun 2013 at 11:09
- Changed state: Accepted
from sockperf.
Original comment by [email protected]
on 18 Jun 2013 at 11:09
- Changed state: Done
from sockperf.
Related Issues (20)
- sockperf pp tcp mode: can't set --mps under 5000 messages per second HOT 2
- sockperf playback tcp mode on RaspberryPi: Error, illegal time or size at line #4 HOT 1
- t assign
- ERROR: _seqN > m_maxSequenceNo in v3.7 HOT 9
- ping-pong on Arm seems does not respect --mps parameter HOT 3
- Configure attempts to compile c++ code with gcc but not with g++ HOT 2
- print date&time every time it is executed HOT 4
- Floating point exception with --histogram HOT 2
- How to read sockperf output HOT 4
- _seqN > m_maxSequenceNo (100% reproducible on ppc64le architecture) HOT 4
- sockperf tcp mode: 100% cpu HOT 7
- Void function returing according to the documentation a value
- Non documented argument of function process_buffer
- Confusing commenting out code
- Need help on Sockperf configuration on Azure Ubuntu instances HOT 9
- sockperf server hung on sockperf: [tid1269] using recvfrom() to block on socket(s) HOT 4
- how to install sockperf onwindows 10 and window 11 machines HOT 8
- RedHat support HOT 2
- Simetimes I get "No messages received" and have to retry HOT 3
- sockperf crashed due to segment fault when using libvma HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sockperf.