Re: [PATCH] net-sched: add packet length pointer parameter for qdisc_enqueue
From: Jarek Poplawski <hidden>
Date: 2008-07-31 09:30:56
On Thu, Jul 31, 2008 at 12:04:57PM +0300, Jussi Kivilinna wrote:
Quoting "Jarek Poplawski" [off-list ref]:quoted
On 30-07-2008 20:55, Jussi Kivilinna wrote:quoted
Pass packet length to caller through pointer so that length is available to caller even if inner qdisc frees skb.
...
quoted
As I've written before, IMHO using an skb after enqueuing should be avoided unless we refcounted it or the returned code is clear enough, so the idea of this patch could be right to me. But, I guess, you are changing here the way it's done: the size is calculated before the current enqueing instead of after the last one.Doh, you're right. qdisc->enqueue should pass packet length too.quoted
BTW, since I don't really get this "stab" idea enough, I wonder how it is expected to be used: with a top qdisc, a leaf one or some summing?With top and/or leaf qdisc, inner stab overrides upper.
Probably this could be called a bit ugly, but another way could be simply updating these .bstas.bytes in ->dequeue() with a difference between calculated and skb->len? Jarek P.