Bug #226

Fwd: [netperf-dev] Controlling socket priority

Added by David Taht almost 2 years ago. Updated about 1 year ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:1st Public Cerowrt release

Description

awesome - we can control diffserv stuff more remotely now...

---------- Forwarded message ----------
From: Rick Jones <>
Date: Thu, Aug 4, 2011 at 7:11 PM
Subject: Re: [netperf-dev] Controlling socket priority
To: Amir Vadai <>
Cc: ,

On 08/02/2011 05:16 AM, Amir Vadai wrote:

Hi,

I added support for setting socket priority through netperf command line arguments.

Please consider adding it.

Amir -

Many points for including src/nettest_omni and adding the output selectors.

One nit though - how portable is SO_PRIORITY? I did a quick check on an
HP-UX 11.31 system and didn't find it in any of the header files. That
being the case, the addition will need to be conditional on SO_PRIORITY
being defined.

Also, how does this relate to DSCP?

happy benchmarking,

rick jones

0001-Enable-setting-socket-priority.patch (15.7 kB) David Taht, 08/04/2011 06:37 pm

History

Updated by Dave Täht almost 2 years ago

At least on gcc/glibc calling the above patch only sets the in-kernel priority.

If you want to set the diffserv field, you need to do a:

rc = setsockopt(fd, IPPROTO_IP, IP_TOS, &socket_prio, 1);

where socket_prio is a byte. The ECN bits are automagically masked out in this call.

Updated by Dave Täht about 1 year ago

  • Target version set to 1st Public Cerowrt release

Updated by Dave Täht about 1 year ago

  • Status changed from New to Closed

Also available in: Atom PDF