From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [IPv6:2001:470:dc45:1000::1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 808C73BA8E for ; Wed, 25 Apr 2018 14:34:26 -0400 (EDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1524681265; bh=zesA0YoBt+uPZinQc1CYPzeZw3tZiH2y65MY1gilXyk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=N/ywXKDeBSTKwWrs6fg4rp1+HdDwT/AUDEz4khAHDsjXnrVbax82B/YgrXv1HGoDY dFINN9pYYEawvyfoZuJNSRJ4adMn2E3Q0uaq061mERiPzjym29ECuFSzrwsRXZs4AB C1tsUoZBhe8AFRRWx5tGUxwiS0a8htnLwrwpuVFA3/sPpwc6Pkz/lT8kzDFGHQcuqJ 5ELkoQ7HWZFVzZI7aqjTcm7YZ6/J4lt95h3x5CB/5KeR8g7W5LZ8ZFBC3oYTrGD1Rt LexHzTc60t8zMVNGB7Lpl7j47ZudcWvfUb2zuhkyxnSl9EF3T/q2ZoeB0fklKiJHgk mb+xNUfFtatVg== To: Eric Dumazet , Jonathan Morton Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net In-Reply-To: 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> Date: Wed, 25 Apr 2018 20:34:23 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87lgdb5e4w.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain 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 18:34:26 -0000 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... > 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. >> Another reason to apply GSO segmentation is to achieve maximal >> smoothness of flow isolation. This should still be achievable within >> some tolerance at high link rates, but calculating this tolerance is >> complicated by the triple-isolate algorithm. >> >> If there's a way to obtain the individual packet sizes without >> incurring the full segmentation overhead, it may be worth considering >> (at high link rates only). I would want to leave it on by default, >> because some of Cake's demonstrably superior latency performance >> depends on seeing the real packets, not the aggregates, and the >> overhead only becomes significant above 100Mbps on weak MIPS CPUs and >> 1Gbps on vaguely modern x86 stuff. > > Again, these arguments are moot on 10Gbit+. > > Lets build the future, do not pretend GSO/TSO is not part of it. I'm all for being future proof, but we also do want well-tested code. Reworking this feature to function correctly with GSO is going to take some work. Would you accept gating GSO splitting on bandwidth for now, and adding correct overhead compensation for GSO packets later? something like: if (shaper_active() && (bandwidth <= 1Gbps || overhead_configured)) split_gso() -Toke