From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (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 198003B2A4 for ; Mon, 4 Sep 2017 23:37:22 -0400 (EDT) Received: by mail-pg0-x232.google.com with SMTP id v66so5936675pgb.5 for ; Mon, 04 Sep 2017 20:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mounce.com.au; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vT9Vfw836UVrQIkqkQwzAU49WRk8DtDJedSi6p6fv9k=; b=sXJ61E8JfTaE7STCuRenRDx6zDvXs8FojDnVye0aM+2WPofLsUqcIeTNqJTjDvlDDS 1HVwZGHXWNEFyazLEKxRAG8An5dVFOkqSjo/otLxTsa0RuU/M4s9zxj0RwvJerJPDuGq QQUxiKJ0wRWoroKzyvxkaExZYb+d8StqtbQ5p6/kt+fIieuetoAMCTmXZNkc78PPIDbL bA60oO6If/X/USgB9qSG07ua6s4LeyChBkaThtKhal+F0ewpTcv5gZxDctSiXtyoIlUO TLO2Kk4ZzKsQXG17/yBCNaQt+7u5uEcAi7q9f8xq2B4myRy0pryIvH4cGKLIfeirZbC+ utSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vT9Vfw836UVrQIkqkQwzAU49WRk8DtDJedSi6p6fv9k=; b=rCpEG+ZDPkG1pwrtf+OBSIgl1N6Skmeav5bPi2+B2cY7CliLHyGYZY3P/eSKlj1wQE 39hEV8qJNbDoMDQsSomOxjShyhMbspxi40lDutLciCY8dqXvleElflE08T3LgFHKnNOO YRg1Z3lvxd++UcgK0Jr7PWjKyCp3tfInXicDhPgkWgS+0Pex6bmAqV3QagbuNz0K5laj spsPivp7GZIA/G1D8R/9owpVtX780LJvoSo98HiRo5IZHHqGM86QAcDUmH0AuTWDD5YD Ky9120xLpGg6IZDkU70SgcjAGRi1gZJvoCTc0ovIM8UqrReX9YizPkU2MR7yPSKmqR1v uZWg== X-Gm-Message-State: AHPjjUgI33M13ze5m7qU4RQWEBm5brbMI52Gi/+6RSfDebjeaiiRZimE EOS6S5QGN7Fl5PmWCo284QPIfyiOCKzn X-Google-Smtp-Source: ADKCNb4YO5K+vr4uSiT7jHtpdzukxtk/8nwb0NzxTktJf78MDkHvoFpP04I6WWJh9VtagcZIxMAk+sXBous5bvdKLag= X-Received: by 10.84.216.69 with SMTP id f5mr2826665plj.230.1504582641252; Mon, 04 Sep 2017 20:37:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.189.72 with HTTP; Mon, 4 Sep 2017 20:37:05 -0700 (PDT) X-Originating-IP: [101.166.225.7] In-Reply-To: References: From: Ryan Mounce Date: Tue, 5 Sep 2017 13:07:05 +0930 Message-ID: To: Dennis Fedtke Cc: cake@lists.bufferbloat.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [Cake] overhead and mpu X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 03:37:22 -0000 I will clarify a little further, that cake does make a guess as to the overhead of an interface based on what it 'sees' however this is overridden (rather than simply added to) if the overhead is specified directly or via a keyword. In my case running cake on a VLAN subinterface, it happens to guess 18 bytes (14 ethernet + 4 802.1q) which is subsequently set to 18 bytes again by the 'docsis' keyword. 'tc qdisc show dev eth0.2' naively determines that since my configured overhead is the same as the overhead it 'sees', that I must have configured cake to use the 'raw' overhead. On 5 September 2017 at 12:56, Ryan Mounce wrote: > Hi Dennis, > > I am probably qualified to answer your question as I have done > extensive testing for this case with DOCSIS modems, indeed I was > prompted to contribute the 'mpu' option to cake in order to optimise > this case. > > Short answer: just use the 'docsis' keyword for cake which configures > the correct overhead and mpu, then it is just a matter of tuning the > bandwidth. > > e.g. this is my command for cake on a DOCSIS connection advertised as > 2Mbps upstream but actually shaped to 2.5Mbps: > tc qdisc add dev eth0.2 root cake dual-srchost nat oceanic docsis > bandwidth 2496Kbit > > > The shaper in DOCSIS modems for upstream traffic (and I believe also > in the CMTS for downstream traffic) works with ethernet frames > including the 14-byte MAC header and 4-byte CRC and excluding any > preamble / inter-packet gap, for 18 bytes total. Cake rounds runt > frames up to the MPU after the overhead has been added, thus 64 bytes > is our MPU for DOCSIS. > > It doesn't matter what packet size cake 'sees' on an interface, the > overhead specified at the command line (directly or via keywords) is > always interpreted relative to IP packets rather than relative to the > PDU of a given interface. > > Regards, > Ryan Mounce > > On 5 September 2017 at 12:16, Dennis Fedtke wrote: >> Hi! >> >> what values should be used for an Ethernet connection running over docsis >> modem? >> >> I think cake automatically accounts for the Ethernet header. >> But how large is the ethernet header? Some sites say 1514 some other sites >> say 1518. >> So we have the mac header (14bytes) + the crc checksum (4 bytes) + max >> payload 1500bytes = 1518 bytes? >> >> I looked at the code and there is hard_header_len used. >> >> After some quick googling i found this info: >> The value ofhard_header_lenis14(ETH_HLEN) for Ethernet interfaces. >> >> Which "packets size(1500 or 1514 or 1518)" does cake really see and work >> with when running on an Ethernet interface? >> Minimum Ethernet payload size is 46 bytes. So should i use mpu 46, mpu 60 or >> mpu 64 setting for an Ethernet interface? >> >> Thanks >> >> _______________________________________________ >> Cake mailing list >> Cake@lists.bufferbloat.net >> https://lists.bufferbloat.net/listinfo/cake