From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, shemminger@vyatta.com, kaber@trash.net,
paolo.valente@unimore.it, jhs@mojatatu.com,
herbert@gondor.apana.org.au
Subject: Re: [PATCH v2 net-next] net_sched: more precise pkt_len computation
Date: Thu, 10 Jan 2013 14:58:38 -0800 (PST) [thread overview]
Message-ID: <20130110.145838.197118228027718720.davem@davemloft.net> (raw)
In-Reply-To: <1357857402.27446.2734.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 10 Jan 2013 14:36:42 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> 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.
>
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Looks good, applied, thanks Eric.
next prev parent reply other threads:[~2013-01-10 22:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 4:15 [RFC PATCH net-next] qfq: handle the case that front slot is empty Cong Wang
2012-10-23 7:09 ` Paolo Valente
2012-10-23 8:53 ` Cong Wang
2012-10-26 7:51 ` Paolo Valente
2012-10-26 8:10 ` Eric Dumazet
2012-10-26 9:32 ` [PATCH net-next] net_sched: more precise pkt_len computation Eric Dumazet
2012-10-26 11:11 ` Eric Dumazet
2013-01-10 22:36 ` [PATCH v2 " Eric Dumazet
2013-01-10 22:58 ` David Miller [this message]
2012-10-26 16:51 ` [RFC PATCH net-next] qfq: handle the case that front slot is empty Paolo Valente
2012-10-28 12:45 ` Cong Wang
2012-10-28 16:07 ` Paolo Valente
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=20130110.145838.197118228027718720.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=jhs@mojatatu.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=paolo.valente@unimore.it \
--cc=shemminger@vyatta.com \
/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;
as well as URLs for NNTP newsgroup(s).