Open Blandine11 opened 3 years ago
Hi,
I tried to count the numbers of drops in your dualpi2 aqm located at this link : https://github.com/L4STeam/linux/blob/testing/net/sched/sch_dualpi2.c For this I looked in the source code and I saw this parameter named cnt in this struct struct { / Deferred drop statistics / u32 cnt; / Packets dropped / u32 len; / Bytes dropped / } deferred_drops;
For me this variable counts the total number of drop in both queues (classic and l4s) in the dualpi2 AQM when a packet is dropped.
It does not, and its name/usage states it clearly: https://github.com/L4STeam/linux/blob/testing/net/sched/sch_dualpi2.c#L567 it is only used to defer the propagation of the backlog update to parent qdiscs.
dualpi2 does not duplicate the drop counter of the base qdisc implementation; You can find that counter as part of the qstats member of the Qdisc struct: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/net/sch_generic.h#n104 i.e., the one that is increased at every qdisc_drop() call https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/net/sch_generic.h#n1175 or qdisc_qstats_drop() https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/net/sch_generic.h#n897
That is 'dropped' counter that is displayed when doing tc -s qdisc
(to
be used in conjunction with 'overlimit' to distinguish between the PI2
drops and the taildrop is the queue overflows.
Best, Olivier
Hello all,
I tried to count the numbers of drops in your dualpi2 aqm located at this link :
https://github.com/L4STeam/linux/blob/testing/net/sched/sch_dualpi2.c
For this I looked in the source code and I saw this parameter namedcnt
in this structstruct { /* Deferred drop statistics */ u32 cnt; /* Packets dropped */ u32 len; /* Bytes dropped */ } deferred_drops;
For me this variable counts the total number of drop in both queues (classic and l4s) in the dualpi2 AQM when a packet is dropped.
But what I remarked is that this variable that must count drop is incremented only one time
++q->deferred_drops.cnt;
at line596
of the dualpi2's source code in the dequeue functionstatic struct sk_buff *dualpi2_qdisc_dequeue(struct Qdisc *sch)
.What I don't understand is why the drops counters
q->deferred_drops.cnt
is incremented only one time ? Packet dropping does not happens when there are packet to enqueue and queue limit is reached or drop_early is enable ?If I mistake, can you show me in the source code where packet dropping happens , please?
Regards