From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (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 3E4403BA8E for ; Mon, 4 Sep 2017 23:26:19 -0400 (EDT) Received: by mail-pg0-x22a.google.com with SMTP id 188so2718235pgb.2 for ; Mon, 04 Sep 2017 20:26:19 -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=TpLp9nPUMWvxpH3ffk+QpFXWX191BRUCLUVe6yglFZA=; b=BwpCrMkL+gOcs6SUTQ9BPiblMlHTDz0qGDKdQDrrYi2OvMHUKH0EE53DxFW8ZYgP3f AgAnMCBCr+7AJBMM4J9d3sLSxIIyNAFyU5MZ6OIjEn1n5LtMuuCzaL4z1ZTVMrNeDbXX ACh9Ix+CdhH3G6b44sDNmV2BltOTkfvovpyF9i8NetRVZTGkUdFWqA/1sMarQHn0qdbc eYizMdNGrHu2DQF2AqNq/gumF0c1SeTljGn0aGUalJUWNCgxC2aPoJ6VLQS4soeN1hGA D+DGaK0XzinqfC0vkA8aRjaZOxZGhR83BS8d0Wo2RmMlrMBGw7xVHHvs5shC0L1Q8AkQ c/WQ== 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=TpLp9nPUMWvxpH3ffk+QpFXWX191BRUCLUVe6yglFZA=; b=YWiW2DozI2puzeVVQngSQut/nuM+x5xlDAnMRPCIdE2PnIKMZbw5HLO2xfHW5zv4tE YkfyLCNzMA7ZgzCw3XVPz6BrGd/C4qPBGbmjEJ+n59849usx+O+jq5wBNEP2/3iSVI73 R3e2BehLY5hJtIH61S13erK5gpBGy5h5XOo05d4giXPeZqZXtpxbIlUOpd3U73aAzaAG Qo4frw/DsXmDYOLE5j4qOyPqcRzmFgJpcl4B2ZAHgPeFjZ9EjknINHS3WIDoR2zeBbzK ZM3EektEuXWfqI258ivojFEXVyYtJvzV5H+8bu5vj6Fu5MZ3i6nOmh/McERyDSq+tMVL nKUw== X-Gm-Message-State: AHPjjUiquf6visV58FPnkPIrgdBIXZ1EqrXUMICJeCxgiKgXqtS5Cp4r jc6Uezx/90C7Fw9qM1/a5I9as8n1e8YxxENK0w== X-Google-Smtp-Source: ADKCNb6LdCnV/isR+e1p+yfFCwrTkRHzatae8oNw3R9mPt3//SMruBjknpHtpQXNPM8GDO+dm+p31vgaEGN3aEofVFs= X-Received: by 10.99.100.70 with SMTP id y67mr2644734pgb.248.1504581978227; Mon, 04 Sep 2017 20:26:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.189.72 with HTTP; Mon, 4 Sep 2017 20:26:02 -0700 (PDT) X-Originating-IP: [101.166.225.7] In-Reply-To: References: From: Ryan Mounce Date: Tue, 5 Sep 2017 12:56:02 +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:26:19 -0000 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