From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
jhs@mojatatu.com, kuznet@ms2.inr.ac.ru, j.vimal@gmail.com
Subject: Re: [patch net-next] tbf: handle gso skbs properly
Date: Fri, 15 Feb 2013 08:13:03 -0800 [thread overview]
Message-ID: <1360944783.19353.9.camel@edumazet-glaptop> (raw)
In-Reply-To: <1360941882-6727-1-git-send-email-jiri@resnulli.us>
On Fri, 2013-02-15 at 16:24 +0100, Jiri Pirko wrote:
> So far, gso skbs has been handled by tbf in the same way as any other
> ones. Given their pkt_len they got dropped which leads to very
> inaccurate rates. This patch makes tbf gso-aware.
>
> According to Eric's suggestion, when gso skb can't be sent in one mtu
> time, resegment it.
>
> + do {
> + next_skb = skb->next;
> + qdisc_skb_cb(skb)->pkt_len = skb->len;
> + qdisc_calculate_pkt_len(skb, qdisc);
> + __skb_queue_after(&qdisc->q, prev_skb, skb);
> + prev_skb = skb;
> + skb = next_skb;
> + num_skbs++;
> + } while (skb);
This only works if qdisc is a fifo (holding packets in qdisc->q)
Please try :
tc qdisc del dev eth0 root 2>/dev/null
tc qdisc add dev eth0 root handle 10 tbf rate 0.5mbit burst 5kb latency 70ms peakrate 1mbit minburst 1540
tc qd add dev eth0 parent 10: handle 20 fq_codel
I guess we need a per qdisc ops to reinject the packets at the right place.
next prev parent reply other threads:[~2013-02-15 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 15:24 [patch net-next] tbf: handle gso skbs properly Jiri Pirko
2013-02-15 16:13 ` Eric Dumazet [this message]
2013-02-15 16:32 ` Eric Dumazet
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=1360944783.19353.9.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=j.vimal@gmail.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