From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: edumazet@google.com, netdev@vger.kernel.org,
kuznet@ms2.inr.ac.ru, jhs@mojatatu.com
Subject: Re: inaccurate packet scheduling
Date: Tue, 29 Jan 2013 08:13:03 -0800 [thread overview]
Message-ID: <1359475983.30177.2.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130129122357.GC7571@minipsycho.orion>
On Tue, 2013-01-29 at 13:23 +0100, Jiri Pirko wrote:
> part of the commit message says:
> <quote>
> The bits per second on the wire is still 5200Mb/s with new HTB
> because qdisc accounts for packet length using skb->len, which
> is smaller than total bytes on the wire if GSO is used. But
> that is for another patch regardless of how time is accounted.
> </quote>
> I believe that is a similar problem like ours. But looks like this
> "another patch" never got in.
>
Hmm, I thought I addressed this in
commit 1def9238d4aa2146924994aa4b7dc861f03b9362
Author: Eric Dumazet <edumazet@google.com>
Date: Thu Jan 10 12:36:42 2013 +0000
net_sched: more precise pkt_len computation
One long standing problem with TSO/GSO/GRO packets is that skb->len
doesn't represent a precise amount of bytes on wire.
Headers are only accounted for the first segment.
For TCP, thats typically 66 bytes per 1448 bytes segment missing,
an error of 4.5 % for normal MSS value.
As consequences :
1) TBF/CBQ/HTB/NETEM/... can send more bytes than the assigned limits.
2) Device stats are slightly under estimated as well.
Fix this by taking account of headers in qdisc_skb_cb(skb)->pkt_len
computation.
Packet schedulers should use qdisc pkt_len instead of skb->len for their
bandwidth limitations, and TSO enabled devices drivers could use pkt_len
if their statistics are not hardware assisted, and if they don't scratch
skb->cb[] first word.
Both egress and ingress paths work, thanks to commit fda55eca5a
(net: introduce skb_transport_header_was_set()) : If GRO built
a GSO packet, it also set the transport header for us.
next prev parent reply other threads:[~2013-01-29 16:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 15:04 inaccurate packet scheduling Jiri Pirko
2012-12-18 16:26 ` Stephen Hemminger
2012-12-18 16:51 ` Eric Dumazet
2013-01-02 15:26 ` Jiri Pirko
2013-01-02 16:34 ` Eric Dumazet
2013-01-08 13:30 ` Jiri Pirko
2013-01-24 8:05 ` Jiri Pirko
2013-01-24 14:01 ` Eric Dumazet
2013-01-29 12:23 ` Jiri Pirko
2013-01-29 16:13 ` Eric Dumazet [this message]
2013-01-30 12:14 ` Jiri Pirko
2013-02-07 16:13 ` Jiri Pirko
2013-02-07 16:39 ` Eric Dumazet
2013-02-07 17:39 ` Jiri Pirko
2013-02-07 17:47 ` Eric Dumazet
2013-02-07 18:56 ` Jiri Pirko
2012-12-18 17:54 ` Jiri Pirko
2012-12-18 18:06 ` Eric Dumazet
2012-12-18 18:40 ` Jiri Pirko
2012-12-18 18:43 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359475983.30177.2.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox