> That's simple. This way I don't have to touch each and every scheduler's > source that might be interesting now or in the future. And it is more in > the sense of "modularity" the tc framework was built on. Just throw in > the sch_stat, put it in the correct place of a "qdisc-hierarchie" and > you are able to keep track of the packets that are enqueued and dequeued > inside the sub-qdisc. > > But this rises two questions: > > 1. Does the parent qdisc get information back if the called child-qdisc > enqueued / dequeued packets? And for dequeuing: does the parent know how > many packets have been dequeued by the child? > > 2. Are enqueue() and dequeue() of a qdisc called seperately for every > single packet, or is it possible to enqueue / dequeue more than one > packet per call? Each packet gets queued separately, as the qdisc only sees one packet at the time. To the former question; If you look at the kernel code you will see inside the enqueue() function that this function calls the filter function. The filter returns a pointer to the appropriate class, and then the packet is enqueued. Regardless optional qdisc chosen for the class, the packet first enter the parent qdisc. If you so have optionally configured another qdisc to a class, this new qdisc will further be called. Otherwise, the default FIFO queue is taken care of your packet. At the time it is ready to dequeue a stored packet, the class-full qdisc dequeue() is called. If you now have configured another qdisc to handle the packets, then it will be called. > Currently I don't see why this could be a problem for the idea of > implementing sch_stat... what point do I miss here? To the oscillation problem, I do not know what your are planning for the statistic. But if you are going to make any use of this statestic, packet by packet, I imagine that you will probably need some extra CPU power. I may be wrong at this point, tell me otherwise. Anyway, it would be nice to hear about your work if you start working with the project.. Lars http://www.unik.no _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/