Applying a QoS egress policy directly to an interface set qos interface <ethX> egress <POLICY>
silently deletes the ingress qdisc of that interface including the mirred redirect installed by
set interfaces ethernet <ethX> redirect <ifbY>.
Commit succeeds without any error, but download traffic is no longer shaped and
runs at full line rate. The failure is completely silent.
Configuration to reproduce
set interfaces input ifb0 description 'Download shaper' set interfaces ethernet eth0 redirect 'ifb0' set qos policy shaper DOWNLOAD bandwidth '50mbit' set qos policy shaper DOWNLOAD default bandwidth '100%' set qos policy shaper DOWNLOAD default queue-type 'fq-codel' set qos policy shaper UPLOAD bandwidth '50mbit' set qos policy shaper UPLOAD default bandwidth '100%' set qos policy shaper UPLOAD default queue-type 'fq-codel' set qos interface eth0 egress 'UPLOAD' set qos interface ifb0 egress 'DOWNLOAD'
Expected behavior
vyos@QOST:~$ tc qdisc show dev eth0 qdisc htb 1: root refcnt 2 r2q 32 default 0x1 direct_packets_stat 0 direct_qlen 1000 qdisc fq_codel 8002: parent 1:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb drop_batch 64 qdisc ingress ffff: parent ffff:fff1 ---------------- vyos@QOST:~$ tc filter show dev eth0 ingress filter parent ffff: protocol all pref 10 u32 chain 0 filter parent ffff: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1 filter parent ffff: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw match 00000000/00000000 at 0 action order 1: mirred (Egress Redirect to device ifb0) stolen
Actual behavior
vyos@QOST:~$ tc qdisc show dev eth0 qdisc htb 1: root refcnt 2 r2q 32 default 0x1 direct_packets_stat 0 direct_qlen 1000 qdisc fq_codel 8002: parent 1:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb drop_batch 64 vyos@QOST:~$ tc filter show dev eth0 ingress vyos@QOST:~$
Additional findings:
Looks like the issue is caused this change : https://github.com/vyos/vyos-1x/pull/5220
re-applies only the policies bound via qos interface <ifname>.
https://github.com/vyos/vyos-1x/pull/5220/changes#diff-c3e850625edc3ba2f44020fcda8640d00631b3c67bac756f258b919667b9d67eR354