Re: [PATCH v2 2/3] net_sched: Add accessor function for packet length for qdiscs
From: Jarek Poplawski <hidden>
Date: 2008-07-25 17:46:38
From: Jarek Poplawski <hidden>
Date: 2008-07-25 17:46:38
On Fri, Jul 25, 2008 at 04:15:03PM +0300, Jussi Kivilinna wrote:
Quoting "Jarek Poplawski" [off-list ref]:
...
quoted
Is it's really needed? Actually, if it's only for stats, I really can't see the reason why not to get this info old way - before enqueing? (And this could be not enough if we want packets count like in htb.)qdisc_enqueue recalculates packet size if inner qdisc has size table set, so qdisc_pkt_len might return different length after qdisc_enqueue than what it was before.
The question is how much does it matter for statistics. Packets' size (and number) can change many times in many places. Does it mean all these places should count the same or "real" size? But, if it's really necessary here, IMHO, it should be done "clean" way, like additional parameter(s) to qdisc_enqueue(), because in cases like NET_XMIT_CN we don't even know what happened with an skb. Jarek P.