]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: gred: add TCA_GRED_LIMIT attribute
authorDavid Ward <david.ward@ll.mit.edu>
Sun, 10 May 2015 02:01:46 +0000 (22:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 22:22:49 +0000 (18:22 -0400)
commit4fd4c879ec46fbe1b26a6408ea82fc348a12b4b3
tree0feb42c87e265a2f9ce8a144ed6c1d3d8a0bde81
parentef78b19e563201feb57ea376f7f488ed0852a4a3
net_sched: gred: add TCA_GRED_LIMIT attribute

In a GRED qdisc, if the default "virtual queue" (VQ) does not have drop
parameters configured, then packets for the default VQ are not subjected
to RED and are only dropped if the queue is larger than the net_device's
tx_queue_len. This behavior is useful for WRED mode, since these packets
will still influence the calculated average queue length and (therefore)
the drop probability for all of the other VQs. However, for some drivers
tx_queue_len is zero. In other cases the user may wish to make the limit
the same for all VQs (including the default VQ with no drop parameters).

This change adds a TCA_GRED_LIMIT attribute to set the GRED queue limit,
in bytes, during qdisc setup. (This limit is in bytes to be consistent
with the drop parameters.) The default limit is the same as for a bfifo
queue (tx_queue_len * psched_mtu). If the drop parameters of any VQ are
configured with a smaller limit than the GRED queue limit, that VQ will
still observe the smaller limit instead.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/pkt_sched.h
net/sched/sch_gred.c