[Cake] Putting cake under dsmark on ingress ifb

Andy Furniss adf.lists at gmail.com
Sun Feb 26 08:41:33 EST 2017


I am well rusty with linux qos and have never tried dsmark before.

I am likely doing something stupid here :-)

So the test: I want to set dsmark on ingress traffic so I can control
which cake tin it goes to - test just marking icmp as ef.

ingress qdisc is added to ppp0 and redirected to ifb0, on which I do -

tc qdisc add dev ifb0 handle 1:0 root dsmark indices 64

tc filter add dev ifb0 parent 1:0 protocol ip prio 1 u32 match ip 
protocol 1 0xff classid 1:1

tc class change dev ifb0 classid 1:1 dsmark mask 0x3 value 0xb8

This works in the sense that I can now get tcpdump on a PC on the
lan to show incoming icmp with tos 0xb8.

So I try to add cake under dsmark ini the hope that it sees icmp as ef
but it doesn't, icmp goes to best effort.

tc qdisc add dev ifb0 handle 2:0 parent 1:0 cake bandwidth 60mbit raw 
overhead 34 diffserv4

tc -s -d qdisc  ls dev ifb0
qdisc dsmark 1: root refcnt 2 indices 0x0040
  Sent 60259205 bytes 71562 pkt (dropped 8, overlimits 0 requeues 0)
  backlog 0b 0p requeues 0
qdisc cake 2: parent 1: bandwidth 60Mbit diffserv4 triple-isolate rtt 
100.0ms noatm overhead 48 via-ethernet
  Sent 60254313 bytes 71495 pkt (dropped 8, overlimits 67924 requeues 0)
  backlog 0b 0p requeues 0
  memory used: 160448b of 4Mb
  capacity estimate: 60Mbit
                  Bulk   Best Effort      Video       Voice
   thresh      3750Kbit      60Mbit      30Mbit      15Mbit
   target         5.0ms       5.0ms       5.0ms       5.0ms
   interval     100.0ms     100.0ms     100.0ms     100.0ms
   pk_delay         4us       311us        87us         7us
   av_delay         0us       214us         4us         0us
   sp_delay         0us         6us         4us         0us
   pkts               3       71367          95          38
   bytes            124    60246264       18265        1554
   way_inds           0         182           0           0
   way_miss           3        7043          77           7
   way_cols           0           0           0           0
   drops              0           8           0           0
   marks              0           0           0           0
   sp_flows           0           1           0           0
   bk_flows           0           0           0           0
   un_flows           0           0           0           0
   max_len           44        1500        1151          78

The packets showing as voice are AFAIKT ntp. pinging from lan
still shows 0xb8 but the counters show that they are going through
Best Effort.

Anyone see what's wrong?

TIA.


More information about the Cake mailing list