]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpsw: use cpdma channels in backward order for txq
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Mon, 23 Jul 2018 21:26:29 +0000 (00:26 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jul 2018 03:34:36 +0000 (20:34 -0700)
commitef91b33082fd3227ef91698f9fce60663381bb29
treedd6df0dfb5e589a40d2187ae6ce34ecf7a025334
parent534b76910c87c4b95189ecf58dcd22a41ff1fcad
net: ethernet: ti: cpsw: use cpdma channels in backward order for txq

The cpdma channel highest priority is from hi to lo number.
The driver has limited number of descriptors that are shared between
number of cpdma channels. Number of queues can be tuned with ethtool,
that allows to not spend descriptors on not needed cpdma channels.
In AVB usually only 2 tx queues can be enough with rate limitation.
The rate limitation can be used only for hi priority queues. Thus, to
use only 2 queues the 8 has to be created. It's wasteful.

So, in order to allow using only needed number of rate limited
tx queues, save resources, and be able to set rate limitation for
them, let assign tx cpdma channels in backward order to queues.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c