]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: rollback orig value on failure of dev_qdisc_change_tx_queue_len
authorTariq Toukan <tariqt@mellanox.com>
Tue, 24 Jul 2018 11:12:20 +0000 (14:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:48:05 +0000 (07:48 +0200)
commit469bda04fc892f99af71d3b973c583dffe159bdc
tree7a28204ebd0179ece999a84872519e94f115e575
parentd685bbf1acf724d9479593dc886e10202eda0c04
net: rollback orig value on failure of dev_qdisc_change_tx_queue_len

[ Upstream commit 7effaf06c3cdef6855e127886c7405b9ab62f90d ]

Fix dev_change_tx_queue_len so it rolls back original value
upon a failure in dev_qdisc_change_tx_queue_len.
This is already done for notifirers' failures, share the code.

In case of failure in dev_qdisc_change_tx_queue_len, some tx queues
would still be of the new length, while they should be reverted.
Currently, the revert is not done, and is marked with a TODO label
in dev_qdisc_change_tx_queue_len, and should find some nice solution
to do it.
Yet it is still better to not apply the newly requested value.

Fixes: 48bfd55e7e41 ("net_sched: plug in qdisc ops change_tx_queue_len")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Reported-by: Ran Rozenstein <ranro@mellanox.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c