Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: fsl-dpaa2/eth: Change max number of Tx queues

We use DPAA2_ETH_MAX_TX_QUEUES to dimension the array holding
information on Tx queues. At most, we can have one queue per cpu.

Until now we used the NR_CPUS macro to set the upper limit on number
of Tx queues. However, the platforms that the DPAA2 Ethernet driver
supports have at most 16 cores, whereas NR_CPUS is Kconfigurable and
can be much higher.

Avoid allocating memory we'll never use, by setting
DPAA2_ETH_MAX_TX_QUEUES to 16. Same for DPAA2_ETH_MAX_DPCONS.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ioana Radulescu and committed by
Greg Kroah-Hartman
009749d7 fa722c00

+2 -2
+2 -2
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
··· 251 251 252 252 /* Maximum number of queues associated with a DPNI */ 253 253 #define DPAA2_ETH_MAX_RX_QUEUES 16 254 - #define DPAA2_ETH_MAX_TX_QUEUES NR_CPUS 254 + #define DPAA2_ETH_MAX_TX_QUEUES 16 255 255 #define DPAA2_ETH_MAX_QUEUES (DPAA2_ETH_MAX_RX_QUEUES + \ 256 256 DPAA2_ETH_MAX_TX_QUEUES) 257 257 258 - #define DPAA2_ETH_MAX_DPCONS NR_CPUS 258 + #define DPAA2_ETH_MAX_DPCONS 16 259 259 260 260 enum dpaa2_eth_fq_type { 261 261 DPAA2_RX_FQ = 0,