Thread (3 messages) flat view 3 messages, 2 authors, 2013-02-15

Re: [patch net-next] tbf: handle gso skbs properly

From: Eric Dumazet <hidden>
Date: 2013-02-15 16:13:07

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help