dql: Fix dql->limit value when reset.
PATCH 1/1 dql: Fix dql->limit value when reset.
Executing dql_reset after setting a non-zero value for limit_min can lead to an unreasonable situation where dql->limit is less than dql->limit_min.
For instance, after setting /sys/class/net/eth*/queues/tx-0/byte_queue_limits/limit_min, an ifconfig down/up operation might cause the ethernet driver to call netdev_tx_reset_queue, which in turn invokes dql_reset.
In this case, dql->limit is reset to 0 while dql->limit_min remains non-zero value, which is unexpected. The limit should always be greater than or equal to limit_min.
--- lib/dynamic_queue_limits.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/dynamic_queue_limits.c +1 -1
@@ -190,7 +190,7 @@ EXPORT_SYMBOL(dql_completed);void dql_reset (struct dql *dql) {/* Reset all dynamic values */ - dql->limit =0 ; + dql->limit = dql->min_limit; dql->num_queued =0 ; dql->num_completed =0 ; dql->last_obj_cnt =0 ;
Signature · 1 line
2.34.1
Andrew Morton
maintainerQuoted 2 lines · On Tue, 18 Mar 2025 15:31:02 +0800 Jing Su <[email protected]> wrote:
lib/dynamic_queue_limits.c | 2 +-
This belongs to the networking people.
get_maintainer is silent for some reason. So using `git log lib/dynamic_queue_limits.c | grep Author' suggests
Author: Eric Dumazet <[email protected]>
Author: Breno Leitao <[email protected]>
Author: Jakub Kicinski <[email protected]>
...
Author: David S. Miller <[email protected]>
...
Please resend to those developers and cc [email protected], thanks.