diff options
| author | Eric Dumazet <[email protected]> | 2013-01-10 12:36:42 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2013-01-10 14:58:13 -0800 |
| commit | 1def9238d4aa2146924994aa4b7dc861f03b9362 (patch) | |
| tree | 8b529029fae8f8a4575b088dbe76e8b84a1c9ccd /tools/perf/scripts/python/sched-migration.py | |
| parent | 3d55b323709661df34d93e4cdcc5337620e34dfd (diff) | |
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.
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Paolo Valente <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions