Bug #4447
openDSCP value should be a 6 bit field
0%
Description
TOS was 8bits, but only the upper 6 bits became DSCP. The VTY command for DSCP in OsmoMGW accepts an 8 bit value. We are setting the setsockopt for TOS with that value without bit-shifting.
This came up while writing a similar patch for setting DSCP for OsmoBTS.
Should we
a) shift it two bits up and adjust the command syntax (and config template) to restrict to 0..63 (backwards incompatible)
or
b) change the description of the VTY command, so it is obvious that we are actually setting the TOS? (probably confusing)
CC: laforge
Related issues
Updated by osmith about 4 years ago
- Related to Feature #4438: Allow configuring DSCP value in OsmoBTS for RTP added
Updated by laforge about 4 years ago
I think this cannot really be changed/fixed in a backwards-compatible way.
Please note that the kernel will likely mask the lower two bits, and any intermediate
router can modify them on congestion (that's what ECN is for, after all).
So I guess the best we can do is to document that we expect the 6-bit DCSP value shifted
left two bits, and that the lower two bits should be zero.