All of lore.kernel.org
 help / color / mirror / Atom feed
* sched: scatter-gathering and generic-receiving-offloading features in network driver break the rate limiting/shaping.
@ 2012-08-09 13:56 YANG Zhe
  0 siblings, 0 replies; only message in thread
From: YANG Zhe @ 2012-08-09 13:56 UTC (permalink / raw)
  To: netdev

Hi there,

When these options is on, kernel sends/receives skb with length
greater than normal (1500 + link-layer overhead). It's because several
consecutive TCP segments is merged into a single large skb, and the
network card is responsible for splitting/merging it. For example:
http://i.imgur.com/wnv98.png , http://i.imgur.com/WPwjE.png .

Some scheduler my drop the packet because its qdisc_skb_len() is large
than its max_size(buffer/tokens), which implies that the scheduler
can't send this packet at once, so that it must be dropped on
enqueue()ing. The qdisc_rate_table used in calculation of consumed
time also fails because of its small size (u32[256]). Since the only
limit of the skb is the 64k limitation on ip_totlen, if we keep using
the u32[256] table, the cell_log would be quite large hence the time
calculation would be quite inaccurate.

Also, when calculating the time to send the merged skb, it's better to
calculate how many packets it will break into, however it may not be
accurate because of different MSS in different stream. Some weird
packet which should be fragmented on the IP layer may also have larger
size than normal and it's total size after breaking down is also
different.

I would recommend that token based scheduler should allow deficit, and
redesign the rate table, maybe leave some information in the skb to
indicate whether it is a gathered packet.

Thanks!

-- 
Sincerely,
    Yang Zhe

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-09 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-09 13:56 sched: scatter-gathering and generic-receiving-offloading features in network driver break the rate limiting/shaping YANG Zhe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.