From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id BB4B43B29E for ; Thu, 16 Mar 2017 18:14:56 -0400 (EDT) Received: by mail-wm0-x229.google.com with SMTP id n11so2810184wma.1 for ; Thu, 16 Mar 2017 15:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:reply-to:user-agent:mime-version :content-transfer-encoding; bh=deBbzepgARQQ/iceDOycdmm8zwCm0PIuAQPg+xn6yF0=; b=toNVMlFED82PW2s/vVxNR2YT3NR+P48u8cHWLL5VJaIa/PGXLEzdpm00duF6nNkyRZ 5KAISsFQYwyWnX23hNgvWhgmca2QQRENTS2BwbYcD79yOpmTjOwPlsNJBDrbPk2QRo4B YOrnrWWHbWxUbehwA2rei+HjAWuTm83uWGNhmJrEVHiFs3KyInSJWlOJC+sVv3kA6MxH tvAQULvPsAgSLpGdxpAt76pZlDNrWzPna/MdhzxWMgoohOcTWAnTp1KnapdRCuTcAa1c 4IGZqiDkiKQNWnrcUrEASpJvwBoJJktiAqBdELKnvl7pXX+fWWNo8M87WXsCzpYJEmgW B/CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:reply-to :user-agent:mime-version:content-transfer-encoding; bh=deBbzepgARQQ/iceDOycdmm8zwCm0PIuAQPg+xn6yF0=; b=JH0SelS/frr5HzC/jV6QtBi5k3oaqemaqXx7GhD0aJIoEpGOZSsB/UP3cD3PhFq8rl 4aHuo/kv6y5eIXMitSfsXsP/39Iy1e+QApZQhtt0m5Dsp+HZsioNa0ji20GNe0wkpe+z 9m69AnnBzabjgBrylgu1yolBUafTDmevCgus4wB7shIK6HCAVvv/1i4TjgvmJHJgHicG XPSXnQhOIVjUJ78uqyuQQLlm5mlt9tX15kKmfItloOjxDlp3t19TXR2i33gVbqY2Zm4J jMO/IjtASodnb3eV2eT4G/Z6BAWek3tvjjwtNp3fZv9pCQLqP3WBCCbY8XdGopJ5tn1W RQqw== X-Gm-Message-State: AFeK/H3/EWyzHhTkYh0irFEABb8jeqj+LKmVVjiXws1rguG5Lm2uC+/eJ+vgKKK4sDNLdw== X-Received: by 10.28.32.70 with SMTP id g67mr43416wmg.3.1489702495553; Thu, 16 Mar 2017 15:14:55 -0700 (PDT) Received: from [192.168.1.116] (cm149-53.liwest.at. [81.10.149.53]) by smtp.gmail.com with ESMTPSA id 40sm7728840wry.22.2017.03.16.15.14.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 15:14:54 -0700 (PDT) From: xnor To: bloat@lists.bufferbloat.net Date: Thu, 16 Mar 2017 22:14:55 +0000 Message-Id: Reply-To: xnor User-Agent: eM_Client/7.0.27943.0 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Bloat] Inaccurate rates with HTB/HFSC+fq_codel on router due to VLAN? X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 22:14:56 -0000 Hello, I have a tl-wdr3600 router with openwrt (linux 3.18, config at [1]) and=20 want to shape ingress traffic. The WAN port, interface eth0.2, is connected to a cable modem. I use the following script: tc qdisc add dev eth0.2 handle ffff: ingress ifconfig ifb0 up txqueuelen 1000 tc qdisc add dev ifb0 root handle 1: htb default 10 tc class add dev ifb0 parent 1: classid 1:1 htb rate 18000kbit tc class add dev ifb0 parent 1:1 classid 1:10 htb rate 18000kbit ceil=20 18000kbit tc filter add dev eth0.2 parent ffff: protocol all prio 1 u32 match u32=20 0 0 action mirred egress redirect dev ifb0 tc qdisc add dev ifb0 parent 1:10 handle 100: fq_codel limit 1000=20 quantum 1514 noecn Now the problem is that it is very inaccurate, and this inaccuracy=20 increases with number of TCP download connections. With HTB (it's worse with HFSC) and 20 connections (rates calculated=20 with /sys/class/net/eth0.2/statistics/rx_bytes over 5 seconds each): 19012.610 kbit 19266.877 kbit 19303.923 kbit With a single connection and HTB, I only get about 17.2 Mbit. Curiously,= =20 /sys/class/net/ifb0/statistics show about 18.1 +/- 0.1 Mbit So I did a tcpdump of eth0.2 and ifb0: eth0.2's largest frames are 1514 bytes ethernet type IP. ifb0's are 1518 bytes (including the VLAN tag I guess) with some unknown= =20 type. What do I need to change to make shaping with ifb accurate? Ideally with= =20 both HTB and HFSC. Additional question: What's the effect of the system not having HR=20 timers? [1]=20 https://github.com/openwrt/openwrt/tree/chaos_calmer/target/linux/ar71xx=