Skip to content

Commit e3672a6

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dpaa: stop ignoring TX queues past the number of CPUs
dpaa_fq_setup() iterates through the queues allocated by dpaa_alloc_all_fqs() and saved in &priv->dpaa_fq_list. The allocation for FQ_TYPE_TX looks as follows: if (!dpaa_fq_alloc(dev, 0, dpaa_max_num_txqs(), list, FQ_TYPE_TX)) goto fq_alloc_failed; Thus, iterating again through FQ_TYPE_TX queues in dpaa_fq_setup() and counting them will never yield an egress_cnt larger than the allocated size, dpaa_max_num_txqs(). The comparison serves no purpose since it is always true; remove it. Signed-off-by: Vladimir Oltean <[email protected]> Acked-by: Madalin Bucur <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e707275 commit e3672a6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,11 +971,7 @@ static int dpaa_fq_setup(struct dpaa_priv *priv,
971971
case FQ_TYPE_TX:
972972
dpaa_setup_egress(priv, fq, tx_port,
973973
&fq_cbs->egress_ern);
974-
/* If we have more Tx queues than the number of cores,
975-
* just ignore the extra ones.
976-
*/
977-
if (egress_cnt < dpaa_max_num_txqs())
978-
priv->egress_fqs[egress_cnt++] = &fq->fq_base;
974+
priv->egress_fqs[egress_cnt++] = &fq->fq_base;
979975
break;
980976
case FQ_TYPE_TX_CONF_MQ:
981977
priv->conf_fqs[conf_cnt++] = &fq->fq_base;

0 commit comments

Comments
 (0)