[netperf-dev] Controlling socket priority

Rick Jones rick.jones2 at hp.com
Thu Aug 25 11:44:11 PDT 2011


Amir -

I went to apply your patch via "patch" and all but configure.ac was 
rejected.  Also, the convention for setting things on the data socket on 
the netserver side is to set the "local" version of the variable and let 
create_data_socket() handle it.

I went ahead and added things by hand, omitting the changes to the 
"classic" tests and only doing the omni and making the requisite fixups. 
  I've compiled it and run a couple of quick sanity checks to make sure 
that expected values are printed in the output.  I've not looked at 
packets on the wire.

The result is in the top of trunk for you and others to give a try. 
Keep in mind that the need to increase the control message size means 
that top-of-trunk will *not* work with previous versions of netperf. 
Both sides will have to be updated.

happy benchmarking,

rick jones

PS - If indeed SO_PRIORITY isn't affecting the TOS bits, then there is a 
manpage update indicated:

> SO_PRIORITY
>         Set the protocol-defined priority for all packets to be sent  on
>         this  socket.   Linux  uses  this  value to order the networking
>         queues: packets with a higher priority may  be  processed  first
>         depending  on  the  selected  device  queueing  discipline.  For
>         ip(7), this also sets the IP  type-of-service  (TOS)  field  for
>         outgoing  packets.   Setting a priority outside the range 0 to 6
>         requires the CAP_NET_ADMIN capability.




More information about the netperf-dev mailing list