[Cerowrt-devel] https://tools.ietf.org/html/draft-ietf-tsvwg-le-phb-06 is in last call
Jonathan Morton
chromatix99 at gmail.com
Sun Feb 3 15:02:11 EST 2019
> On 3 Feb, 2019, at 8:39 pm, Dave Taht <dave.taht at gmail.com> wrote:
>
> it's 000001 which I guess is:
>
> diff --git a/sch_cake.c b/sch_cake.c
> index 3a26db0..67263b3 100644
> --- a/sch_cake.c
> +++ b/sch_cake.c
> @@ -343,7 +343,7 @@ static const u8 diffserv4[] = {
> };
>
> static const u8 diffserv3[] = {
> - 0, 0, 0, 0, 2, 0, 0, 0,
> + 0, 1, 0, 0, 2, 0, 0, 0,
> 1, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0,
>
> (or is that reversed? my big endian/little endian chops scuks, and
> nobody modified the gen_cake_const tool to match what cake expects
> now)
That looks correct to me, though it should also be added to the other Diffserv modes including a bulk tin. Fields in TCP/IP are all laid out in "network order" which is most-significant bit/byte first, the same way you'd *normally* write a number down.
The TOS field can sometimes be confusing because the DSCP field is the upper 6 bits and the ECN field the lower 2, and the BSD Sockets API gives you the while byte to work with while DSCPs are quoted as just their own 6 bits. So you have to shift the latter left two bits before applying them to the former.
- Jonathan Morton
More information about the Cerowrt-devel
mailing list