From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) (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 1933E3BA8E for ; Wed, 25 Apr 2018 15:02:40 -0400 (EDT) Received: by mail-pf0-x234.google.com with SMTP id p12so23903pff.13 for ; Wed, 25 Apr 2018 12:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kOUYLakAw+qI5C5ajSnc1qu3Y1LRGmFx5hiGCBpU5L0=; b=GJ0uJTETXdUYJp637W2RlQd754haca5hJka55dsvF+yqM8BBz1aQgyQBoS+YtH5RCc 1ehqo605MBWhuocz0WSxcHjxUjzAe3FVaDy21gasCGqRnYgbj7tUWrlSR4/BTeb2oBtc +S4i64knBqtjHyY+Kv1tTJbZq6okhc0TJ/NzVV+WoF9S+xQrCy0VQpIDgUOFsVYmcx75 ygauElhG+kccOscUMMDJvHzkBsZ/4trxcaNixWtczBlI8OMswcE6jCBQIthSOgSAoHX8 7ACsSpfQBfXImzb1Q6S7g38Doc+RJgpfdMq42VWbBPxIFalUB5cr0Ga35qFheOhIB6jX Ws+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kOUYLakAw+qI5C5ajSnc1qu3Y1LRGmFx5hiGCBpU5L0=; b=nTValFTqzCqoHMocY5Q60GaIrRLIbpw0zoWz0fyXBvyq5hwvhsM0c9ZIY8tqiw1F98 M7vFU/lCHma5GiCgDvjkqmTDrVh0cwpfhvf1W3hi5xBCA316EySoh4AepaBPt8fk5eWS +975UYLtXjjsPEEaDhFz/gKbHXn6NLWOt7BBbawLADt10y3Mmm3z7eBfFfXpZs5zLA96 TcAIDXl04PZqkyQIPHY3UXotNPkWAX8hssJ/DUwpsbxYLILygPPT3a5NkZbe9x2cSz0Y Va5qpLhwTmJo26zp7fzmMWVxFRXBE9z4d+qy6Zg9SFWqKnZkNtO8z6j06ZsX+x48UU5A CpyA== X-Gm-Message-State: ALQs6tBqr0B/8WnTlLzD6ZB21XRkyaHkpCu0oL5AdO2cZE9xjTzuJaAD 9ab7PnfHIhwv+EPGQp9vzXBRvYDe X-Google-Smtp-Source: AIpwx4+okx4ZE+UgyN57UKzQHrmijTFT7sPwQ/+RLYwQ6Tf58dzbvo1E8PTw1Zu86DnqV0hOMJbGSg== X-Received: by 10.98.138.68 with SMTP id y65mr28796462pfd.110.1524682959081; Wed, 25 Apr 2018 12:02:39 -0700 (PDT) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id m3sm20683036pfh.159.2018.04.25.12.02.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 12:02:38 -0700 (PDT) To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Eric Dumazet , Jonathan Morton Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net References: <20180425134249.21300-1-toke@toke.dk> <878t9b5n0q.fsf@toke.dk> <6bc11ded-028f-6c8f-964e-a569b4e10813@gmail.com> <8736zj6zj2.fsf@toke.dk> <8bae2ee1-efcc-1571-2a30-5b7779de2c88@gmail.com> <87lgdb5e4w.fsf@toke.dk> From: Eric Dumazet Message-ID: <688ac6e7-dd6d-d0ff-ee37-a0e2a0ea761c@gmail.com> Date: Wed, 25 Apr 2018 12:02:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <87lgdb5e4w.fsf@toke.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Cake] [PATCH net-next v3] Add Common Applications Kept Enhanced (cake) qdisc 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: Wed, 25 Apr 2018 19:02:40 -0000 On 04/25/2018 11:34 AM, Toke Høiland-Jørgensen wrote: > Eric Dumazet writes: > >> On 04/25/2018 09:52 AM, Jonathan Morton wrote: >>>> We can see here the high cost of forcing software GSO :/ >>>> >>>> Really, this should be done only : >>>> 1) If requested by the admin ( tc .... gso ....) >>>> >>>> 2) If packet size is above a threshold. >>>> The threshold could be set by the admin, and/or based on a fraction of the bandwidth parameter. >>>> >>>> I totally understand why you prefer to segment yourself for < 100 Mbit links. >>>> >>>> But this makes no sense on 10Gbit+ >>> >>> It is absolutely necessary, so far as I can see, to segment GSO >>> superpackets when overhead compensation is selected - as it very >>> often should be, even on pure Ethernet links. Without that, the >>> calculation of link occupancy time will be wrong. (The actual >>> transmission time of an Ethernet frame is rather more than just 14 >>> bytes longer than the underlying IP packet.) >> >> Just fix the overhead compensation computation in the code. >> >> skb in a qdisc have everything you need. >> >> qdisc_pkt_len_init() has initialized qdisc_skb_cb(skb)->pkt_len with >> the exact bytes on the wire, and you have gso_segs to perform any >> adjustement you need to do. > > The problem is that may not be the right values. For example, in many > CPEs there's a built-in switch that strips VLAN tags before the packet > actually hits the wire. So we do need to be able to get the actual > packet size. Is it possible to get the sizes of the individual segments > of a GSO packet? That way we could do the calculation for the whole > super-packet... All segments of GSO packets have the same size, by definition. Only the last segment might be smaller, and again this can be inferred from gso_size and gso_segs > >> Do not kill GSO only because you do not want to deal with it. > > It's not (just) that we don't want to deal with it, it is also a very > aggressive optimisation for latency, which makes a lot of sense at > residential internet bandwidths. > If you keep saying this old urban legend, I will NACK your patch. I am tired of people pretending GSO/TSO are bad for latencies. This is not true, quite the opposite, when done well. If you find issues, please share so that we can fix them. Trying to hide them is not what we want for fresh code.