[Cake] pppoe-ptm overhead calculation question
Sebastian Moeller
moeller0 at gmx.de
Thu Sep 3 09:58:28 EDT 2015
Hi Jonathan,
I just stumbled over the following snippet in tc/q_cake.c (https://github.com/dtaht/tc-adv/commit/853558f94968fe849ddd51e0ca395688aff1d940):
+ /* Typical VDSL2 framing schemes */
+ /* NB: PTM includes HDLC's 0x7D/7E expansion, adds extra 1/128 */
+ } else if (strcmp(*argv, "pppoe-ptm") == 0) {
+ atm = 0;
+ overhead = 27;
+ } else if (strcmp(*argv, "bridged-ptm") == 0) {
+ atm = 0;
+ overhead = 19;
Now the comment might be irrelevant, but I believe it to be actually not quite roght; VDSL2 does not (typically) use HDLC on the bearers used for data paths, but those are the ones we care about when thinking about per packet overhead and on-the-wire-bandwidth.
According to Rec. ITU-T G.993.2 (12/2011) HDLC is used on the ManagementTPS-TC(MPS-TC) (see section 8.2); but neither the user data TPS-TC section (8.1) nor the referenced annex L.3 mention HDLC encapsulation at all.
They do however reference Rec. ITU-T G.992.3 (04/2009) Annex N, which in turn describes the 64/65 encapsulation scheme used in VDSL2.
So VDSL2 in contrast to VDSL1 uses 64/65 encapsulation and no HDLC expansion is required. Which is great as for HDLC the 1/128 is just stochastic approximation that can be gamed by manipulating packet payload to consist only out of to-be-expanded-bytes. The 64/65 encapsulation of VDLS2, IMHO, is best dealt with as a generic rate reduction of 100-100*64/65 = 1.54%, but I digress.
I also believe the correct overhead for pppoe-ptm over vdsl2 to be:
VDSL2 (IEEE 802.3-2012 61.3 relevant fuer VDSL2): 2 Byte PPP + 6 Byte PPPoE + 1 Byte Start of Frame (S), 1 Byte End of Frame (Ck), 2 Byte TC-CRC (PTM-FCS), = 12 Byte
With a high probability that on-the-wire an ethernet header including frame-check-sequence (4 Byte Frame Check Sequence (FCS) + 6 (dest MAC) + 6 (src MAC) + 2 (ether type) + 18 bytes) needs to be added (and depending on ISP potentially several VLAN tags); I realize that cake handles all of those as discrete entities that need to be specified in their own right
I really do not see how you get to 27 for pppoe-ptm, so most likely I am overlooking something, so I would be delighted if you could explain what I am missing. Thanks in advance...
Best Regards
Sebastian
More information about the Cake
mailing list