]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: introduce per-port nrxqs/ntxqs variables
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 3 Aug 2017 08:41:57 +0000 (10:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:16:09 +0000 (15:16 -0700)
commit1448feb8d866213406b2fabcc4d6edd01e1e1fc8
tree892c83f29a1302eb20dcc8d3e475ab57dde5d242
parenta9be628974e5243b95f6aced6d5e5e94e750d227
net: mvpp2: introduce per-port nrxqs/ntxqs variables

Currently, the global variables rxq_number and txq_number hold the
number of per-port TXQs and RXQs. Until now, such numbers were
constant regardless of the driver configuration. As we are going to
introduce different modes for TX and RX queues, these numbers will
depend on the configuration (PPv2.1 vs. PPv2.2, exact queue
distribution logic).

Therefore, as a preparation, we move the number of RXQs and TXQs in
the 'struct mvpp2_port' structure, next to the RXQs and TXQs
descriptor arrays.

For now, they remain initialized to the same default values as
rxq_number/txq_number used to be initialized, but this will change in
future commits.

The only non-mechanical change in this patch is that the check to
verify hardware constraints on the number of RXQs and TXQs is moved
from mvpp2_probe() to mvpp2_port_probe(), since it's now in
mvpp2_port_probe() that we initialize the per-port count of RXQ and
TXQ.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c