提交 790d32c6 编写于 作者: M Maxime Chevallier 提交者: David S. Miller

net: mvpp2: fix hardcoded number of rx queues

There's a dedicated #define that indicates the number of rx queues per
port per cpu, this commit removes a harcoded use of that value

This doesn't fix any runtime bugs since the harcoded value matches the
expected value.
Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4c4a5686
......@@ -3993,8 +3993,8 @@ static int mvpp2_port_init(struct mvpp2_port *port)
MVPP2_MAX_PORTS * priv->max_port_rxqs)
return -EINVAL;
if (port->nrxqs % 4 || (port->nrxqs > priv->max_port_rxqs) ||
(port->ntxqs > MVPP2_MAX_TXQ))
if (port->nrxqs % MVPP2_DEFAULT_RXQ ||
port->nrxqs > priv->max_port_rxqs || port->ntxqs > MVPP2_MAX_TXQ)
return -EINVAL;
/* Disable port */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册