Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Sebastian Moeller <moeller0@gmx.de>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: cake@lists.bufferbloat.net
Subject: Re: [Cake] More overhead keywords
Date: Mon, 18 May 2015 09:27:07 +0200	[thread overview]
Message-ID: <7B7986E7-49A1-4EE1-B8D0-B55A6C2660A1@gmx.de> (raw)
In-Reply-To: <AE88AA8A-6B7A-4FCB-A482-66659015802D@gmail.com>

Hi Jonathan,

On May 18, 2015, at 02:49 , Jonathan Morton <chromatix99@gmail.com> wrote:

> This is entirely userspace (ie. iproute2) stuff:
> 
> The initial cake-overhead patch included only “raw” and “conservative” shortcut keywords, alongside the numeric “overhead” parameter for experts.  I’ve now worked out an extended set of keywords which, I think, takes care of all the normal cases.

	Great!

> 
> There are eight new keywords which deal with the basic ADSL configurations.  These switch on ATM cell-framing compensation, and set the overhead based on the raw IP packet as a baseline.
> 
> ipoa-vcmux (8)
> ipoa-llcsnap (16)
> bridged-vcmux (24)
> bridged-llcsnap (32)
> pppoa-vcmux (10)
> pppoa-llc (14)
> pppoe-vcmux (32)
> pppoe-llcsnap (40)
> 
> Note that “pppoa-llc” is not a typo - it really doesn’t involve SNAP, and is thus a little more compact than if it did.

	I am probably odd in my preferences, but to be able one needs to read a certain number of technical documents to figure out which encapsulation is used; these keywords woui;d make more sense sort of if they were something along the lines of: “BT_ADSL”, so that the user would just need to know what she signed up for. Then again no ISP I know guarantees any stability in the encapsulation or actually discloses what is in use...

> 
> Two more new keywords deal with the basic VDSL2 configurations.  Again, the overheads use IP as a baseline, but this time ATM cell-framing is turned off.  Apparently PTM does have a small additional overhead on the order of 1/128, due to HDLC framing which attaches special meaning to 0x7D and 0x7E bytes; I might need to add approximate handling for that, kernel-side.

	HDLC is only used for VDSL1 not for the relevant data bearer channels in VDSL2 (VDSL1 and VDSL2 are not as closely related as ADSL1 and ADSL2 are). The issue with HDLC, in my eyes is that 1/128 is just a stochastic approximation since it is payload dependent, think a packet with just 0x7D as payload which will I believe roughly double in wire size. So really one would need to read through the packet first (which would be what “deepest packet inspection”?), count the forbidden octets and adjust the skb->pkt_len (or cake’s overhead) for the real wire size, but that will not really work on puny routers that are already struggling with NAT/routing/firewalling/traffic-shaping. As far as I know VDSL1 is still in use, allegedly in South Korea, but in Europe VDSL2 seems to be more dominant, no idea about the U.S..

For what it is worth here are my notes about the VDSL2 overhead:

VDSL2 header:
Deutsche Telekom Overhead: 2 Byte PPP + 6 Byte PPPoE + 4 Byte VLAN = 10 Byte
VDSL (IEEE 802.3-2012 61.3 relevant for VDSL2):  1 Byte Start of Frame (S), 1 Byte End of Frame (Ck), 2 Byte TC-CRC (PTM-FCS), = 4 Byte
#FAST-ETHERNET: 7 Byte Preamble + 1 Byte start of frame delimiter (SFD) + 12 Byte inter #frame gap (IFG) = 20 Byte
COMMON: 4 Byte Frame Check Sequence (FCS) + 6 (dest MAC) + 6 (src MAC) + 2 (ethertype) = 18 byte 	(By now I think that the ethernet FCS is not transmitter over the VDSL segment, but recalculated at the other end, as was usual with ADSL)

maxMTU: 1500

postMTU header:
8 (PPP/PPPoE) = 1492
preMTU header:
VDSL2:
1 (S) + 1 (Ck) + 2 (PTM-FCS) = 4
ethernet
18 (common) + 4 (VLAN) = 22 (with FCS)
14 (common) + 4 (VLAN) = 18

payload:
maxMTU - postMTU_header = 1500 - 8 = 1492

fullFrameSize
maxMTU + preMTU_header = 1500 + 4 + 22 = 1526
maxMTU + preMTU_header = 1500 + 4 + 18 = 1522

And then there is the PTM framing (one octet in 65, the sync octet, does not carry user data and hence is overhead):
PTM 64/65 
framing factor: 64/65 = 0.984615384615

I am not sure whether this is already excluded from the sync rates reported to the user, but since this is independent of data/packet size and we always need to set the shaper lower than 100% anyways these 1.5% might be irrelevant.

I hope this is somewhat clear.

> 
> pppoe-ptm (27)
> bridged-ptm (19)
> 
> The final three keywords are not for standalone use, but act as modifiers to some previous keyword.  They can be specified more than once, which is probably only useful for “ether-vlan”.
> 
> via-ethernet (-14)
> ether-fcs (+4)
> ether-vlan (+4)

	I like this idea, but it might be a bit surprising that these behave differently from the others, maybe prefix them with "mod_" or so? Also if we really want to hold the users hand, only ether-vlan reasonably can appear more than once, so maybe just add a keyword 2nd-ether-vlan and disallow multiple instances of the same key-word? 

> 
> Does all this look reasonable?  In particular, have I missed anything regarding PTM/VDSL2?  I’m using http://www.ethernetinthefirstmile.com/articles/WTC2002.pdf as a reference, but it isn’t as clear as it might be.

I think that IEEE 802.3-2012 61.3 is more explicit and authoritative. But clear as in nice to read and understand this is not… ;) Maybe T-REC-G.993.2-201112-I!!PDF-E can also be of help...


Best Regards
	Sebastian

> 
> - Jonathan Morton
> 
> _______________________________________________
> Cake mailing list
> Cake@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake


  reply	other threads:[~2015-05-18  7:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 14:02 [Cake] openwrt build with latest cake and other qdiscs Alan Jenkins
2015-05-10 17:29 ` Alan Jenkins
2015-05-10 20:37   ` Dave Taht
2015-05-10 20:38     ` Dave Taht
2015-05-11  6:54       ` Sebastian Moeller
2015-05-10 21:46   ` Sebastian Moeller
2015-05-10 22:19     ` Dave Taht
2015-05-11  6:50   ` Sebastian Moeller
2015-05-11  7:01     ` Jonathan Morton
2015-05-13  6:43       ` Jonathan Morton
2015-05-14  9:19         ` Sebastian Moeller
2015-05-14 10:24           ` Jonathan Morton
2015-05-14 10:33             ` Alan Jenkins
2015-05-14 10:42               ` Jonathan Morton
2015-05-14 10:58             ` Sebastian Moeller
2015-05-14 13:12               ` Jonathan Morton
2015-05-14 14:57                 ` Sebastian Moeller
2015-05-14 15:32                   ` Jonathan Morton
2015-05-14 18:15                     ` Sebastian Moeller
2015-05-14 22:06                       ` Jonathan Morton
2015-05-15  2:27                         ` Dave Taht
2015-05-15 21:49                           ` Jonathan Morton
2015-05-14  9:50   ` Alan Jenkins
2015-05-18  0:49     ` [Cake] More overhead keywords Jonathan Morton
2015-05-18  7:27       ` Sebastian Moeller [this message]
2015-05-18  8:13         ` Jonathan Morton
2015-05-18  8:41           ` Sebastian Moeller
2015-05-18 19:41           ` David Lang
2015-05-18 19:57             ` Dave Taht
2015-05-19 10:14               ` Kevin Darbyshire-Bryant
2015-05-23  0:30       ` Dave Taht
2015-05-23  2:27         ` Jonathan Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7B7986E7-49A1-4EE1-B8D0-B55A6C2660A1@gmx.de \
    --to=moeller0@gmx.de \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox