2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

vswitch: Use consistent representation of DSCP bits.

There are two sensible ways to represent the 6 DSCP bits of an IP
packet.  One could represent them as an integer in the range 0 to
63.  Or one could represent them as they would appear in the tos
field (0 to 63) << 2.  Before this patch, OVS had used the former
method for the DSCP bits in the Queue Table, and the latter for the
DSCP in the Controller and Manager tables.  Since the ability to
set DSCP bits in the Controller and Manager tables is so new that
it hasn't been released yet, this patch changes it to use the
existing style employed in the Queue table.  Hopefully this should
make the code and configuration less confusing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
Ethan Jackson
2012-04-16 12:09:49 -07:00
parent ef8a3d1497
commit cea1576889
6 changed files with 79 additions and 66 deletions

View File

@@ -66,7 +66,7 @@ char *describe_fd(int fd);
/* Default value of dscp bits for connection between controller and manager.
* Value of IPTOS_PREC_INTERNETCONTROL = 0xc0 which is defined
* in <netinet/ip.h> is used. */
#define DSCP_DEFAULT IPTOS_PREC_INTERNETCONTROL
* in <netinet/ip.h> is used. */
#define DSCP_DEFAULT (IPTOS_PREC_INTERNETCONTROL >> 2)
#endif /* socket-util.h */